Learn R Programming

ArgentinAPI (version 0.1.0)

get_presidential_events: Get Presidential Events in Argentina

Description

This function retrieves the list of presidential events in Argentina from the API `https://api.argentinadatos.com/v1/eventos/presidenciales`. It returns a structured data frame with the event date, type, and description.

Usage

get_presidential_events()

Arguments

Value

A data frame (tibble) with the following columns:

  • fecha: Date of the event (character, format YYYY-MM-DD).

  • tipo: Type of event (e.g., speech, announcement).

  • evento: Description or name of the event.

Details

This function sends a GET request to the ArgentinaDatos API and processes the JSON response into a structured data frame. The events are not filtered by year and include all available historical data. If the API does not return a 200 status code, a message is displayed and NULL is returned.

See Also

Examples

Run this code
if (FALSE) {
# Retrieve presidential events
events <- get_presidential_events()
print(events)

# View only events after 2020
events %>%
  dplyr::filter(fecha >= "2020-01-01")
}

Run the code above in your browser using DataLab