Skip to contents

Core data assembly

One call to a map-ready table, the light analysis table, and bare geometry.

world_data()
Map-ready, enriched country tibble
country_data()
Lightweight one-row-per-country table
world_geometry()
Geometry without the data
locate_country()
Tag coordinates with the country that contains them

The join engine

The package’s mission, exposed for your own data.

standardize_country()
Add ISO codes and classifications to any data frame
join_world()
One call: your data, on a map
attach_geometry()
Attach geometry to a country-level table
country_join()
Reconcile and join two messy country tables
country_join_all()
Join many messy country tables on the ISO spine

Diagnostics & data quality

Never lose a country silently.

check_country_match()
Pre-flight country-match report
repair_country_names()
Auto-repair country names to their closest known match
wdj_overrides() country_overrides()
Curated country-name overrides (replaces the silent drop-list)
audit_coverage()
Coverage / missingness audit

Reference data & code translation

convert_country()
Friendly country-code conversion
country_codes()
The countrycode codelist as a tidy tibble
country_groups()
Country-group membership
in_group()
Is a country in a group?
wdi_search()
Search World Bank indicators

Analysis helpers

per_capita()
Normalise an indicator by population
aggregate_regions()
Roll countries up to region / income / continent
rank_countries()
Add rank, percentile and z-score
complete_years()
Fill or interpolate panel gaps
growth_rate()
Year-on-year (or compound) growth rate
index_to()
Rebase a series to an index (base year = 100)
share_of_world()
Each country's share of the world total

Visualization

A full vocabulary of projected, area-honest maps.

world_map()
One-line choropleth, several honest styles
globe_map()
Orthographic globe choropleth
spin_globe()
Spin the globe
facet_map()
Small-multiple choropleths
bubble_map()
Proportional-symbol (bubble) map
bivariate_map()
Two-variable bivariate choropleth
cartogram_map()
Area-honest cartogram
tile_map()
Equal-area world tile grid
flow_map()
Great-circle origin-destination flow map
animate_world()
Animate a choropleth over time
interactive_map()
Web-ready interactive choropleth
geom_country_labels()
Centroid-anchored country labels
theme_world_map()
A clean theme for world maps
simplify_geometry()
Simplify (thin) geometry for faster plotting

Database rendering (ggsql)

Hand curated tables to ggsql for database-side spatial rendering.

as_ggsql_source()
Export a countryatlas table as a ggsql source
world_query()
Emit a ggsql spatial query for a country map

Performance & caching

clear_wdi_cache()
Clear the on-disk / in-memory WDI cache

Bundled datasets

world_snapshot
Offline snapshot of world data
country_meta
Static per-country metadata
common_indicators
Curated indicator catalogue
country_groups_tbl
Country-group membership (point-in-time)
world_tiles
Equal-area world tile-grid layout

Package

countryatlas countryatlas-package
countryatlas: join World Bank data, country codes and maps on the ISO spine