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:
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?