Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

German Territorial Reforms Data Cleaning

A data cleaning pipeline for processing German territorial reforms: "Gebietsänderungen (Namens-, Grenz- und Schlüsseländerungen)" from 1950 to 2024.

Overview

This repository contains code to clean administrative territorial reform data from Germany, primarily tracking municipality (Gemeinde) and county (Kreis) boundary changes. The cleaned dataset enables researchers to distinguish between actual residential relocations and administrative boundary changes when analyzing geographic mobility patterns.

Data Input

All data on territorial reforms was downloaded here: https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Namens-Grenz-Aenderung/namens-grenz-aenderung.html [downloaded between July 02, 2025 and July 09, 2025]

Codes

Run code/main.R to produce the output.

Data Output

Four datasets will be stored as csv in data/processed/csv.

Stata users should import the county keys as strings, otherwise the leading zero of the keys of Schleswig-Holstein through Bremen is lost and the keys no longer match the official ones:

import delimited using "county_reforms.csv", varnames(1) stringcols(_all) clear
  • county_reforms.csv: a combined cleaned version of all reforms taking place from 1950 to 2024. Note that the only variables that have been added to the raw data is a county (Kreis) identifier for pre and post reform, and a reform_type variable with an additional category. In contrast to the raw data, the fifth category of reforms contains new additions or creations of legal entities.

  • county_switchers.csv: this dataset contains reforms on year--pre county--post county level and contains reforms which moved a regional unit from one county to another. For example, when analyzing residential mobility based on a change in county, this dataset can be used to identify county changes of individuals that could result from mere administrative reforms, in contrast to an actual residential relocation. Population is only recorded for the reform types in which people are counted as changing county, that is dissolutions (1) and partial separations (2). It is missing for key changes (type 3), where a municipality keeps its location and only its county key is reassigned, and therefore for whole-county reforms such as the 2011 Mecklenburg Kreisgebietsreform or the 2021 merger of Eisenach into the Wartburgkreis. A missing population means that the number of people affected is not recorded, not that nobody was affected; records with a recorded population of zero, which are transfers of uninhabited land, are excluded.

  • state_switchers.csv: similar to county switchers, just on state level. The state keys themselves were renumbered in 1952, 1953 and 1961 (Hessen from 16 to 06, Bayern from 18 to 09, and so on), which changes the leading two digits of every county key in the state without moving anybody between states. Those renumberings are recorded at Land level in county_reforms and are excluded here.

  • county_crosswalk.csv: maps the county keys in use in any year from 1950 to 2024 onto the counties as they exist in a base year, which is set by base_year in code/main.R and defaults to 2024. A key county observed in year corresponds to county_base with weight share, and share sums to one within county and year. A clean merge or a renaming gives a single row with share 1, while a county split between several successors gives one row per successor. The crosswalk runs in both directions: for years before the base year the reforms of each subsequent year are applied in turn, and for years after it every newly issued key is split back over the counties it was formed from. Shares are taken from the population of the municipalities that move where Destatis records it for all of them, and from the number of municipalities that move otherwise, which is the usual case for whole-county reforms.

    Two limitations follow from the county universe being reconstructed from the reform records themselves rather than from a county register. First, a county key that stops appearing in the series without a Kreis level dissolution record is never retired and keeps mapping to itself, which mainly affects East German keys abolished by the 1952 Bezirk reform, a reform the series does not cover; the 2024 base year therefore carries 424 keys rather than the 400 counties that exist. Second, East German counties only enter the records in 1989, so base years before then contain no East German counties at all and base years before roughly 1995 remain unreliable there.

Variables

Variable Description
year Year of the reform
id Reform id
regional_unit Regional unit: Gemeinde (municipality), Kreis (county), Gemeindeverband, Regierungsbezirk, Region or Land
pre_region_id, post_region_id Region ID before / after the reform
pre_ags, post_ags Official municipality key (AGS) before / after the reform
pre_county_id, post_county_id County ID before / after the reform
pre_name, post_name Unit name before / after the reform
reform_type 1=dissolution, 2=partial separation, 3=key change, 4=name change, 5=new addition. Combinations appear as e.g. "2,3"
area_ha Area in hectares
population Population count, see the note under county_switchers
date_legal, month_legal, day_legal Date of the legal change
date_statistical, month_statistical, day_statistical Date of the statistical change

county_switchers and state_switchers are subsets of county_reforms and use the same definitions, with pre_state and post_state in state_switchers being the first two digits of the county key. county_crosswalk has its own variables county, year, county_base, base_year and share, described above.

R Version

  • 4.5.0

Package versions

  • tidyverse "2.0.0"
  • readxl "1.4.3"
  • lubridate "1.9.3"

About

A data cleaning pipeline for processing German territorial reforms: "Gebietsänderungen (Namens-, Grenz- und Schlüsseländerungen)" from 1950 to 2024.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages