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:

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'))
ERROR 1: PROJ: proj_create_from_database: Open of /home/docs/checkouts/ failed

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

Make this Notebook Trusted to load map: File -> Trust Notebook