Is there a way I can assign a value from my data frame to my HexagonLayer layer?
Here is my data:
Here is my code:
def map(data, lat, lon, zoom):
data = data.dropna()
st.write(data)
st.write(pdk.Deck(
map_style="mapbox://styles/mapbox/light-v9",
initial_view_state={
"latitude": lat,
"longitude": lon,
"zoom": zoom,
"pitch": 50,
},
layers=[
pdk.Layer(
"HexagonLayer",
data=data,
get_position=["lon", "lat"],
get_elevation=['swh_ku_cal'],
radius=2000,
elevation_scale=5000,
elevation_range=[1, 20000],
pickable=True,
extruded=True,
),
],
tooltip={
"html": "<b>Elevation Value:</b> {elevationValue} <br/> <b>Color Value:</b> {colorValue}",
"style": {
"backgroundColor": "steelblue",
"color": "white"
}
}
))
Update: I was reading the pydeck catalog an found out that I can use H3HexagonLayer to specify a value using
getElevation : df[‘value’]
Is there a way I can also use H3HexagonLayer?