
Country data from any source, joined on ISO codes and drawn as equal-area maps that state their coverage and source.
🔑 One key for every spelling, in a dozen languages:
library(countryatlas)
d <- data.frame(country = c("Cote d'Ivoire", "Korea, Rep.", "Deutschland", "U.K."))
standardize_country(d, country, add = "iso3c")
#> # A tibble: 4 × 2
#> country iso3c
#> <chr> <chr>
#> 1 Cote d'Ivoire CIV
#> 2 Korea, Rep. KOR
#> 3 Deutschland DEU
#> 4 U.K. GBR🗺️ An equal-area map with its coverage and source in the caption:
world_map(attach_geometry(world_snapshot$countries), gdp_per_capita)
🕰️ Memberships and income groups as of any date, row by row:
in_group(c("GBR", "GBR"), "EU", origin = "iso3c", as_of = c(2016, 2021))
#> [1] TRUE FALSE
classify_countries(data.frame(iso3c = "VNM", year = c(2026, 2027)), "income")
#> iso3c year income
#> 1 VNM 2026 Lower middle income
#> 2 VNM 2027 Upper middle incomeinstall.packages("countryatlas")library(countryatlas): the bundled
world_snapshot and every map work offline, in Equal
Earth.sf backend and every other projection:
install.packages(c("sf", "rnaturalearth", "rnaturalearthdata"))world_data(2020) from the World Bank, or any
provider in country_sources() through
fetch_indicator().world_data(2020, vintage = "2024-07").tools::R_user_dir("countryatlas", "cache");
clear_country_cache() empties it.CURL_CA_BUNDLE at
your organisation’s certificate bundle.The Gallery shows every map verb; the articles cover panels, tracing data to its source and honest maps.