View source: R/get_colombia_presidents.R
| get_colombia_presidents | R Documentation |
Retrieves comprehensive information about all Colombian presidents from 1886 to present from the API Colombia service. This function fetches data including names, political parties, government periods, descriptions, and biographical information for each president.
get_colombia_presidents()
This function sends a GET request to the API Colombia service.
If the API request fails or returns an error status code,
the function returns NULL with an informative message.
A tibble with the following columns:
id: President identifier (integer)
name: President's first name(s) (character)
last_name: President's last name(s) (character)
political_party: Political party affiliation (character)
start_period_date: Start date of presidency (character, YYYY-MM-DD format)
end_period_date: End date of presidency (character, YYYY-MM-DD format or NULL for current)
Requires internet connection.
API Colombia: https://api-colombia.com/api/v1/President
GET, fromJSON, as_tibble
if (interactive()) {
get_colombia_presidents()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.