Exercise

Folium choropleth with markers and popups

Now you will add a marker to the center of each council district that shows the district number along with the count of building permits issued in 2017 for that district. The map you created in the last exercise is available as m.

Instructions

100 XP
  • Find the centroid for each council district and store it in a new column, center in the districts_and_permits GeoDataFrame.
  • Iterate through districts_and_permits and add a marker at each district's center. Remember to reverse the coordinate pair.
  • Create popups within your for loop to display the district number and the count of permits issued.
  • Add the markers to your map with .add_to() and display it.