Learn R Programming

electionsBR (version 0.3.1)

personal_finances_local: Download data on local candidates' personal financial disclosures

Description

personal_finances_local() downloads and aggregates the data on local candidates' personal financial disclosures. The function returns a data.frame where each observation corresponds to a candidate's property.

Usage

personal_finances_local(year, uf = "all", ascii = FALSE,
  encoding = "latin1", export = FALSE)

Arguments

year

Election year. For this function, only the years 1996, 2000, 2004, 2008, 2012 and 2016 are available.

uf

Federation Unit acronym (character vector).

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.

export

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

Value

assets_candidate_local() returns a data.frame with the following variables:

  • DATA_GERACAO: Generation date of the file (when the data was collected).

  • HORA_GERACAO: Generation time of the file (when the data was collected), Brasilia Time.

  • ANO_ELEICAO: Election year.

  • DESCRICAO_ELEICAO: Description of the election.

  • SIGLA_UF: Units of the Federation's acronym in which occurred the election.

  • SQ_CANDIDATO: Candidate's ID ID attributed by TSE.

  • CD_TIPO_BEM_CANDIDATO: Code of the property.

  • DS_TIPO_BEM_CANDIDATO: Description of the property.

  • DETALHE_BEM: Addional details of the property.

  • VALOR_BEM: Value, in current Brazilian reais, of the property.

  • DATA_ULT_TOTALIZACAO: Date of the last totalization in that city and zone.

  • HORA_ULT_TOTALIZACAO: Time of the last totalization in that city and zone.

Details

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

See Also

personal_finances_fed for personal financial disclosures of running candidates in federal elections.

Examples

Run this code
# NOT RUN {
df <- personal_finances_local(2000)
# }

Run the code above in your browser using DataLab