0

Is there a method or any other way to obtain the underlying binned data from HexagonLayer ? I'd like to get the aggregate counts, hexagon centers (long and lat) or geometry. I am using pydeck to produce the visualization.

import pydeck as pdk

# Create the HexagonLayer
layer = pdk.Layer(
    'HexagonLayer',
    df,
    get_position=['lng', 'lat'],
    auto_highlight=True,
    radius=radius,
    elevation_scale=200, 
    pickable=True,
    extruded=True,   
    wireframe=True,
    coverage=1,
    colorAggregation='SUM'
)

# Render the layer
r = pdk.Deck(layers=[layer], initial_view_state=view_state)
r.show()

# Get the underlying data
data = layer.get_data()
print(data.head())
kms
  • 1,810
  • 1
  • 41
  • 92

0 Answers0