countryatlas: Join World Bank Data, Country Codes and Maps on the ISO Spine

A complete toolkit for getting country data onto honest maps. Country names rarely line up across data sources ("US", "U.S.", "United States", "United States of America" are one country, but a naive join treats them as four), so 'countryatlas' makes ISO codes the universal join key. It generalises a one-call, map-ready table that stitches together 'ggplot2' map geometry, 'WDI' World Bank indicators and the 'countrycode' Rosetta stone; exposes the join machinery for the user's own data; ships curated reference data (metadata, group memberships, an indicator catalogue, flags and currencies); adds analysis helpers (per-capita, regional roll-ups, ranking, inequality and convergence statistics); and turns one hand-drawn choropleth into a full vocabulary of projected, area-honest maps (binned and quantile choropleths, proportional-symbol, spike, bivariate, value-by-alpha, cartogram, tile-grid, flow, small-multiple, animated, globe and interactive), and can hand its curated, ISO-reconciled tables to 'ggsql' for database-side spatial rendering. Honesty is treated as a feature rather than a slogan: classification methods can be compared side by side, missing data can be hatched rather than greyed, coverage and provenance travel with the plot, and the distortion each projection introduces can be measured and drawn. Heavy spatial dependencies stay optional, and a bundled offline snapshot lets every example, test and vignette run without the network.

Version: 3.0.0
Depends: R (≥ 4.1.0)
Imports: cachem, cli, countrycode, dplyr, ggplot2, grDevices, memoise, parallel, rlang, stats, tibble, tidyr, tools, utils, WDI
Suggests: biscale, cartogram, cartogramR, classInt, comtradr, covr, cshapes, DBI, duckdb, eurostat, gganimate, ggiraph, ggpattern, ggrepel, ggsql, gifski, giscoR, gt, knitr, leaflet, magick, mapgl, mapproj, maps, nanoarrow, OECD, owidR, plotly, regions, rmapshaper, rmarkdown, rnaturalearth, rnaturalearthdata, scales, sf, spdep, stringdist, testthat (≥ 3.2.0), tmap, units, vdiffr, withr
Published: 2026-10-01
DOI: 10.32614/CRAN.package.countryatlas
Author: Youzhi Yu [aut, cre]
Maintainer: Youzhi Yu <yuyouzhi666 at icloud.com>
BugReports: https://github.com/PursuitOfDataScience/countryatlas/issues
License: GPL (≥ 3)
URL: https://pursuitofdatascience.github.io/countryatlas/, https://github.com/PursuitOfDataScience/countryatlas
NeedsCompilation: no
Language: en-GB
Citation: countryatlas citation info
Materials: README, NEWS
CRAN checks: countryatlas results

Documentation:

Reference manual: countryatlas.html , countryatlas.pdf
Vignettes: Beyond the choropleth (source, R code)
countryatlas and ggsql (source, R code)
countryatlas: Joining World Data to Maps on the ISO Spine (source, R code)
Getting started (source, R code)
Honest maps: classification, missingness and distortion (source, R code)
Joining your own data (source, R code)
Modern maps with sf & projections (source, R code)

Downloads:

Package source: countryatlas_3.0.0.tar.gz
Windows binaries: r-devel: countryatlas_2.0.1.zip, r-release: countryatlas_2.0.1.zip, r-oldrel: countryatlas_2.0.1.zip
macOS binaries: r-release (arm64): countryatlas_2.0.1.tgz, r-oldrel (arm64): countryatlas_2.0.1.tgz, r-release (x86_64): countryatlas_3.0.0.tgz, r-oldrel (x86_64): countryatlas_3.0.0.tgz
Old sources: countryatlas archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=countryatlas to link to this page.