Geospatial · Areas and surfaces
H3 Aggregate
Puts features into hexagon cells of a chosen size and summarizes each cell, for an even grid on density maps.
Also known as: Hex bins, heat map
How it works
Pick the Geometry column and the Resolution (0–15, 8 by default; a higher number means smaller hexagons). Each feature is assigned to the H3 cell that contains its centroid. Then add one or more aggregations, each with a function (Sum, Count, Average, Min, Max, Median, Std dev or Count distinct), a column and an alias; the alias is filled in for you when left blank, and Count over All rows counts the features in the cell. The output has one row per cell that received at least one feature, with h3_cell, the hexagon polygon in geom, and the aggregated values.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of H3 Aggregate, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
geometryColumn: string
resolution: number (0-15)
aggregations: [{ column: string, func: "SUM"|"COUNT"|"AVG"|"MIN"|"MAX"|"MEDIAN"|"STDDEV"|"COUNT_DISTINCT", alias: string }]
}
Example
You want a density map of stores with their total sales. Set Resolution to 7 and add two aggregations: Count of All rows as stores, and Sum of sales as total_sales. Feed the result into a Map node to colour the hexagons by either column.
| h3_cell | stores | total_sales | geom |
|---|---|---|---|
| 872830828ffffff | 3 | 412000 | POLYGON (...) |
| 87283082effffff | 1 | 98000 | POLYGON (...) |