Interactive Mapmaking with Python

Sangarshanan (~Sangarshanan)




Maps can help you tell amazing stories with your data and a lot of datasets we come across have a location component in them. Leveraging location data to create beautiful maps was once a daunting endeavor done only by cartographers with artistic skills but now with a pinch of python and some open-source help we can easily create interactive maps with our data

GeoDataframes are awesome for working with GIS data in Python as it provides the goodness of pandas for geographic data, So let's use them to create some cool interactive maps

  1. Introduction (2 mins)
    • Who am I?
    • Setting the expectations
  2. Working with Geodataframes (5 mins)
    • Reading Spatial data as a GeoDataframe
    • The awesomeness of GeoDataframes (An overview of some of the amazing things you can do with a single line of code eg: Spatial joins, Manipulations and transformations)
    • Now that we has established our love for geopandas lets map geodataframes
  3. Let the Mapmaking begin (10 mins)
    • Basic Non-Interactive maps with Geopandas and Matplotlib
    • Creating basic interactive maps with Folium, Plotly & Kepler (GeoJSONPlots, Clustermaps, Heatmaps, H3gridmaps)
      • Conforming geodataframes to a format accepted by these libraries (usually JSON or a list of lists)
      • Setting the right parameters for different plots
      • Jazzing up the maps with additional layers, custom styles, tooltips, popups, colors etc
      • Spatiotemporal Maps with + Jupyter for handling huge datasets with ease
      • Can we make it any easier ?
    • Why can't making interactive maps be as easy as gdf.folium.plot()?
  4. Enter Geopatra (8 mins)
    • The need for Geopatra (Could it be any Easier and Faster)
    • Wrapping up popular mapmaking libraries for GeoDataframes
    • Create interactive maps with just a single line
    • Future work and Discussion :)

More Info:

Normally mapping a geodataframe with folium

import folium
import geopandas
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
m = folium.Map(location = [4,10], zoom_start = 3)

With Geopatra all the parameters you set with folium become optional so you don't have to care about folium

import geopatra
m = world.folium.plot()


This talk introduces Geopatra, an open source mapping library that can be used to quickly map geodataframes with libraries like folium,, plotly etc. Currently mapping geodataframes requires you to understand your data and also the functioning of the mapping library you use but geopatra tries to abstract all that out and tries to provide a unified framework for mapping geodataframes


It's a beginner-friendly talk. It'll be way more fun if you like python and cool looking maps

Video URL:

Speaker Info:

I am Sangarshanan, I work at Grofers as a Data Engineer during the week and build imaginary projects in my head during the weekend.

I love space, memes, computers, and humans. I also like Hershey's cookies and cream

My talks have been tolerated at Pygotham 2019 and Europython 2020

Speaker Links:


Text on a website:

Big Blue bird:

Section: Others
Type: Talks
Target Audience: Beginner
Last Updated: