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.
Este exercício faz parte do curso
Visualizing Geospatial Data in Python
Instruções do exercício
- Create an array called
folium_locfromurban_polygon.center - Create a folium map called
downtown_map. Set the location argument equal tofolium_locand initialize the map with a zoom_start of 15. - Pass the geometry from the
urban_polygonGeoDataFrame to thefolium.GeoJson()method. Then calladd_to()on that.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# 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)