Learn R Programming

polAr (version 0.2.0.1)

get_election_data: Descarga bases de resultados electorales (Download electoral data)

Description

Funci<U+00F3>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<U+00F3>digo para Argentina y las 24 provincias (a named character with code for Argentina and the 24 provinces).

category

un character para la categor<U+00ED>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<U+00F3>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<U+00F1>o de eleccion (an integer for the year of choice).

level

un character para seleccionar level de agregaci<U+00F3>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

Run this code
# NOT RUN {
 get_election_data(district = "caba",   
                   category = "dip", 
                   round = "paso", 
                   year = 2011,  
                   level = "provincia", 
                   long = TRUE, raw = FALSE)                    
 
# }

Run the code above in your browser using DataLab