How it works
A map where countries are resized by a number is called a cartogram. The data fixes only one thing: each country’s area. Infinitely many maps get every area right, so each method is a different rule for choosing one. Stretchy Maps offers two, both written from published mathematics rather than borrowed code. You are welcome to use the same maths.
Heat flow
- Give every country a density: the area it should have divided by the area it has. Set the ocean’s density so the whole map’s “mass” exactly fills it.
- Let that density spread out the way heat does, until it is the same everywhere. In frequency space every wave simply fades: ρ̂(k,t) = ρ̂(k,0)·e−|k|²t.
- Because mass is conserved, the spreading implies a flow, v = −∇ρ/ρ, and every border point rides it.
- When the density is even, every area matches its number. A few passes clean up rounding.
The flow is smooth, so borders cannot pass through each other. Tiny crossings can still come from rounding on the grid, and the map counts them.
Rubber sheet
Each country is treated as a circle of its current area (radius R) that wants to be a circle of its target area (radius r). It pushes the map around it by M = r − R, fading with distance: F = M·(R/d)k outside the circle and F = M·(d/R)²·(4 − 3d/R) inside. Repeat until areas settle. It is fast, but nothing stops borders folding over, so folds are outlined in red.
How accurate is it?
After each calculation the map reports the median and worst area error for every country bigger than 0.1% of the world’s land, plus any inside-out borders and crossings. The pre-computed population map has a median error below 0.1% and a worst error of 0.7%.
Limits
- City-states and small islands. Places like Singapore and Hong Kong start smaller than one grid cell and cannot grow to their full size. They are reported as “specks”.
- Missing data. Places without figures keep their true size and are shown in grey.
- Borders are simplified from Natural Earth’s 1:50 million data. Some borders are disputed; drawing one is not a position on it.
Privacy
Every calculation runs in your browser. Numbers you paste are never sent anywhere. See the privacy policy.
References
- Fourier, J. (1822). Théorie analytique de la chaleur.
- Gastner, M. T. & Newman, M. E. J. (2004). Diffusion-based method for producing density-equalizing maps. PNAS 101, 7499–7504.
- Gastner, M. T., Seguy, V. & More, P. (2018). Fast flow-based algorithm for creating density-equalizing map projections. PNAS 115, E2156–E2164.
- Dougenik, J. A., Chrisman, N. R. & Niemeyer, D. R. (1985). An algorithm to construct continuous area cartograms. The Professional Geographer 37(1), 75–81.
- Šavrič, B., Patterson, T. & Jenny, B. (2018). The Equal Earth map projection. International Journal of Geographical Information Science.