View source: R/get_country_info_br.R
get_country_info_br | R Documentation |
Retrieves comprehensive country information for Brazil from the REST Countries API. This function fetches data including official and common names, geographical information, capital, area, population, and languages.
get_country_info_br()
This function makes a request to the REST Countries API v3.1 endpoint specifically for Brazil 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 Brazil'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 Brazil information
br_info <- get_country_info_br()
print(br_info)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.