List all countries supported by the World Bank API.
Arguments
- country
(
NULL|character())
Country to query. DefaultNULL. IfNULL, all countries are returned.- lang
(
character(1))
Language to query. Default"en".
Value
A data.frame() with the available countries. The columns are:
country_id: The country ID.country_code: The country code.country_name: The country name.region_id: The region ID.region_code: The region code.region_value: The region value.admin_region_id: The admin region ID.admin_region_code: The admin region code.admin_region_value: The admin region value.income_level_id: The income level ID.income_level_code: The income level code.income_level_value: The income level value.lending_type_id: The lending type ID.lending_type_code: The lending type code.lending_type_value: The lending type value.capital_city: The capital city.longitude: The longitude.latitude: The latitude.
See also
Other indicators data:
wb_income_level(),
wb_indicator(),
wb_language(),
wb_lending_type(),
wb_region(),
wb_source(),
wb_topic()
Examples
# \donttest{
country <- wb_country()
head(country)
#> country_id country_code country_name region_id region_code
#> 1 ABW AW Aruba LCN ZJ
#> 2 AFE ZH Africa Eastern and Southern NA NA
#> 3 AFG AF Afghanistan MEA ZQ
#> 4 AFR A9 Africa NA NA
#> 5 AFW ZI Africa Western and Central NA NA
#> 6 AGO AO Angola SSF ZG
#> region_value admin_region_id
#> 1 Latin America & Caribbean <NA>
#> 2 Aggregates <NA>
#> 3 Middle East, North Africa, Afghanistan & Pakistan MNA
#> 4 Aggregates <NA>
#> 5 Aggregates <NA>
#> 6 Sub-Saharan Africa SSA
#> admin_region_code
#> 1 <NA>
#> 2 <NA>
#> 3 XQ
#> 4 <NA>
#> 5 <NA>
#> 6 ZF
#> admin_region_value
#> 1 <NA>
#> 2 <NA>
#> 3 Middle East, North Africa, Afghanistan & Pakistan (excluding high income)
#> 4 <NA>
#> 5 <NA>
#> 6 Sub-Saharan Africa (excluding high income)
#> income_level_id income_level_code income_level_value lending_type_id
#> 1 HIC XD High income LNX
#> 2 NA NA Aggregates <NA>
#> 3 LIC XM Low income IDX
#> 4 NA NA Aggregates <NA>
#> 5 NA NA Aggregates <NA>
#> 6 LMC XN Lower middle income IBD
#> lending_type_code lending_type_value capital_city longitude latitude
#> 1 XX Not classified Oranjestad -70.0167 12.51670
#> 2 <NA> Aggregates <NA> NA NA
#> 3 XI IDA Kabul 69.1761 34.52280
#> 4 <NA> Aggregates <NA> NA NA
#> 5 <NA> Aggregates <NA> NA NA
#> 6 XF IBRD Luanda 13.2420 -8.81155
# }