Learn R Programming

electionsBR (version 0.3.2)

voter_profile_by_section: Download data on the voters' profile by vote section

Description

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.

Usage

voter_profile_by_section(
  year,
  ascii = FALSE,
  encoding = "windows-1252",
  export = FALSE,
  temp = TRUE
)

Value

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.

Arguments

year

Election year (integer). For this function, the following years are available: 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008, 2010, 2012, 2014, 2016, 2018 and 2020.

ascii

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

encoding

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

export

(logical). Should the downloaded data be saved in .dta and .sav in the current directory?

temp

(logical). If TRUE, keep the temporary compressed file for future use (recommended)

Details

If export is set to TRUE, the downloaded data is saved as .dta and .sav files in the current directory.

Examples

Run this code
if (FALSE) {
df <- voter_profile_by_section(2016)
}

Run the code above in your browser using DataLab