始める無料で始める

Urban Residents 地区の面積を求める

Urban Residents 地区の広さはどれくらいですか?

この演習はコースの一部です

Pythonで可視化する地理空間データ

コースを見る

演習の手順

  • まず都市部のポリゴンを出力し、各経度/緯度ペアの単位に注目してください。
  • urban_polygon に対して to_crs() を呼び出し、urban_poly_3857 を作成してから、もう一度先頭を出力します。各経度/緯度ペアの単位が変わっていることに気づくはずです。
  • urban_poly_3857 の面積を出力してください。平方キロメートルにするには 10**6 で割ることを忘れないでください。

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Print the head of the urban polygon 
print(urban_polygon.____())

# Create a copy of the urban_polygon using EPSG:3857 and print the head
urban_poly_3857 = urban_polygon.____(epsg = ____)
print(urban_poly_3857.head())

# Print the area of urban_poly_3857 in kilometers squared
area = urban_poly_3857.____ / ____
print('The area of the Urban Residents neighborhood is ', area[0], ' km squared')
コードを編集して実行