I have a column in my .csv file I want to use to determine the bar height in my pydeck_chart Hexagon layer. So instead of having multiple rows with the same longitude and latitude, each coordinates are in the file just once and thereās a column thatās supposed to determine the height.
Deck.gl seems to have a attribute getElevationHeight thatās supposed to work, but I canāt for the life of me figure out how it works through Streamlit and pydeck_chart.
I found a question here with a similar problem, but itās using deprecated deck_gl_chart: How to make Hexagon Layer height value based, and I couldnāt get it to work anywayā¦
Hereās my code:
st.pydeck_chart(pdk.Deck(
map_style='mapbox://styles/mapbox/light-v9',
initial_view_state=pdk.ViewState(
latitude=64.5,
longitude=25,
zoom=4,
pitch=40,
),
layers=[
pdk.Layer(
'HexagonLayer',
data=get_data(),
get_position='[longitude, latitude]',
get_elevation_value='sensorValue', # <- Does not work
radius=3000,
elevation_scale=20,
elevation_range=[1, 10000],
extruded=True,
)
]
))
Hereās a look how my csv file looks like:
sensorValue,longitude,latitude
166,25.689529,60.417002000000004
303,24.664459,60.153502
416,24.849501,60.3
ā¦
I guess this is more of a Pydeck question than Streamlit question but seeing thereās such an active and helpful community I decided to try here! Do you know how to make it work?