Session Ready
Exercise

Inspecting the overlay result

Now that we created the overlay of the land use and districts datasets, we can more easily inspect the land use for the different districts. Let's get back to the example district of Muette, and inspect the land use of that district.

GeoPandas and Matplotlib are already imported. The result of the overlay() function from the previous exercises is available as combined.

Instructions
100 XP
  • Add a new column 'area' with the area of each polygon to the combined GeoDataFrame.
  • Create a subset called land_use_muette where the 'district_name' is equal to "Muette".
  • Make a plot of land_use_muette, using the 'class' column to color the polygons.
  • Calculate the total area for each 'class' of land_use_muette using the groupby() method, and print the result.