Heatmaps Layer¶

The heatmaps layer renders weighted density fields over the surface. Each
HeatmapDatum holds a collection of HeatmapPointDatum samples plus bandwidth
and colour controls.
from IPython.display import display
from pyglobegl import (
GlobeConfig,
GlobeWidget,
HeatmapDatum,
HeatmapPointDatum,
HeatmapsLayerConfig,
)
heatmap = HeatmapDatum(
points=[
HeatmapPointDatum(lat=0, lng=0, weight=1.0),
HeatmapPointDatum(lat=10, lng=10, weight=0.6),
],
bandwidth=0.8,
color_saturation=2.5,
)
config = GlobeConfig(heatmaps=HeatmapsLayerConfig(heatmaps_data=[heatmap]))
display(GlobeWidget(config=config))
HeatmapDatum and HeatmapPointDatum¶
HeatmapPointDatum— one sample withlat,lng, andweight.HeatmapDatum— a group of points plusbandwidth(kernel width) andcolor_saturationcontrolling how intensity maps to colour.
From a GeoDataFrame
heatmaps_from_gdf builds heatmap points from point geometries with a
weight_column. See GeoPandas helpers.