get_election_data: Descarga bases de resultados electorales (_Download electoral...

View source: R/get_election_data.R

get_election_dataR Documentation

Descarga bases de resultados electorales (Download electoral data)

Description

Función que descarga resultados electorales nacionales desde 2007 (Function that downloads national electoral data since 2007)

Usage

get_election_data(
  district = NULL,
  category = NULL,
  round = NULL,
  year = NULL,
  level = "provincia",
  long = TRUE,
  raw = FALSE
)

Arguments

district

un character con código para Argentina y las 24 provincias (a named character with code for Argentina and the 24 provinces).

category

un character para la categoría electoral: diputado dip, senador sen o presidente presi (a character with a name for the electoral category: deputy dip, senator sen or president presi).

round

un character para tipo de elección: primaria paso o general gral (a character with a name for the election round: primary paso or general gral).

year

un integer para el año de eleccion (an integer for the year of choice).

level

un character para seleccionar level de agregación de los resultados: provincia, departamento o circuito (a character to select the level of aggregation of the results: province provincia, department -departamento or electoral precints circuito).

long

un boleano para estructura de los datos. Por default long = FALSE (a boolean for data structure. By default long = FALSE).

raw

un boleano TRUE/FALSE que define si descargar base de datos desagregada a nivel MESA o no (a TRUE/FALSE boolean to define whether to download disaggregated data at BALLOT level or not)

Value

devuelve un tibble con class "grouped_df", "tbl_df","tbl", "data.frame" con los resultados de una eleccion determinada (returns a tibble with electoral results of interest with class "grouped_df", "tbl_df","tbl", "data.frame").

See Also

get_multiple_elections

Examples

 get_election_data(district = "caba",   
                   category = "dip", 
                   round = "paso", 
                   year = 2011,  
                   level = "provincia", 
                   long = TRUE, raw = FALSE)                    
 

electorArg/polAr documentation built on Oct. 31, 2023, 8:27 a.m.