electionsBR
offers a set of functions to easily pull and clean Brazilian electoral data from the Brazilian Superior Electoral Court (TSE) website. Among others, the package retrieves data on local and federal elections for all positions (city councilor, mayor, state deputy, federal deputy, governor, and president) aggregated by state, city, and electoral zones.
electionsBR
is on CRAN and can be installed with:
electionsBR
is also available on GitHub. You can install pre-release versions via:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("silvadenisson/electionsBR")
To download data from a given election, only the year
argument must be passed to the function call:
You may also export Brazilian electoral data to Stata and SPSS by setting the export
optional argument to TRUE
:
As well as subset your results by state using the uf
argument:
For more information on how the package works and for a complete list of functions, see the vignette.
To cite electionsBR
in publications, please use:
Denisson Silva, Fernando Meireles, and Beatriz Costa.