Skip to content

pycensus.census.countries.germany.zensus_grid

Zensus 2022 100m x 100m population grid for Germany (Eurostat INSPIRE grid).

download_grid(data_dir=None)

Return every real German 100m Zensus 2022 grid cell as 100m x 100m polygons.

On first call, downloads and unzips the real Destatis CSV (~153MB) and caches a parsed GeoParquet version (<data_dir>/raw/zensus_grid/de_zensus_grid_100m.parquet) for fast reuse. Every cell polygon is built from the real x_mp_100m/y_mp_100m cell-center coordinates (EPSG:3035), offsetting +/-50m on each axis, then reprojected to EPSG:4326.

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID (GITTER_ID_100m), population

GeoDataFrame

(Einwohner), and geometry (100m square polygon, EPSG:4326).

Parameters:

Name Type Description Default
data_dir Optional[str]

Folder of the raw downloads; None = the pycensus cache.

None

load(aoi=None, data_dir=None)

Return real Zensus 2022 100m grid cells intersecting aoi.

Parameters:

Name Type Description Default
aoi

A GeoDataFrame/GeoSeries defining the area of interest. If omitted, returns every German grid cell (3,088,037 rows -- large; prefer passing an aoi).

None
data_dir Optional[str]

Root directory for the raw/cached grid. Defaults to :data:DEFAULT_DATA_DIR.

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID, population, geometry (EPSG:4326).