wdi_get_indicators {wbwdi} | R Documentation |
Download all available World Bank indicators
Description
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.
Usage
wdi_get_indicators(language = "en", per_page = 32500L)
Arguments
language |
A character string specifying the language for the request,
see wdi_get_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. |
Details
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.
Value
A tibble containing the available indicators and their metadata:
- indicator_id
A character string for the ID of the indicator (e.g., "NY.GDP.PCAP.KD").
- indicator_name
A character string for the name of the indicator (e.g., "GDP per capita, constant prices").
- source_id
An integer identifying the data source providing the indicator.
- source_name
A character string describing the source of the indicator data.
- source_note
A character string providing additional notes about the data source.
- source_organization
A character string denoting the organization responsible for the data source.
- topics
A nested tibble containing (possibly multiple) topics associated with the indicator, with two columns: an integer
topic_id
and a charactertopic_name
.
Examples
# Download all supported indicators in English
wdi_get_indicators()
# Download all supported indicators in Spanish
wdi_get_indicators(language = "es")