Appearance
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.
| Resolution | Average Hexagon Area (km²) |
|---|---|
| 0 | 4,357,449 |
| 1 | 609,788 |
| 2 | 86,801 |
| 3 | 12,393 |
| 4 | 1,770 |
| 5 | 252 |
| 6 | 36 |
| 7 | 5 |
| 8 | 0.73 |
| 9 | 0.10 |
| 10 | 0.015 |
| 11 | 0.002 |
| 12 | 0.00030 |
| 13 | 0.0000438 |
| 14 | 0.00000626 |
| 15 | 0.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.