View source: R/get_country_info_cl.R
get_country_info_cl | R Documentation |
Retrieves comprehensive country information for Chile from the REST Countries API. This function fetches data including official and common names, geographical information, capital, area, population, and languages.
get_country_info_cl()
This function makes a request to the REST Countries API v3.1 endpoint specifically for Chile using full text search. It handles API errors gracefully and returns NULL if the request fails or no data is found.
A tibble with one row containing Chile's country information:
Common name of the country
Official name of the country
Geographic region
Geographic subregion
Capital city(ies)
Total area in square kilometers
Total population
Languages spoken (comma-separated)
# Get Chile information
cl_info <- get_country_info_cl()
print(cl_info)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.