Skip to content

H3

H3 is a global grid of hexagons, designed by Uber and now an open standard. It covers the earth at 16 nested levels of detail, from cells the size of a country down to cells the size of a table, and each cell has a stable identifier that any other system using H3 will recognise.

Hexagons are useful for the same reason honeycombs are: every neighbour is at the same distance, whereas a square grid has neighbours on the sides and neighbours on the corners. That makes them a good frame for counting things, spotting concentrations and comparing areas fairly, without the arbitrariness of administrative boundaries.

The toolbox has two tools, both running in your browser on DuckDB with its H3 extension.

The tool you will use most. It takes a point layer and returns hexagons carrying an aggregate of the points that fall in each: incidents per cell, total sales per cell, mean measurement per cell.

ParameterWhat to set
Input point layerThe points to aggregate.
AggregateCount needs no field. Sum, mean, min and max compute over a numeric field.
FieldThe numeric field to aggregate, for everything except count.
ResolutionThe cell size, from 0 to 15. Leave it blank and ALIGN picks one from the extent of your data.

Empty cells are not returned, so the result covers only where your points actually are.

Fills an area with hexagons, with no data attached. Use it when you want the frame first, for instance to join other data onto it, or to show a study area as a regular tessellation.

ParameterWhat to set
Area sourceLayer geometry fills the shapes of a layer exactly, layer extent fills its bounding rectangle, map viewport fills what you currently see, manual bounding box fills coordinates you type.
Input layerThe layer, for the two layer based sources.
ResolutionThe cell size, from 0 to 15.

Resolution is the one decision that matters, and there is no universal answer. Each step up divides a cell into roughly seven smaller ones, so the count of cells grows very fast.

ResolutionCell edge, roughlyGood for
420 kmCountry and regional patterns.
63 kmA metropolitan area.
8460 mA city, neighbourhood patterns.
1065 mA district, street level detail.
129 mA block, a site.

Two hexagons of different resolutions cannot be compared, so pick one resolution for a given analysis and keep it. If your first attempt looks like noise, go coarser. If everything falls in three cells, go finer.

ToolWhat it does
Create H3 gridFills a layer’s geometry, a layer’s extent, the current viewport or a bounding box with H3 hexagons at the resolution you choose.
Bin points to H3Aggregates a point layer into H3 cells, as a count or as the sum, mean, min or max of a numeric field.

Styling the result. The aggregate lands in an attribute of each hexagon, so colour the layer by that field in Style to get a readable density map.

Rectangles instead. If you need a square grid rather than hexagons, use Regular grid in Vector geometry.