How it works

Updated 25 September 2026

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

  1. 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.
  2. 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.
  3. Because mass is conserved, the spreading implies a flow, v = −∇ρ/ρ, and every border point rides it.
  4. 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

Privacy

Every calculation runs in your browser. Numbers you paste are never sent anywhere. See the privacy policy.

References