View source: R/list_supported_countries.R
list_supported_countries | R Documentation |
This function retrieves and processes a list of all countries supported by the World Bank API, along with metadata such as region, administrative region, income level, and lending type. The user can specify the language of the API response.
list_supported_countries(language = "en", per_page = 1000)
language |
A character string specifying the language for the request, see list_supported_languages. Defaults to |
per_page |
An integer specifying the number of results per page for the API. Defaults to 1000. Must be a value between 1 and 32,500. |
This function sends a request to the World Bank API to retrieve data for all supported countries in the specified language. The data is then processed into a tidy format and includes information about the country, such as its ISO code, capital city, geographical coordinates, and additional nested metadata about regions, income levels, and lending types.
A tibble containing country information along with associated metadata. The tibble includes the following columns:
The identifier for the country.
The ISO 2-character country code.
The full name of the country.
The capital city of the country.
The longitude of the country.
The latitude of the country.
A nested tibble containing information about the region the country belongs to.
A nested tibble containing information about the administrative region the country belongs to.
A nested tibble containing information about the income level classification of the country.
A nested tibble containing information about the lending type classification of the country.
# List all supported countries in English
list_supported_countries(language = "en")
# List all supported countries in Spanish
list_supported_countries(language = "zh")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.