legislative_state_vote() downloads, cleans, and transforms data on legislative elections results by state The electoral results are, by default, reported as proportions. The user can choose between Senate and Chamber of Deputies electoral results.

legislative_state_vote(year, house = c("chamber", "senate"), prop = TRUE,
  ascii = FALSE, encoding = "Latin-1")

Arguments

year

Election year (integer). For this function, only the years 1998, 2002, 2006, 2010, and 2014 are available.

house

Report results from which legislative house? Options are senate and chamber.

prop

Shoud the votes be reported as proportions? (Defaults to TRUE).

ascii

(logical). Should the text be transformed from Latin-1 to ASCII format?

encoding

Data original encoding (defaults to 'Latin-1'). This can be changed to avoid errors when ascii = TRUE.

Value

legislative_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 proportions) votes by state.

See also

legislative_mun_vote for legislative elections results by municipality; president_mun_vote for presidential elections results by municipality; and president_state_vote for presidential elections results by state.

Examples

not_run({ df <- legislative_state_vote(2002) })