Using streamlit_folium to display a choropleth map with this code:
m = shapefile_year_2[shapefile_year_2['Domain_polygon'] != 0].explore(
column = 'risk',
popup = ['ID_PARCEL', 'Risk of infection:'],
tooltip = 'Risk of infection:',
)
st_data = st_folium(m, width = 800, height = 500)
st.write(st_data)
It seems that st_data never gets updated when clicking on elements of the map:
I tried repeating st.write(st_data) every second to see if there was any update that was not displayed, but I had the same result whether I click on polygons or not.