president_state_vote.Rd
president_state_vote()
downloads, cleans, and transforms data on presidential elections results
in the second round (runnoff elections) by state. The electoral results are, by default, reported as proportion
president_state_vote(year, prop = TRUE, ascii = FALSE, encoding = "Latin-1")
year | Election year ( |
---|---|
prop | Shoud the votes be reported as porportion? (Defaults to |
ascii | ( |
encoding | Data original encoding (defaults to 'Latin-1'). This can be changed to avoid errors
when |
president_state_vote()
returns a tbl, data.frame
with the following variables:
ANO_ELEICAO: Election year.
SIGLA_UF: Unit of the Federation's acronym in which occurred the election.
SIGLA_PARTIDO: Party acronym.
NOME_PARTIDO: Party name.
NUMERO_PARTIDO: Party number.
NOME_COLIGACAO: Coalition shortname.
COMPOSICAO_LEGENDA: Party's shortname composition.
TOTAL_VOTOS: Party votos (or porportion) votes by state.
This functions includes results to BR and ZZ state acronyms: the first one considers the entire country as a district; the second one considers voters living abroad as a district. For 2014 elections, results are only available for these two state acronyms.
president_mun_vote
for presidential elections results by municipality;
legislative_mun_vote
for legislative elections results by municipality;
and legislative_state_vote
for legislative elections results by state.
# NOT RUN { df <- president_state_vote(2002) # }