municipios: Download data at the municipality level
Description
`municipios()` downloads, formats and imports to the environment the electoral results data of the selected election at the municipality level.
Usage
municipios(tipo_eleccion, anno, mes, distritos = FALSE)
Value
Dataframe with the electoral results data at the municipality level.
Arguments
tipo_eleccion
The type of choice you want to download. The accepted values are "congreso", "senado", "europeas" o "municipales".
anno
The year of the election in YYYY format.
mes
The month of the election in MM format.
distritos
Should district level results be returned when available? The default is FALSE. Please be aware when summarizing the data that districts = TRUE will return separate rows for the total municipal level and for each of the districts.
ua <- "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko)"options(HTTPUserAgent = ua)
data <- municipios(tipo_eleccion = "congreso", anno = "2019", mes = "11")
str(data)