ComeçarComece de graça

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

Ver curso

Instruções do exercício

  • Create an array called folium_loc from urban_polygon.center
  • Create a folium map called downtown_map. Set the location argument equal to folium_loc and initialize the map with a zoom_start of 15.
  • Pass the geometry from the urban_polygon GeoDataFrame to the folium.GeoJson() method. Then call add_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)
Editar e executar o código