Lab 9: Geospatial Visualization

1. Dataset description

GDP — lab9_gdp_2025_top50.csv
The 50 largest economies by 2025 nominal GDP in current U.S. dollars, from the IMF World Economic Outlook, October 2025 (some values are IMF staff estimates and may be revised). Columns iso3, country, gdp_2025_billion_usd, rank. Values run from $300 billion (Kazakhstan) to $30.6 trillion (United States), a 100-fold range; together they total $109.7 trillion, and the U.S. and China alone hold 46% of it.
Missing data
The 191 features outside the top 50 have no GDP value in this file. They are drawn hatched grey in both maps and never as zero.

2. 2025 GDP Choropleth

Colour classes
Loading the map…

On the log-spaced classes every class is used and economies an order of magnitude apart look different, at the cost that each step means about twice as much; rather than “5 trillion more”. Scroll or pinch to zoom, drag to pan, click to keep a country selected.

3. 2025 GDP Cartogram

Area Land GDP

Area represents GDP. Each of the 50 economies covers a share of the map equal to its share of their combined $109.7 trillion.

Loading the cartogram…

A contiguous diffusion cartogram (Gastner & Newman, 2004) where every economy is within 4.2% of its target area and 46 of 50 are within 1%. Hatched countries have no GDP value: they are kept so the map stays connected and together hold a fixed placeholder 10% of the area, split by land area, so their size is not GDP.

Table view: GDP, land share and cartogram share for all 50 economies
Rank Economy GDP ($B) Share of top-50 GDP Share of land Share of cartogram Cartogram ÷ land

4. Design and comparison

On the choropleth the eye goes first to land: Russia and Canada cover more of the map than the dark United States and China, Brazil and Australia nearly as much, though Russia's economy is a twelfth of America's. On the cartogram the U.S. (25% of the area) and China (16%) dominate, followed by Germany, Japan, India and the United Kingdom.

Small, rich economies grow most: the Netherlands ×40, Taiwan and Switzerland ×27, South Korea ×21, Britain ×18, and Singapore, invisible on the choropleth, ends up larger than Malaysia. Kazakhstan (×0.1), Russia (×0.2), Canada, Australia and Brazil (×0.3) shrink.

The choropleth preserves position, shape, size and adjacency, so it suits locating a country, seeing regional patterns (dense mid-blue across Europe and East Asia, almost all of Africa without data) and reading a value class. But colour is read only coarsely: $2.3 and $2.5 trillion look identical, and big pale countries outweigh small dark ones.

The cartogram keeps neighbours and rough position but distorts shape, size and distance: Africa and Central Asia nearly vanish while Europe swells. It suits magnitude tasks, such as comparing totals or seeing that Germany alone (4.1% of the map) outweighs Brazil, Argentina, Colombia, Chile and Peru together (3.3%). Moving GDP from colour to area turns it from a label on the land into the land itself; concentration becomes visible, at the cost of recognisability.

Method and design choices

Projection. Both maps use Equal Earth (d3.geoEqualEarth), an equal-area projection, so on the choropleth a country's size is its true land area, and the cartogram starts from true areas rather than Mercator's inflated Canada and Russia. The choropleth is drawn with d3.geoPath().projection(projection); the cartogram's coordinates are already planar, so it is drawn with d3.geoPath() and a fitted d3.geoIdentity().

Cartogram. GDP is spread over a 1024×512 grid as a density and allowed to diffuse until it is uniform; every vertex moves with the flow, to ensure borders never cross with each other. Eight passes bring every economy within 4.2% of its target area. A first attempt with the rubber-sheet algorithm of Dougenik et al. (1985), which topogram uses, left France at 13% of its target. The cartogram file keeps every vertex of the original, which is what makes the land-to-GDP morph possible.

Colour. One blue sequential ramp, light to dark, for GDP on the choropleth. The cartogram uses a single flat blue so that area is its only GDP channel, with names printed where they fit. Missing data is a hatched neutral grey in both maps, so it cannot be read as the lightest GDP class.

← Back to home