details_mun_zone_local() downloads and aggregates the data on the verification of local elections in Brazil, disaggregated by electoral zone. The function returns a data.frame where each observation corresponds to a town/zone.

details_mun_zone_local(year, uf = "all", ascii = FALSE,
  encoding = "Latin-1", 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

details_mun_zone_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.

  • NUM_TURNO: Round number.

  • DESCRICAO_ELEICAO: Description of the election.

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

  • SIGLA_UE: Units of the Federation's acronym (In case of major election is the FU's acronym in which the candidate runs for (text) and in case of municipal election is the municipal's Supreme Electoral Court code (number)). Assume the special values BR, ZZ and VT to designate, respectively, Brazil, Overseas and Absentee Ballot.

  • CODIGO_MUNICIPIO: Supreme Electoral code from the city where occurred the election.

  • NOME_MUNICIPIO: Name of the city where occurred the election.

  • CODIGO_CARGO: Code of the position that the candidate runs for.

  • DESCRICAO_CARGO: Description of the position that the candidate runs for.

  • QTD_APTOS: Number of eligible voters to vote in that city and zone.

  • QTD_SECOES: Number of existing polling stations in that city and zone. It only considers main sections.

  • QTD_SECOES_AGREGADAS: Number of polling stations that have been aggregated for the voting the same ballot box in that city and area. To add sections means to unite polling stations in a single receiving table votes, in order to meet the Electoral Code, which establishes, as a rule, a minimum of 50 voters in a section election, and to optimize the use of resources for the polls electronic and poll workers.

  • QTD_APTOS_TOT: Number of eligible voters in the total sections.

  • QTD_SECOES_TOT: Total number of polling stations in that city and area.

  • QTD_COMPARECIMENTO: Number of voters who attended the elections in city and district in that position.

  • QTD_ABSTENCOES: Number of voters who did not attend the elections in city and area.

  • QTD_VOTOS_NOMINAIS: Total number of nominal votes in that city and zone.

  • QTD_VOTOS_BRANCOS: Total number of blank votes in that city and zone.

  • QTD_VOTOS_NULOS: Total number of spoilt votes in that city and zone.

  • QTD_VOTOS_LEGENDA: Total number of votes in coalitions in that city and zone.

  • QTD_VOTOS_ANULADOS_APU_SEP: Amount of canceled votes and votes counted separately in that city and zone. This number reflects the votes coming from some ballot box that is sub-judice. They are not yet valid votes or null until the decision of the electoral court.

  • 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.

  • TRANSITO: Electoral result outside the candidates' district? (N for no).

  • QTD_VOTOS_ANULADOS: Total number of votes invalidated by Brazilian Electoral Supreme Court.

Details

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

Note

For the elections prior to 2000, some information can be incomplete.

See also

details_mun_zone_fed for federal elections in Brazil.

Examples

not_run({ df <- details_mun_zone_local(2000) })