I am pretty new to streamlit but really like it so far. However, I ran into a problem when trying to visualize a simulation that simulates a forecast. As the results of the simulation should be visualized after each simulation step, the simulation is run in a loop in streamlit with a sleep. I would like to show the results of each simulation step in a map.
Is there any way to update the map instead of re-drawing/re-rendering it every simulation step? It seems that this functionality is there for Folium (Streamlit Folium Update -- more dynamic maps) but not for pydeck and st.map. I tried using the update function provided by pydeck (Updating Data in a pydeck_chart Object) but this seems not to work. A similar request was made here: pydeck update() Map Animation · Issue #1491 · streamlit/streamlit · GitHub
Please find a rough code scribble below:
st.header('Rough Code Scribble')
results = simulation_step()
Is there any way how to do that?
I would really appreciate any tips or tricks
- Are you running your app locally or is it deployed? Locally
- Share the Streamlit and Python versions. Streamlit 1.29.0, Python 3.10.12