Title

plztowknr -- Stata module to translate German zip codes into electoral districts

Syntax

plztowknr varname [if] [in]
[, options]

where varname has to be a numeric variable

Main
generate(newvar) specifies the name of the new variable containing the electoral districts

year(real) specifies the election year for which zip codes are translated into electoral districts

missingcode(real) specifies existing missing values in varname

english assigns english value and variable labels to newvar; by default german labels are used

nogles assigns no values labels for missing values in newvar; by default missing value labels are assigned based on the scheme of the German Longitudinal Election Study

Description

The plztowknr module translates German zip codes into electoral districts for the German
federal elections of 1998, 2002, 2005, 2009, 2013, 2017, or 2021. It is important to note that German zip codes might correspond to more than one electoral district.
plztowknr thus generates a new variable for each potential electoral district.
For example, a person living in zip code 01157 could be voting in electoral district 159 or 160. In this case, plztowknr generates two additional variables--one for each potential district.
Each of these variables will be named by the string specified in generate(newvar) followed by a number.

There are no official lists that link zip codes to election districts in Germany.
The dictionaries of plztowknr thus have to rely on several administrative documents. Note that these dictionaries are not
comprehensive and that these lists and in consequence plztowknr have to be used carefully and should be checked for errors. In the following we provide an overview of how the dictionaries
for each election year were created. The dictionaries of 2009, 2013, 2017, and 2021 were created as part of the data preparation of the German Longitudinal Election Study (GLES; www.gles.eu)
and, thus, are more comprehensive than the other lists.

1998 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office.

2002 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office.

2005 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office.

2009 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office and by the search tool provided by the German Bundestag.

2013 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office and by the search tool provided by the German Bundestag.

2017 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office and by the search tool provided by the German Bundestag, using Zip codes that are provided by the open data project suche-postleitzahl.org.

2021 Dictionary parsed from Gemeindeverzeichnis (directory of municipalities) that is provided by the German Statistical Office and by the search tool provided by the German Bundestag, using Zip codes that are provided by the open data project suche-postleitzahl.org.

Example

The following command translates zip codes from the variable plz into electoral districts. The electoral districts will be stored in
newly generated variables named elecdist, elecdist1, elecdist2(, ...). Furthermore, plztowknr is instructed to use the correspondence list for the German federal election of 2017.
plztowknr ignores existing missing values in plz (in this example -98 and -99) when assigning electoral districs.
Because english is not specified, the value and variable labels are in German. Because nogles is not specified missing value codes will be labeled using the scheme developed by GLES.
In the output window, plztowknr will display an overview of assigned, unknown,
multiple zip codes as well as the number of missing values (if specified).

. plztowknr plz, generate(elecdist) year(2017) missingcode(-99 -98)

The number of system missings are always displayed in the output window; extended missings can be specified in missingcode:

. plztowknr plz, generate(elecdist) year(2017) missingcode(.a .b)

Acknowledgments

The dictionaries used in plztowknr were collected as part of the data preparation of the German Longitudinal Election Study (GLES; www.gles.eu/)
carried out by GESIS and were kindly made available for this Stata module.

Notes

The plztowknr module draws on dictionaries for translating the zip codes. Use
adoupdate to get the latest version.
The installed version is 2.0 (18-Mar-2021).

Authors

Konstantin Glinitzer, Addendum, https://www.addendum.org/

Tobias Gummer, GESIS Leibniz-Institute for the Social Sciences, tobias.gummer@gesis.org

Nils Jungmann, GESIS Leibniz-Institute for the Social Sciences, nils.jungmann@gesis.org

Malte Kaukal, Hessisches Statistisches Landesamt, malte.kaukal@gmx.de

Joss Roßmann, GESIS Leibniz-Institute for the Social Sciences, joss.roßmann@gesis.org

Copyright (C) 2021 Konstantin Glinitzer, Tobias Gummer, Malte Kaukal, Joss Roßmann

Citation

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details <http://www.gnu.org/licenses/>.

Recommended citation (APA Style, 6th ed.): Glinitzer, K., Gummer, T., Jungmann, N., Kaukal, M., Roßmann, J. (2021): plztowknr: Stata module to translate German zip codes into electoral districts (Version: 2.0) [Computer Software]. Chestnut Hill, MA: Boston College.