BaşlayınÜcretsiz Başlayın

Explore the Paris districts (I)

In this exercise, we introduce a next dataset about Paris: the administrative districts of Paris (compiled from a Paris Data open dataset).

The dataset is available as a GeoPackage file, a specialised format to store geospatial vector data, and such a file can be read by GeoPandas using the geopandas.read_file() function.

To get a first idea of the dataset, we can inspect the first rows with head() and do a quick visualization with `plot(). The attribute information about the districts included in the dataset is the district name and the population (total number of inhabitants of each district).

Bu egzersiz

Working with Geospatial Data in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Import GeoPandas.
  • Read the districts file ('paris_districts.gpkg') and assign it to a variable called districts.
  • Print the first 5 rows of the districts dataset. What kind of geometries do those datasets contain?
  • Make a quick visualization of districts.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import GeoPandas
____

# Read the Paris districts dataset
districts = geopandas.____(____)

# Inspect the first rows
print(districts.____)

# Make a quick visualization of the districts
districts.____
plt.show()
Kodu Düzenle ve Çalıştır