folium
Make beautiful maps with Leaflet.js & Python
What it is and what it does
folium is a Python library that bridges data analysis and web mapping by wrapping Leaflet.js, a popular JavaScript mapping library. You write Python code to define map features—markers, polygons, popups, layers—and folium generates interactive HTML maps that can be embedded in web pages, Jupyter notebooks, or saved as standalone files. The library integrates with the Python data ecosystem through dependencies like numpy and jinja2, and uses xyzservices to access basemap tile providers.
Typical workflows involve loading geographic data in Python, processing it with standard tools, then using folium to visualize the results as an interactive web map. The library handles the translation from Python objects to Leaflet.js configuration, so you don't write JavaScript directly. It's designed for exploratory analysis, dashboard building, and sharing geographic insights in a format that works in any web browser.
Use it for:
- Visualize GPS traces, sensor locations, or field survey points on an interactive map in a Jupyter notebook
- Build a web dashboard showing real-time or historical geographic data with markers, heatmaps, and layer controls
- Create choropleth maps from GeoJSON boundaries and pandas DataFrames to show regional statistics
- Generate static map images or interactive HTML files for reports, presentations, or web embedding
- Prototype geographic applications before committing to a full mapping framework
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
folium builds interactive web maps by combining Python data manipulation with Leaflet.js, letting you create and customize maps programmatically and render them as HTML.
Yes. folium is production-stable, actively maintained, has no known vulnerabilities, and installs with minimal friction. It's the standard choice for Python developers who need interactive web maps without learning JavaScript or deploying a mapping server. Use it if you're working with geographic data in Python and want to visualize it interactively.
Install
folium on PyPI
pip
pip install foliumuv
uv add foliumpoetry
poetry add foliumInstalling folium
Before you install
Low install friction with a pure-Python wheel and five common runtime dependencies. The project is actively maintained with recent commits and has been stable since its early releases.
License in practice
MIT license is permissive; you can use, modify, and distribute folium freely in commercial and private projects with minimal restrictions.
Quickstart
pip install folium
import folium
m = folium.Map(location=[0, 0], zoom_start=13)
m.save('map.html')
Verify before relying
- Whether folium's map rendering works offline or requires internet access for tile providers
- Performance characteristics when handling large GeoJSON datasets or many markers
- Specific coordinate examples and typical zoom levels for common use cases
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — branca, jinja2, numpy, requests, xyzservices |
| Maintenance | actively maintained — 424 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,186,642/month — #1,773 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: folium-0.20.0-py2.py3-none-any.whl
Keywords: data, visualization
Tags
More Visualization packages
matplotlib creates static, animated, and…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
plotlyPlotly is an interactive, browser-based…
permissive · top 1,000 on PyPI
graphvizGenerates DOT language source code for graph…
permissive · top 1,000 on PyPI
streamlitStreamlit transforms Python scripts into…
permissive · top 1,000 on PyPI
leatherLeather is a lightweight Python charting…
permissive · top 1,000 on PyPI
brancaBranca generates HTML and JavaScript pages from…
permissive · top 5,000 on PyPI
leafmapLeafmap enables interactive geospatial mapping…
permissive · top 15,000 on PyPI
streamlit-foliumRenders interactive Folium maps in Streamlit…
unclear · top 15,000 on PyPI
jupyter-leafletjupyter-leaflet provides interactive map…
permissive · top 15,000 on PyPI
XMindXMind creates, parses, and updates XMind mind…
permissive · top 15,000 on PyPI
highcharts-mapsHighcharts Maps for Python wraps the Highcharts…
unclear · top 15,000 on PyPI
ipyleafletipyleaflet embeds interactive Leaflet maps…
permissive · top 15,000 on PyPI
django-leafletIntegrates the Leaflet JavaScript mapping…
copyleft · top 15,000 on PyPI
CartopyCartopy makes it easy to draw maps for data…
permissive · top 5,000 on PyPI
splotsplot creates static and interactive…
permissive · top 15,000 on PyPI