Learn R Programming

gerda (version 0.5.0)

gerda_census: 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()

Arguments

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.

Details

The dataset includes:

  • Demographics: Population, age structure

  • 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.

See Also

  • add_gerda_census for automatic merging with election data

  • gerda_census_codebook for variable descriptions

Examples

Run this code
# Get the census data
census <- gerda_census()
head(census)

# Check available municipalities
nrow(census)

Run the code above in your browser using DataLab