Created
September 21, 2022 23:59
-
-
Save gabrielzanlorenssi/ddae70b839d2bf3650e1e065e27d6af5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Library ----------------------------------------------------------------- | |
library(cepespR) | |
library(tidyverse) | |
#-- 1998 a 2018 | |
years <- c(1998, 2002, 2006, 2010, 2014, 2018) | |
d <- map_df(years, function(x) { | |
get_votes(year=x, position="President") %>% | |
select(ANO_ELEICAO, NUM_TURNO, | |
NUMERO_CANDIDATO, | |
COD_MUN_IBGE, QTDE_VOTOS) %>% | |
set_names("year", "turno", "numero_cand", | |
"ibge7", "votos") | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment