World Population Density

December 4, 2026

Reading Time: 3 minutes

Categories: science

Tags: maps population log-scale h3 clickhouse earth data

While playing with ADS-B Exposed I switched from the aircraft to the Population dataset and picked the Log density view. The whole planet, one pixel at a time, coloured by how many people live there:

Contents

The data

  • Kontur Population 2023 (CC BY 4.0, © OpenStreetMap contributors): the population of the whole world in 400 m hexagons (Uber’s H3 grid, resolution 8), about 33 million cells. Kontur builds it by fusing the GHSL satellite built-up layer, Facebook’s high resolution settlement data, Microsoft building footprints, Copernicus land cover and OpenStreetMap.
  • ADS-B Exposed keeps those hexagons in a ClickHouse table and, for every map tile, runs an SQL query that sums the hexagons falling into each pixel and returns the pixel colours. The counter in the corner said this view read 12.97 million rows at 159 million rows per second.

Why a log scale

The number of people per pixel goes from zero in the Sahara to millions in Dhaka or Shanghai: seven orders of magnitude. With linear colours only a few megacities would light up and everything else would look empty. On a log scale every tenfold step gets the same share of colour, so a village and a megacity fit on the same map.

The whole colour scale is three lines of the query:

sum(population) AS total,
least(1, log10(1 + total) / 7) AS l,
255 * l AS red, 255 * (1 - abs(l - 0.5) * 2) AS green, 255 * (1 - l) AS blue
  • blue: a handful of people
  • green: around 3,000, the middle of the scale
  • orange: hundreds of thousands
  • red: 10 million or more, where the scale stops
  • no colour: nobody at all

A pixel covers more ground the further you zoom out, so the colours are relative to the zoom level.

What stands out

  • The Nile: a thin green and orange thread through the dark Sahara. About 95% of Egyptians live in the Nile valley and delta, around 4% of the country’s land.
  • The Hu Line: China splits on a diagonal from Heihe, on the Russian border, to Tengchong, near Myanmar. East of it, 43% of the territory holds about 94% of the population. The geographer Hu Huanyong proposed it in 1935 and it still holds.
  • The Valeriepieris circle: the orange of northern India, Bangladesh, eastern China and Southeast Asia. In 2013 a Reddit user noticed that more people live inside a circle centred on the South China Sea than outside it. In 2015 the economist Danny Quah tightened it to a 3,300 km radius around Mong Khet, in Myanmar: more than half of humanity.
  • Java: the orange strip at the bottom of Indonesia is the most populous island in the world, with 151.6 million people in the 2020 census. That is 56% of Indonesia on less than 7% of its land.
  • The Sahel: a green band along the southern edge of the Sahara, from Senegal to Sudan, where the desert gives way to savanna.
  • The empty north: the map is in Web Mercator, which stretches the high latitudes. Canada and Siberia look enormous and are mostly blue. Greenland, which Mercator draws about as big as Africa, barely shows at all: Africa is 14 times larger and holds over a billion people more.