View source: R/get_argentine_deputies.R
get_argentine_deputies | R Documentation |
This function retrieves a list of Argentine deputies from the public API endpoint 'https://api.argentinadatos.com/v1/diputados/diputados'. It includes basic information and the official mandate period of each deputy.
get_argentine_deputies()
The data is returned in descending order of the start date (inicio
), showing the
most recent mandates first.
A tibble with the following columns:
id
: Unique identifier for the deputy.
nombre
: First name of the deputy.
apellido
: Last name of the deputy.
genero
: Gender of the deputy.
provincia
: Province represented.
inicio
: Start date of the mandate period (Date).
fin
: End date of the mandate period (Date).
Requires internet connection. If 'inicio' or 'fin' dates are malformed, parsing may fail.
GET
, fromJSON
, arrange
## Not run:
deputies <- get_argentine_deputies()
head(deputies)
# Filter currently active deputies
active <- dplyr::filter(deputies, Sys.Date() <= fin)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.