Session Ready
Exercise

Exploring a Land Use dataset

For the following exercises, we first introduce a new dataset: a dataset about the land use of Paris (a simplified version based on the open European Urban Atlas). The land use indicates for what kind of activity a certain area is used, such as residential area or for recreation. It is a polygon dataset, with a label representing the land use class for different areas in Paris.

In this exercise, we will read the data, explore it visually, and calculate the total area of the different classes of land use in the area of Paris.

GeoPandas and matplotlib are already imported.

Instructions
100 XP
  • Read in the 'paris_land_use.shp' file and assign the result to a variable land_use.
  • Make a plot of land_use, using the 'class' column to color the polygons. We also add a legend. Note: it might take a few seconds for the plot to generate because there are a lot of polygons.
  • Add a new column 'area' with the area of each polygon.
  • Calculate the total area in km² for each 'class' using the groupby() method, and print the result.