Population · Public data

Population grid (H3)

World population mapped onto Uber H3 hexagonal cells, with centroids and density.

Kontur Population (Humanitarian Data Exchange, H3 resolution 4) · CC BY 4.0 · commons_pubdata.population.grid_h3

Read Markdown

Registered, not loaded yet: the table is not in the catalog. This page fills in after its first refresh.

Query it with DuckDB.

Bash
lhbox duckdb --catalog commons/pubdata
SQL · The 15 most populous H3 resolution-4 cells on Earth
SELECT h3_index, population, density_per_km2, latitude, longitude
FROM commons_pubdata.population.grid_h3
ORDER BY population DESC LIMIT 15;

Read it where you work.

Public, read-only data. With an account, lhbox duckdb attaches the catalog as commons_pubdata; an agent with the LakehouseBox connector opens it with open_public_catalog("commons/pubdata"). Without one, DuckDB reads the public files directly.

More example queries

  • Total population within 100 km of Madrid's centre (40.4168 N, 3.7038 W)
    SQL
    SELECT count(*) AS cells, sum(population) AS population_within_100km
    FROM commons_pubdata.population.grid_h3
    WHERE latitude BETWEEN 39.4 AND 41.4 AND longitude BETWEEN -5.0 AND -2.4
      AND 6371 * acos(least(1.0, cos(radians(40.4168)) * cos(radians(latitude))
                      * cos(radians(longitude) - radians(-3.7038))
                      + sin(radians(40.4168)) * sin(radians(latitude)))) <= 100;

Know your columns.

ColumnTypeMeaning
h3_indexstringUber H3 resolution-4 cell index (15-character hex string, e.g. 843e629ffffffff)
populationlongestimated resident population inside the H3 hexagon
area_km2doublespheroidal cell area, km²
density_per_km2doublepopulation per km² (population / area_km2)
latitudedoublecell centroid latitude (WGS84 degrees)
longitudedoublecell centroid longitude (WGS84 degrees)
View all 10 columns
bbox_xmindoublecell bounding box west longitude (WGS84)
bbox_ymindoublecell bounding box south latitude (WGS84)
bbox_xmaxdoublecell bounding box east longitude (WGS84)
bbox_ymaxdoublecell bounding box north latitude (WGS84)

Join keys: h3_index.

Before you query.

  1. Every cell is at H3 resolution 4 (~1,770 km² average cell area); unpopulated ocean and desert cells are omitted.
  2. Coordinates (latitude, longitude) and bounding boxes (bbox_xmin..bbox_ymax) are in WGS84 degrees (converted from the source GeoPackage's EPSG:3857 Web Mercator), so distance queries and joins with places.admin_areas work directly in standard lon/lat without reprojection.

Source & licence.

Source
Kontur Population (Humanitarian Data Exchange, H3 resolution 4)
Licence
CC BY 4.0
Attribution
Kontur Population: Global Population Density for H3 Hexagons (CC BY 4.0, Kontur Inc., via Humanitarian Data Exchange), derived from EC JRC GHSL, Meta HRSL, Microsoft Building Footprints, WorldPop and OpenStreetMap.
Coverage
worldwide, ~71,300 populated H3 resolution-4 hexagons (~8.03 billion people); latest Kontur release (2023-11-01)
Refresh
monthly, the whole table replaced; source version n/a
Table
commons/pubdata · population.grid_h3 · Iceberg v? · browse the catalog
Recipe
pubdata/recipes/population_grid.py, registry entry pubdata/registry/population_grid.yaml

Source: Kontur Population (Humanitarian Data Exchange, H3 resolution 4) · CC BY 4.0 · Snapshot shown: not loadedHTML for people. Markdown for agents.