Skip to contents

Every map here is one call on the bundled snapshot, offline. Each carries its coverage and source in the caption, alt text from map_alt_text(), and a provenance record from map_provenance().

Choropleths

world_map(poly, gdp_per_capita)

Quantile choropleth of GDP per capita.

world_map(poly, gdp_per_capita, breaks = c(-Inf, 1136, 4466, 13846, Inf))

Choropleth with the World Bank income thresholds as fixed classes.

world_map(poly, income)

Categorical map of World Bank income groups.

world_map(poly, gdp_per_capita, recenter = 150)

World map of GDP per capita centred on the Pacific.

set.seed(1)
mix <- transform(snap, farm = runif(nrow(snap), 1, 4),
                 industry = runif(nrow(snap), 2, 6),
                 services = runif(nrow(snap), 4, 9))
ternary_map(attach_geometry(mix), farm, industry, services)

Ternary map of a made-up three-part composition, centred on the average country.

Symbols, flows and grids

bubble_map(snap, population)

Proportional-symbol map of population.

spike_map(snap, population)

Spike map of population.

corridors <- data.frame(
  from = c("Brazil", "Nigeria", "South Africa", "Kenya", "Indonesia", "Peru"),
  to = c("Portugal", "United Kingdom", "United Kingdom", "United Kingdom",
         "Saudi Arabia", "Spain"),
  people = c(1.4, 2.1, 2.6, 1.7, 1.8, 1.2))
flow_map(corridors, from, to, people)

Great-circle arcs between six pairs of countries.

tile_map(snap, gdp_per_capita)

Equal-area tile grid, one square per country.

gridded_cartogram(snap, population, cells = 600)

Gridded cartogram: one square per fixed number of people.

Honest maps

value_by_alpha_map(poly, gdp_per_capita, population)

Value-by-alpha map: GDP per capita in colour, population as opacity.

coverage_map(poly, co2_per_capita)

Map of which countries report CO2 per capita.

classify_compare(poly, gdp_per_capita, ncol = 3)

GDP per capita under six classification methods.

Globes and cartograms

globe_map(sfd, income, lon = 20, lat = 10)

Orthographic globe shaded by income group.

dorling_map(sfd, population)

Dorling cartogram of population.

if (requireNamespace("biscale", quietly = TRUE)) {
  bivariate_map(sfd, gdp_per_capita, life_expectancy)
}

Bivariate choropleth of GDP per capita against life expectancy.

Over time

set.seed(1)
pan <- expand.grid(iso3c = world_tiles$iso3c, year = 2000:2020,
                   stringsAsFactors = FALSE)
pan$v <- stats::ave(stats::rnorm(nrow(pan)), pan$iso3c, FUN = cumsum)
tile_trend_map(pan, v, label = FALSE)

A sparkline of a made-up series for every country on the tile grid.