| wb_data | R Documentation |
List all country indicators supported by the World Bank API.
wb_data(
indicator = "NY.GDP.MKTP.CD",
country = NULL,
lang = "en",
start_date = NULL,
end_date = NULL,
mrv = NULL,
gapfill = FALSE
)
wb_country_indicator(
indicator = "NY.GDP.MKTP.CD",
country = NULL,
lang = "en",
start_date = NULL,
end_date = NULL,
mrv = NULL,
gapfill = FALSE
)
indicator |
( |
country |
( |
lang |
( |
start_date |
(
|
end_date |
( |
mrv |
( |
gapfill |
( |
A data.frame() with the available country indicators.
The columns are:
date: The date
indicator_id: The indicator ID.
indicator_name: The indicator name.
country_id: The country ID.
country_name: The country name.
country_code: The country code.
value: The indicator value.
unit: The indicator unit.
obs_status: The observation status.
decimal: The decimal.
https://api.worldbank.org/v2/country/{country}/indicator/{indicator}
# single indicator for a single country (all available years)
ind <- wb_data("NY.GDP.MKTP.CD", "US")
head(ind)
# multiple indicators for multiple countries (2015-2023)
ind <- wb_data(
indicator = c("NY.GDP.MKTP.CD", "FP.CPI.TOTL.ZG"),
country = c("US", "DE", "FR", "CH", "JP"),
start_date = 2015, end_date = 2023
)
head(ind)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.