Description Usage Arguments Details Value Examples
View source: R/voter_profile_by_section.R
voter_profile_by_section()
downloads and cleans data on the voters' profile aggregated by voting section (i.e., voting stations).
The function returns a data.frame
where each observation corresponds to a voter profile type.
1 2 3 4 5 6 7 | voter_profile_by_section(
year,
ascii = FALSE,
encoding = "windows-1252",
export = FALSE,
temp = TRUE
)
|
year |
Election year ( |
ascii |
( |
encoding |
Data original encoding (defaults to 'windows-1252'). This can be changed to avoid errors
when |
export |
( |
temp |
( |
If export is set to TRUE
, the downloaded data is saved as .dta and .sav
files in the current directory.
voter_profile()
returns a data.frame
with the following variables:
DT_GERACAO The date when the file was created.
HH_GERACAO The time when the file was created, Brasilia Timezone (GMT-3).
AA_ELEICAO Election year.
DT_ELEICAO Election date.
DS_ELEICAO Election description (i.e., indicates electoral round or supplementary elections).
SG_UF Brazilian state acronym.
CD_MUNICIPIO Brazilian municipality identification code (created by the TSE).
NM_MUNICIPIO Brazilian municipality name.
NR_ZONA Electoral zone number.
NR_SECAO Voting section number.
CD_TIPO_SECAO_AGREGADA Voting section type code.
DS_TIPO_SECAO_AGREGADA Voting section type (i.e., main section or aggregated).
NR_LOCAL_VOTACAO Voting station number.
NM_LOCAL_VOTACAO Voting station name.
CD_TIPO_LOCAL Type of voting station code.
DS_TIPO_LOCAL Type of voting station.
DS_ENDERECO Address of voting station.
NM_BAIRRO Voting station neighborhood name.
NR_CEP Voting station zip code.
NR_TELEFONE_LOCAL Voting station local phone number.
NR_LATITUDE Voting station latitude (might be missing).
NR_LONGITUDE Voting station longitude (might be missing).
CD_SITU_LOCAL_VOTACAO Voting station situation code.
DS_SITU_LOCAL_VOTACAO Voting station situation.
CD_SITU_ZONA Electoral zone situation code.
DS_SITU_ZONA Electoral zone situation.
CD_SITU_SECAO Voting section situation code.
DS_SITU_SECAO Voting section situation.
CD_SITU_LOCALIDADE Locality situation code.
DS_SITU_LOCALIDADE Locality situation.
QT_ELEITOR Total number of registered voters.
QT_ELEITOR_ELEICAO Total number of registered voters in the given electoral.
1 2 3 4 | ## Not run:
df <- voter_profile_by_section(2016)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.