Massachusetts Institute of Technology
Folium: Interactive Maps
July 21, 2017
The case study
In last time's blog, we saw how to make a static choropleth map. This time, I overlay the choropleth map on an interactive platform using folium. See a copy of the final product in my GitHub repository. The final product of this project is shown in Figure 1.
Figure 1: Interactive map with Folium
Open a jupyter notebook and import the following:
Load the geo-dataframe and rename the column so it makes sense at a glance:
Load the deaths dataframe created last time from the spatial join function:
Merge the deaths dataframe and the geo-dataframe by districts:
Get the folium base map and set zoom position, then start mapping.
Save the map!
You can zoom in and click on each point to view its associated pop-up (see figure below). Happy mapping!