Session Ready
Exercise

Intersecting a GeoDataFrame with a Polygon

Combining the land use dataset and the districts dataset, we can now investigate what the land use is in a certain district.

For that, we first need to determine the intersection of the land use dataset with a given district. Let's take again the Muette district as example case.

The land use and districts datasets have already been imported as land_use and districts, and the Muette district has been extracted into the muette shapely polygon. Further, GeoPandas and matplotlib are imported.

Instructions
100 XP
  • Calculate the intersection of the land_use polygons with the single muette polygon. Call the result land_use_muette.
  • Make a quick plot of this intersection, and pass edgecolor='black' to more clearly see the boundaries of the different polygons.
  • Print the first five rows of land_use_muette.