folium
Python Data. Leaflet.js Maps.
Folium is a Python library that converts location data into interactive, zoomable web maps powered by Leaflet.js, no JavaScript required, viewable in a browser, embedded on a webpage, or displayed inside a Jupyter notebook.
Folium is a Python library that lets you create interactive maps. You work with your data in Python using whatever tools you normally use, and then folium turns that data into a map you can view in a web browser, embed in a web page, or display inside a Jupyter notebook. The maps are powered by Leaflet.js, a well-established JavaScript mapping library, but you do not need to write any JavaScript yourself.
The typical use case is someone who has location data in Python, perhaps a list of coordinates, geographic regions, or data tied to places on a map, and wants to visualize it without switching to a separate mapping tool. You write Python code to load and process the data, then call folium to render it as a zoomable, clickable map.
Installation is a single pip or conda command. The README is brief and points to the full documentation on a separate website for examples and reference. An interactive demo is available via Binder, a service that runs the example notebooks in a browser without any local installation.
Several third-party packages and plugins extend what folium can do. These include a connector for running folium inside Streamlit apps, a layer for fast rendering of large geographic datasets using the browser's graphics hardware, a geocoder plugin, and a tile layer variant with different zoom behavior. The README lists these with links but does not describe them in detail.
Folium is open source and accepts contributions. The project uses GitHub for issue tracking and pull requests.
Where it fits
- Visualize a dataset of GPS coordinates or geographic regions as a clickable, zoomable web map from a Python script.
- Embed an interactive map directly inside a Jupyter notebook alongside your data analysis code.
- Add a live map view to a Streamlit app using the folium-streamlit connector plugin.
- Render large geographic datasets as a fast map layer using the GPU-accelerated plugin for big data.