gerda_census: Get Municipality-Level Census 2022 Data

View source: R/gerda_census.R

gerda_censusR Documentation

Get Municipality-Level Census 2022 Data

Description

Returns municipality-level demographic and socioeconomic data from the German Census 2022 (Zensus 2022). This is a cross-sectional snapshot covering all German municipalities.

For most users, we recommend using add_gerda_census instead, which automatically merges census data with GERDA election data.

Usage

gerda_census()

Details

The dataset includes:

  • Demographics: Population and population shares for ages under 18, 18-29, 30-49, 50-59, and 60+

  • Migration: Migration background, foreign nationals

  • Households: Average household size

  • Housing: Dwellings, vacancy, ownership, rents, building types

Municipality codes are 8-digit AGS codes. Since the census is a single 2022 snapshot, there is no year dimension.

The age variables follow the bins published in the Destatis Regionaltabellen. In particular, share_50to59_census22 covers ages 50-59 and share_60plus_census22 covers ages 60 and older. The source groups ages 60-74 together, so it cannot support separate 50-64 and 65+ measures.

Value

A data frame with approximately 10,800 rows (one per municipality) and 16 columns containing census indicators. See gerda_census_codebook for variable descriptions.

See Also

  • add_gerda_census for automatic merging with election data

  • gerda_census_codebook for variable descriptions

Examples

# Get the census data
census <- gerda_census()
head(census)

# Check available municipalities
nrow(census)


gerda documentation built on July 27, 2026, 5:09 p.m.