View source: R/list_supported_indicators.R
list_supported_indicators | R Documentation |
This function retrieves a comprehensive list of all indicators supported by the World Bank API. The indicators include metadata such as the indicator ID, name, unit, source, and associated topics. The user can specify the language of the API response and whether to include additional details.
list_supported_indicators(
language = "en",
per_page = 32500,
include_details = FALSE,
progress = TRUE
)
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 32,500. Must be a value between 1 and 32,500. |
include_details |
A logical value indicating whether to include additional details such as |
progress |
A logical value indicating whether to show progress messages during the data parsing process. Defaults to |
This function makes a request to the World Bank API to retrieve metadata for all available indicators.
It processes the response into a tidy tibble format. If the include_details
parameter is FALSE
, the result
will only include basic indicator information (ID, name, source note, and organization). If include_details
is TRUE
,
additional metadata such as the indicator's unit, source ID and value, and associated topics will be included.
If the progress
parameter is set to TRUE
, messages will be displayed during the request and parsing process.
A tibble containing the available indicators and their metadata. Depending on the value of include_details
,
the tibble includes the following columns:
The ID of the indicator (e.g., "NY.GDP.PCAP.KD").
The name of the indicator (e.g., "GDP per capita, constant prices").
The unit of measurement for the indicator, if available (e.g., "US Dollars"). Included only if include_details = TRUE
.
The ID of the data source providing the indicator. Included only if include_details = TRUE
.
The name or description of the source of the indicator data. Included only if include_details = TRUE
.
Additional notes or descriptions about the data source.
The organization responsible for the data source.
A nested tibble containing topics associated with the indicator, with two columns: topic_id
and topic_value
.
Included only if include_details = TRUE
.
# List all supported indicators in English
list_supported_indicators(language = "en")
# List all supported indicators in Spanish
list_supported_indicators(language = "es", include_details = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.