View source: R/get_colombia_departments.R
| get_colombia_departments | R Documentation |
Retrieves comprehensive information about all Colombian departments from the API Colombia service. This function fetches data including department names, capitals, geographical information, area, population, and administrative details for all 32 departments plus Bogotá D.C.
get_colombia_departments()
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: Department identifier (integer)
name: Department name (character)
capital: Capital city name (character)
surface: Department area in km² (integer)
population: Department population (integer)
municipalities: Number of municipalities (integer)
phone_prefix: Phone area code (character)
region_id: Geographic region identifier (integer)
Requires internet connection.
API Colombia: https://api-colombia.com/api/v1/Department
GET, fromJSON, as_tibble
if (interactive()) {
get_colombia_departments()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.