List all country indicators supported by the World Bank API.
Usage
wb_country_indicator(
indicator = "NY.GDP.MKTP.CD",
country = NULL,
lang = "en",
start_date = NULL,
end_date = NULL
)
Arguments
- indicator
(
character(1)
) indicator to query.- country
(
character()
) country to query. DefaultNULL
. IfNULL
, all countries are returned.- lang
(
character(1)
) language to query. Default"en"
.- start_date
(
character(1)
|integer(1)
) start date to query. DefaultNULL
. Supported formats:YYYY for yearly data (e.g.
2020
or"2020"
)YYYYQ[1-4] for quarterly data (e.g. "2020Q1")
YYYYM[1-12] for monthly data (e.g.
"2020M02"
)
- end_date
(
character(1)
|integer(1)
) end date to query, in the same format as start_date. DefaultNULL
.
Value
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.
Examples
wb_country_indicator("NY.GDP.MKTP.CD", "US")
#> date indicator_id indicator_name country_id country_name country_code
#> 1 2023 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 2 2022 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 3 2021 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 4 2020 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 5 2019 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 6 2018 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 7 2017 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 8 2016 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 9 2015 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 10 2014 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 11 2013 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 12 2012 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 13 2011 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 14 2010 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 15 2009 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 16 2008 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 17 2007 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 18 2006 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 19 2005 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 20 2004 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 21 2003 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 22 2002 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 23 2001 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 24 2000 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 25 1999 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 26 1998 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 27 1997 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 28 1996 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 29 1995 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 30 1994 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 31 1993 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 32 1992 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 33 1991 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 34 1990 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 35 1989 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 36 1988 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 37 1987 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 38 1986 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 39 1985 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 40 1984 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 41 1983 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 42 1982 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 43 1981 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 44 1980 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 45 1979 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 46 1978 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 47 1977 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 48 1976 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 49 1975 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 50 1974 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 51 1973 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 52 1972 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 53 1971 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 54 1970 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 55 1969 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 56 1968 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 57 1967 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 58 1966 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 59 1965 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 60 1964 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 61 1963 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 62 1962 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 63 1961 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> 64 1960 NY.GDP.MKTP.CD GDP (current US$) US United States USA
#> value unit obs_status decimal
#> 1 2.772071e+13 <NA> <NA> 0
#> 2 2.600689e+13 <NA> <NA> 0
#> 3 2.368117e+13 <NA> <NA> 0
#> 4 2.135410e+13 <NA> <NA> 0
#> 5 2.153998e+13 <NA> <NA> 0
#> 6 2.065652e+13 <NA> <NA> 0
#> 7 1.961210e+13 <NA> <NA> 0
#> 8 1.880491e+13 <NA> <NA> 0
#> 9 1.829502e+13 <NA> <NA> 0
#> 10 1.760814e+13 <NA> <NA> 0
#> 11 1.688068e+13 <NA> <NA> 0
#> 12 1.625397e+13 <NA> <NA> 0
#> 13 1.559973e+13 <NA> <NA> 0
#> 14 1.504897e+13 <NA> <NA> 0
#> 15 1.447807e+13 <NA> <NA> 0
#> 16 1.476986e+13 <NA> <NA> 0
#> 17 1.447423e+13 <NA> <NA> 0
#> 18 1.381558e+13 <NA> <NA> 0
#> 19 1.303920e+13 <NA> <NA> 0
#> 20 1.221720e+13 <NA> <NA> 0
#> 21 1.145645e+13 <NA> <NA> 0
#> 22 1.092911e+13 <NA> <NA> 0
#> 23 1.058193e+13 <NA> <NA> 0
#> 24 1.025095e+13 <NA> <NA> 0
#> 25 9.631172e+12 <NA> <NA> 0
#> 26 9.062817e+12 <NA> <NA> 0
#> 27 8.577552e+12 <NA> <NA> 0
#> 28 8.073122e+12 <NA> <NA> 0
#> 29 7.639749e+12 <NA> <NA> 0
#> 30 7.287236e+12 <NA> <NA> 0
#> 31 6.858559e+12 <NA> <NA> 0
#> 32 6.520327e+12 <NA> <NA> 0
#> 33 6.158129e+12 <NA> <NA> 0
#> 34 5.963144e+12 <NA> <NA> 0
#> 35 5.641580e+12 <NA> <NA> 0
#> 36 5.236438e+12 <NA> <NA> 0
#> 37 4.855215e+12 <NA> <NA> 0
#> 38 4.579631e+12 <NA> <NA> 0
#> 39 4.338979e+12 <NA> <NA> 0
#> 40 4.037613e+12 <NA> <NA> 0
#> 41 3.634038e+12 <NA> <NA> 0
#> 42 3.343789e+12 <NA> <NA> 0
#> 43 3.207041e+12 <NA> <NA> 0
#> 44 2.857307e+12 <NA> <NA> 0
#> 45 2.627333e+12 <NA> <NA> 0
#> 46 2.351599e+12 <NA> <NA> 0
#> 47 2.081826e+12 <NA> <NA> 0
#> 48 1.873412e+12 <NA> <NA> 0
#> 49 1.684904e+12 <NA> <NA> 0
#> 50 1.545243e+12 <NA> <NA> 0
#> 51 1.425376e+12 <NA> <NA> 0
#> 52 1.279110e+12 <NA> <NA> 0
#> 53 1.164850e+12 <NA> <NA> 0
#> 54 1.073303e+12 <NA> <NA> 0
#> 55 1.017438e+12 <NA> <NA> 0
#> 56 9.402250e+11 <NA> <NA> 0
#> 57 8.596200e+11 <NA> <NA> 0
#> 58 8.130328e+11 <NA> <NA> 0
#> 59 7.419049e+11 <NA> <NA> 0
#> 60 6.841446e+11 <NA> <NA> 0
#> 61 6.370586e+11 <NA> <NA> 0
#> 62 6.036394e+11 <NA> <NA> 0
#> 63 5.619403e+11 <NA> <NA> 0
#> 64 5.419886e+11 <NA> <NA> 0
wb_country_indicator(
"DPANUSSPB", c("CHN", "BRA"),
start_date = "2012M01", end_date = "2012M08"
)
#> date indicator_id
#> 1 2012M08 DPANUSSPB
#> 2 2012M07 DPANUSSPB
#> 3 2012M06 DPANUSSPB
#> 4 2012M05 DPANUSSPB
#> 5 2012M04 DPANUSSPB
#> 6 2012M03 DPANUSSPB
#> 7 2012M02 DPANUSSPB
#> 8 2012M01 DPANUSSPB
#> 9 2012M08 DPANUSSPB
#> 10 2012M07 DPANUSSPB
#> 11 2012M06 DPANUSSPB
#> 12 2012M05 DPANUSSPB
#> 13 2012M04 DPANUSSPB
#> 14 2012M03 DPANUSSPB
#> 15 2012M02 DPANUSSPB
#> 16 2012M01 DPANUSSPB
#> indicator_name
#> 1 Exchange rate, new LCU per USD extended backward, period average,,
#> 2 Exchange rate, new LCU per USD extended backward, period average,,
#> 3 Exchange rate, new LCU per USD extended backward, period average,,
#> 4 Exchange rate, new LCU per USD extended backward, period average,,
#> 5 Exchange rate, new LCU per USD extended backward, period average,,
#> 6 Exchange rate, new LCU per USD extended backward, period average,,
#> 7 Exchange rate, new LCU per USD extended backward, period average,,
#> 8 Exchange rate, new LCU per USD extended backward, period average,,
#> 9 Exchange rate, new LCU per USD extended backward, period average,,
#> 10 Exchange rate, new LCU per USD extended backward, period average,,
#> 11 Exchange rate, new LCU per USD extended backward, period average,,
#> 12 Exchange rate, new LCU per USD extended backward, period average,,
#> 13 Exchange rate, new LCU per USD extended backward, period average,,
#> 14 Exchange rate, new LCU per USD extended backward, period average,,
#> 15 Exchange rate, new LCU per USD extended backward, period average,,
#> 16 Exchange rate, new LCU per USD extended backward, period average,,
#> country_id country_name country_code value unit obs_status decimal
#> 1 BRA Brazil <NA> 2.027870 <NA> <NA> 0
#> 2 BRA Brazil <NA> 2.028727 <NA> <NA> 0
#> 3 BRA Brazil <NA> 2.050643 <NA> <NA> 0
#> 4 BRA Brazil <NA> 1.984978 <NA> <NA> 0
#> 5 BRA Brazil <NA> 1.854405 <NA> <NA> 0
#> 6 BRA Brazil <NA> 1.793045 <NA> <NA> 0
#> 7 BRA Brazil <NA> 1.716810 <NA> <NA> 0
#> 8 BRA Brazil <NA> 1.788864 <NA> <NA> 0
#> 9 CHN China <NA> 6.359739 <NA> <NA> 0
#> 10 CHN China <NA> 6.371227 <NA> <NA> 0
#> 11 CHN China <NA> 6.363810 <NA> <NA> 0
#> 12 CHN China <NA> 6.324130 <NA> <NA> 0
#> 13 CHN China <NA> 6.303810 <NA> <NA> 0
#> 14 CHN China <NA> 6.313545 <NA> <NA> 0
#> 15 CHN China <NA> 6.300286 <NA> <NA> 0
#> 16 CHN China <NA> 6.313091 <NA> <NA> 0