Description Usage Arguments Details Value Examples
View source: R/voter_profile.R
voter_profile()
downloads and cleans data on the voters' profile aggregated by state, city and electoral zone.
The function returns a data.frame
where each observation corresponds to a voter profile type.
1 2 3 4 5 6 7 | voter_profile(
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:
PERIODO: Election year.
UF: Units of the Federation's acronym in which occurred the election.
MUNICIPIO: Municipality name.
COD_MUNICIPIO_TSE: Municipal's Supreme Electoral Court code (number).
NR_ZONA: Electoral zone's Supreme Electoral Court code (number).
SEXO: Voters' sex.
FAIXA_ETARIA: Voters' age group.
GRAU_DE_ESCOLARIDADE: Voters' education degree.
QTD_ELEITORES_NO_PERFIL: Absolute number of voters.
1 2 3 4 | ## Not run:
df <- voter_profile(2002)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.