View source: R/qry_elections.R
elections | R Documentation |
This function gets election data from a repository.
elections(
elec,
year,
month = NULL,
ine_geo_code = NULL,
by = NULL,
output = "summary"
)
elec |
Character. Type of election "congreso", "senado", "municipio", "referendum", "europeas", "cabildo" |
year |
Numeric. Year of the election. |
month |
Numeric. Month of the election. Only necessary for 2019 "congreso" and "senado". Default is 'NULL'. |
ine_geo_code |
Character. INE geographical code to retrieve the results from a given area that might include up to "mesa". Default is 'NULL'. |
by |
Character. Level at which data is retrieved: "nacional", "comunidad", "provincia", "municipio", "distrito", "seccion", "mesa". The level must be at the same or lower level than 'ine_geo_code' if specified. dEfault is 'NULL'. |
output |
Character. Type of output "summary" (default). |
A data frame containing the election results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.