Folium street map of the downtown neighborhood
This time you will create the folium map of downtown and add the Urban Residents neighborhood area from urban_polygon
. The urban_polygon
has been printed to your console.
This exercise is part of the course
Visualizing Geospatial Data in Python
Exercise instructions
- Create an array called
folium_loc
fromurban_polygon.center
- Create a folium map called
downtown_map
. Set the location argument equal tofolium_loc
and initialize the map with a zoom_start of 15. - Pass the geometry from the
urban_polygon
GeoDataFrame to thefolium.GeoJson()
method. Then calladd_to()
on that.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create array for called folium_loc from the urban_polygon center point
point = urban_polygon.____[0]
folium_loc = [point.____, point.____]
# Construct a map from folium_loc: downtown_map
downtown_map = folium.Map(location = ____, ____ = 15)
# Draw our neighborhood: Urban Residents
folium.GeoJson(____.____).add_to(____)
# Display the map
display(downtown_map)