Package: countryatlas 2.0.0

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); and turns one hand-drawn choropleth into a full vocabulary of projected, area-honest maps (binned and quantile choropleths, proportional-symbol, bivariate, cartogram, tile-grid, flow, animated, globe and interactive), and can hand its curated, ISO-reconciled tables to 'ggsql' for database-side spatial rendering. Heavy spatial dependencies stay optional, and a bundled offline snapshot lets every example, test and vignette run without the network.

Authors:Youzhi Yu [aut, cre]

countryatlas_2.0.0.tar.gz
countryatlas_2.0.0.zip(r-4.7)countryatlas_2.0.0.zip(r-4.6)countryatlas_2.0.0.zip(r-4.5)
countryatlas_2.0.0.tgz(r-4.6-any)countryatlas_2.0.0.tgz(r-4.5-any)
countryatlas_2.0.0.tar.gz(r-4.7-any)countryatlas_2.0.0.tar.gz(r-4.6-any)
countryatlas_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
countryatlas/json (API)

# Install 'countryatlas' in R:
install.packages('countryatlas', repos = c('https://pursuitofdatascience.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pursuitofdatascience/countryatlas/issues

Pkgdown/docs site:https://pursuitofdatascience.github.io

Datasets:

On CRAN:

Conda:

countrycodesdatavizeconomics-dataggplot2worldbankworlddataworldmap

4.78 score 1 stars 9 scripts 43 exports 35 dependencies

Last updated from:a6a3281f28. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK178
source / vignettesOK232
linux-release-x86_64OK177
macos-release-arm64OK96
macos-oldrel-arm64OK141
windows-develOK97
windows-releaseOK103
windows-oldrelOK113
wasm-releaseOK186

Exports:aggregate_regionsanimate_worldas_ggsql_sourceattach_geometryaudit_coveragebivariate_mapbubble_mapcartogram_mapcheck_country_matchclear_wdi_cachecomplete_yearsconvert_countrycountry_codescountry_datacountry_groupscountry_joincountry_join_allcountry_overridesfacet_mapflow_mapgeom_country_labelsglobe_mapgrowth_ratein_groupindex_tointeractive_mapjoin_worldlocate_countryper_capitarank_countriesrepair_country_namesshare_of_worldsimplify_geometryspin_globestandardize_countrytheme_world_maptile_mapwdi_searchwdj_overridesworld_dataworld_geometryworld_mapworld_query

Dependencies:cachemclicountrycodecpp11dplyrfarverfastmapgenericsggplot2gluegtableisobandjsonlitelabelinglifecyclemagrittrmemoisepillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLiteWDIwithr

Modern maps with sf & projections
An equal-area, projected choropleth | The world as a globe | Just the canvas | Recentring and the antimeridian | Region subsetting | Simplifying for the web

Last update: 2026-06-23
Started: 2026-06-18

countryatlas and ggsql
Emit a query (no dependencies) | Render in the database | In a Quarto / R Markdown document | Why bother?

Last update: 2026-06-23
Started: 2026-06-23

Beyond the choropleth
Proportional-symbol (bubble) maps | Equal-area tile grids | Flow maps | Labels | Maps that need optional packages

Last update: 2026-06-18
Started: 2026-06-18

countryatlas: Joining World Data to Maps on the ISO Spine
Abstract | Introduction | Core data assembly | world_data() | country_data() and attach_geometry() | Visualising: the choropleth and beyond | One-line choropleths | Proportional-symbol maps | Equal-area tile grids | Flow maps | The join engine | Diagnostics: never lose a country silently | Reference data and code translation | Analysis helpers | Performance and offline use | Conclusion | Session information

Last update: 2026-06-18
Started: 2026-06-18

Getting started
A map-ready tibble in one call | Your first choropleth | Choosing indicators | Next steps

Last update: 2026-06-18
Started: 2026-06-18

Joining your own data
Standardise any frame | One call to a map | Reconcile two messy tables | Check before you trust | Custom origins

Last update: 2026-06-18
Started: 2026-06-18

Readme and manuals

Help Manual

Help pageTopics
Roll countries up to region / income / continentaggregate_regions
Animate a choropleth over timeanimate_world
Export a countryatlas table as a ggsql sourceas_ggsql_source
Attach geometry to a country-level tableattach_geometry
Coverage / missingness auditaudit_coverage
Two-variable bivariate choroplethbivariate_map
Proportional-symbol (bubble) mapbubble_map
Area-honest cartogramcartogram_map
Pre-flight country-match reportcheck_country_match
Clear the on-disk / in-memory WDI cacheclear_wdi_cache
Curated indicator cataloguecommon_indicators
Fill or interpolate panel gapscomplete_years
Friendly country-code conversionconvert_country
The countrycode codelist as a tidy tibblecountry_codes
Lightweight one-row-per-country tablecountry_data
Country-group membershipcountry_groups
Country-group membership (point-in-time)country_groups_tbl
Reconcile and join two messy country tablescountry_join
Join many messy country tables on the ISO spinecountry_join_all
Static per-country metadatacountry_meta
Small-multiple choroplethsfacet_map
Great-circle origin-destination flow mapflow_map
Centroid-anchored country labelsgeom_country_labels
Orthographic globe choroplethglobe_map
Year-on-year (or compound) growth rategrowth_rate
Is a country in a group?in_group
Rebase a series to an index (base year = 100)index_to
Web-ready interactive choroplethinteractive_map
One call: your data, on a mapjoin_world
Tag coordinates with the country that contains themlocate_country
Normalise an indicator by populationper_capita
Add rank, percentile and z-scorerank_countries
Auto-repair country names to their closest known matchrepair_country_names
Each country's share of the world totalshare_of_world
Simplify (thin) geometry for faster plottingsimplify_geometry
Spin the globespin_globe
Add ISO codes and classifications to any data framestandardize_country
A clean theme for world mapstheme_world_map
Equal-area world tile gridtile_map
Search World Bank indicatorswdi_search
Curated country-name overrides (replaces the silent drop-list)country_overrides wdj_overrides
Map-ready, enriched country tibbleworld_data
Geometry without the dataworld_geometry
One-line choropleth, several honest stylesworld_map
Emit a ggsql spatial query for a country mapworld_query
Offline snapshot of world dataworld_snapshot
Equal-area world tile-grid layoutworld_tiles