Note

This page was generated from docs/user_guide/interactive_mapping.ipynb.
Interactive online version: Binder badge

Interactive mappingΒΆ

Alongside static plots, geopandas can create interactive maps based on the folium library.

Creating maps for interactive exploration mirrors the API of static plots in an explore() method of a GeoSeries or GeoDataFrame.

Loading some example data:

[1]:
import geopandas

nybb = geopandas.read_file(geopandas.datasets.get_path('nybb'))
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
cities = geopandas.read_file(geopandas.datasets.get_path('naturalearth_cities'))

The simplest option is to use GeoDataFrame.explore():

[2]:
nybb.explore()
[2]:
Make this Notebook Trusted to load map: File -> Trust Notebook