データセットの紹介

Pythonで扱う地理空間データ

Joris Van den Bossche

Open source software developer and teacher, GeoPandas maintainer

IPIS の手工業的採掘サイトデータ

IPIS:International Peace Information Service

画像:Connormah、CC BY-SA 3.0、Wikimedia Commons より

Pythonで扱う地理空間データ

IPIS の手工業的採掘サイトデータ

IPIS:International Peace Information Service 画像:G.A.O、パブリックドメイン、Wikimedia Commons より

Pythonで扱う地理空間データ

IPIS の手工業的採掘サイトデータ

Pythonで扱う地理空間データ

地理空間ファイル形式

ファイルの読み込み:geopandas.read_file("path/to/file.geojson")

対応形式:

  • ESRI Shapefile
    • 1つの「ファイル」は複数ファイルで構成(.shp、.dbf、.shx、.prj など)
  • GeoJSON
  • GeoPackage(.gpkg)
  • …

および PostGIS データベース!

Pythonで扱う地理空間データ

地理空間ファイル形式への書き出し

to_file() メソッドで GeoDataFrame をファイルに書き出す:

# Shapefile への書き出し
geodataframe.to_file("mydata.shp", driver='ESRI Shapefile')

# GeoJSON への書き出し
geodataframe.to_file("mydata.geojson", driver='GeoJSON')

# GeoPackage への書き出し
geodataframe.to_file("mydata.gpkg", driver='GPKG')
Pythonで扱う地理空間データ

演習に進みましょう

Pythonで扱う地理空間データ

Preparing Video For Download...