Aan de slagGa gratis aan de slag

Plotting points over polygons - part 1

Make a basic plot of the service districts with the chicken locations. The packages needed have already been imported for you. The chickens DataFrame and service_district GeoDataFrame has been pre-loaded for you.

Deze oefening maakt deel uit van de cursus

Visualizing Geospatial Data in Python

Cursus bekijken

Oefeninstructies

  • Plot the shapefile for the service districts, using the name column to color the polygons.
  • Add chicken locations, using the lat and lng columns from the chickens DataFrame, and make them black.
  • Show your plot.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Plot the service district shapefile
service_district.plot(column=____)

# Add the chicken locations
plt.scatter(x=____, y=____, ____ = 'black')

# Show the plot
plt.____()
Code bewerken en uitvoeren