https://github.com/randyzwitch/streamlit-folium
Streamlit Component for rendering Folium maps
https://github.com/randyzwitch/streamlit-folium
folium folium-maps geospatial geospatial-visualization python streamlit streamlit-component visualization
Last synced: 2 months ago
JSON representation
Streamlit Component for rendering Folium maps
- Host: GitHub
- URL: https://github.com/randyzwitch/streamlit-folium
- Owner: randyzwitch
- License: mit
- Created: 2020-07-17T16:13:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-21T16:52:48.000Z (3 months ago)
- Last Synced: 2025-04-21T17:02:45.900Z (3 months ago)
- Topics: folium, folium-maps, geospatial, geospatial-visualization, python, streamlit, streamlit-component, visualization
- Language: Python
- Homepage: https://folium.streamlit.app/
- Size: 9.57 MB
- Stars: 532
- Watchers: 8
- Forks: 202
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# streamlit-folium: geospatial made easy in Streamlit!

[](https://share.streamlit.io/randyzwitch/streamlit-folium/examples/streamlit_app.py)
streamlit-folium integrates two great open-source projects in the Python ecosystem: [Streamlit](https://streamlit.io/) and [Folium](https://python-visualization.github.io/folium/)!
## Installation
```python
pip install streamlit-foliumor
conda install -c conda-forge streamlit-folium
```## Usage
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 on
- `folium_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.## Example
[
Run and edit this example in Py.Cafe](https://py.cafe/maartenbreddels/streamlit-folium-geospatial-visualizations)

## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.