Skip to content

H3 Library ​

Yellowbrick supports a subset of the H3 geospatial indexing library, which provides a powerful way to partition and query geospatial data on a hexagonal grid. The H3 system divides the surface of the Earth into hexagonal cells at multiple resolutions, making it well suited for analytics on geographic shapes.

H3 is hierarchical: each cell at a given resolution subdivides into seven child cells at the next finer resolution.


Average Hexagon Area by Resolution ​

The following table shows the approximate average area of a hexagonal cell at each H3 resolution.
Valid resolution values are integers from 0 to 15, inclusive.

ResolutionAverage Hexagon Area (km²)
04,357,449
1609,788
286,801
312,393
41,770
5252
636
75
80.73
90.10
100.015
110.002
120.00030
130.0000438
140.00000626
150.0000008

Actual cell areas vary slightly depending on their position on the globe.


Supported Functions ​

Yellowbrick currently supports the following functions in its H3 integration:

H3_COVERAGE ​

Returns a list of H3 cells that cover a given GEOGRAPHY shape at a specified resolution.

H3_POINT_TO_CELL ​

Returns the H3 cell (as a 64-bit integer) that contains a given point at the specified resolution.

H3_CELL_TO_HEXSTRING ​

Converts a 64-bit H3 cell ID into its standard hexadecimal string representation.


See Also ​