Streamlit Component for rendering Folium maps
MIT License
streamlit-folium integrates two great open-source projects in the Python ecosystem: Streamlit and Folium!
pip install streamlit-folium
or
conda install -c conda-forge streamlit-folium
Currently, there are two functions defined:
st_folium()
: a bi-directional Component, taking a Folium/Branca object and plotting to the Streamlit app. Upon mount/interaction with the Streamlit app, st_folium()
returns a Dict with selected information including the bounding box and items clicked onfolium_static()
: takes a folium.Map
, folium.Figure
, or branca.element.Figure
object and displays it in a Streamlit app using the _repr_html()
representation created in Folium. This function should be a strict subset the of functionality of the newer st_folium()
function, but is great for testing to ensure you have the correct Folium syntax.Run and edit this example in Py.Cafe
See CONTRIBUTING.md for more details.