H3

H3 visualization is a way to aggregate point data into a grid of H3 cells.

H3 visualizations are defined using “type”: “h3” . They generally share the same properties and behaviors as color range visualizations for polygons. Properties of specific relevance to H3 are:

Field name
Description

aggregation

The aggregation method that will be used on points within each cell. Supported values are count (default), sum, min, max, and mean .

binMode

fixed (default), low, medium, or high. Determines if the resolution of H3 cell is fixed or automatically determined based on the current zoom of the map.

baseBinLevel

Required. If binMode is fixed, this is the H3 cell resolution that the map will use. H3 cells vary from resolution 1 (largest) to resolution 15 (smallest). If binMode is auto, this is the resolution that will be used for calculating class breaks. You will get best results choosing a resolution that matches the fixed resolution you would choose to fit the most commonly-viewed zoom for your map.

numericAttribute

The numeric column to aggregate. Required unless aggregation is count , in which case the column choice is irrelevant.

This is an example of an H3 visualization

defined with the following style

{
  "config": {
    "steps": {"type": "quantiles", "count": 5},
    "aggregation": "sum",
    "binMode": "fixed",
    "baseBinLevel": 3,
    "numericAttribute": "capacity_mw"
  },
  "paint": {"color": "@riverine"},
  "type": "h3",
  "version": "2.3.1",
  "label": {},
  "legend": {"displayName": "auto"}
}

Last updated

Was this helpful?