| Title: | Official Gridded Data from the German Census 2022 |
|---|---|
| Description: | Provides fast and easy access to German census grid data from the 2011 and 2022 censuses <https://www.zensus2022.de/>, including a wide range of socio-economic indicators at multiple spatial resolutions (100m, 1km, 10km). Enables efficient download, processing, and analysis of large census datasets covering population, households, families, dwellings, and buildings. Harmonized data structures allow direct comparison with the 2011 census, supporting temporal and spatial analyses. Facilitates conversion of data into common formats for spatial analysis and mapping ('terra', 'sf', 'ggplot2'). |
| Authors: | Jonas Lieth [cre, aut, cph] (ORCID: <https://orcid.org/0000-0002-3451-3176>) |
| Maintainer: | Jonas Lieth <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.4 |
| Built: | 2026-05-17 09:18:00 UTC |
| Source: | https://github.com/jslth/z22 |
While some features contain total counts or averages, others contain figures
classified by certain categories. You can access these tables
programmatically using z22_categories.
For further clarification of terms used in the category labels, see the glossary.
z22_categories(feature, year = NULL)z22_categories(feature, year = NULL)
feature |
A grid feature. See |
year |
Census year. This is needed only for four features,
|
A tibble containing the category code (code) as well as
German and English labels (german and english). Each row
relates to a category of a feature.
birth_country (2011)| code | german | english |
| 1 | Deutschland | Germany |
| 21 | EU27-Land | EU27 Country |
| 22 | Sonstiges Europa | Other Europe |
| 23 | Sonstige Welt | Other World |
| 24 | Sonstige | Other |
birth_country (2022)| code | german | english |
| 1 | Deutschland | Germany |
| 20 | Ausland | Foreign |
| 21 | EU27-Land | EU27 Country |
| 22 | Sonstiges Europa | Other Europe |
| 23 | Sonstige Welt | Other World |
| 24 | Sonstige | Other |
sex| code | german | english |
| 1 | Männlich | Male |
| 2 | Weiblich | Female |
religion| code | german | english |
| 1 | Römisch-katholische Kirche | Roman Catholic Church |
| 2 | Evangelische Kirche | Evangelical Church |
| 3 | Sonstige, keine, ohne Angabe | Other, none, no information |
citizenship| code | german | english |
| 1 | Deutschland | Germany |
| 2 | Ausland | Foreign |
citizenship_group (2011)| code | german | english |
| 1 | Deutschland | Germany |
| 21 | EU27-Land | EU27 Country |
| 22 | Sonstiges Europa | Other Europe |
| 23 | Sonstige Welt | Other World |
| 24 | Sonstige | Other |
citizenship_group (2022)| code | german | english |
| 1 | Deutschland | Germany |
| 20 | Ausland | Foreign |
| 21 | EU27-Land | EU27 Country |
| 22 | Sonstiges Europa | Other Europe |
| 23 | Sonstige Welt | Other World |
| 24 | Sonstige | Other |
citizenship_origin| code | german | english |
| 1 | Deutschland | Germany |
| 2 | Bosnien und Herzegowina | Bosnia and Herzegovina |
| 3 | Griechenland | Greece |
| 4 | Italien | Italy |
| 5 | Kasachstan | Kazakhstan |
| 6 | Kroatien | Croatia |
| 7 | Niederlande | Netherlands |
| 8 | Österreich | Austria |
| 9 | Polen | Poland |
| 10 | Rumänien | Romania |
| 11 | Russische Föderation | Russian Federation |
| 12 | Türkei | Turkey |
| 13 | Ukraine | Ukraine |
| 14 | Sonstige | Other |
citizenship_total| code | german | english |
| 1 | Eine Staatsangehörigkeit | One citizenship |
| 2 | Mehrere, deutsch und ... | Several, German and ... |
| 3 | Mehrere, nur ausländische | Several, only foreign |
| 4 | Nicht bekannt | Unknown |
age_short| code | german | english |
| 1 | Unter 18 | Under 18 |
| 2 | 18 - 29 | 18 to 29 |
| 3 | 30 - 49 | 30 to 49 |
| 4 | 50 - 64 | 50 to 64 |
| 5 | 65 und älter | 65 and older |
age_long| code | german | english |
| 1 | Unter 10 | Under 10 |
| 2 | 10 - 19 | 10 to 19 |
| 3 | 20 - 29 | 20 to 29 |
| 4 | 30 - 39 | 30 to 39 |
| 5 | 40 - 49 | 40 to 49 |
| 6 | 50 - 59 | 50 to 59 |
| 7 | 60 - 69 | 60 to 69 |
| 8 | 70 - 79 | 70 to 79 |
| 9 | 80 und älter | 80 and older |
marital_status| code | german | english |
| 1 | Ledig | Single |
| 2 | Verheiratet | Married |
| 3 | Verwitwet | Widowed |
| 4 | Geschieden | Divorced |
| 5 | Eingetr. Lebenspartnerschaft | Registered partnership |
| 6 | Eingetr. Lebenspartner/-in verstorben | Registered partner deceased |
| 7 | Eingetr. Lebenspartnerschaft aufgehoben | Registered partnership annulled |
| 8 | Ohne Angabe | No information |
family_type| code | german | english |
| 1 | Ehepaare ohne Kind | Couples without child |
| 2 | Ehepaare, mind. 1 Kind < 18 | Couples, at least 1 child < 18 |
| 3 | Ehepaare alle Kinder >= 18 | Couples all children >= 18 |
| 4 | Eingetr. Lebenspartnerschaften ohne Kind | Registered civil partnerships without child |
| 5 | Eingetr. Lebenspartnerschaften mind. 1 Kind < 18 | Registered civil partnerships, at least 1 child < 18 |
| 6 | Eingetr. Lebenspartnerschaften alle Kinder >= 18 | Registered civil partnerships all children >= 18 |
| 7 | Nichteheliche Lebensgem. ohne Kind | Non-marital partnerships without child |
| 8 | Nichteheliche Lebensgem. mind. 1 Kind < 18 | Non-marital partnerships, at least 1 child < 18 |
| 9 | Nichteheliche Lebensgem. alle Kinder >= 18 | Non-marital partnerships all children >= 18 |
| 10 | Alleinerziehende Väter mind. 1 Kind < 18 | Single fathers, at least 1 child < 18 |
| 11 | Alleinerziehende Väter alle Kinder >= 18 | Single fathers all children >= 18 |
| 12 | Alleinerziehende Mütter mind. 1 Kind < 18 | Single mothers, at least 1 child < 18 |
| 13 | Alleinerziehende Mütter alle Kinder >= 18 | Single mothers all children >= 18 |
family_size| code | german | english |
| 1 | 2 Personen | 2 Persons |
| 2 | 3 Personen | 3 Persons |
| 3 | 4 Personen | 4 Persons |
| 4 | 5 Personen | 5 Persons |
| 5 | 6 und mehr Personen | 6 and more Persons |
household_family| code | german | english |
| 1 | Einpersonenhaushalte (Singlehaushalte) | One-person households (Single households) |
| 2 | Paare ohne Kind(er) | Couples without child(ren) |
| 3 | Paare mit Kind(ern) | Couples with child(ren) |
| 4 | Alleinerziehende Elternteile | Single parents |
| 5 | Mehrpersonenhaushalte ohne Kernfamilie | Multi-person households without core family |
household_lifestyle| code | german | english |
| 1 | Einpersonenhaushalte (Singlehaushalte) | One-person households (Single households) |
| 2 | Ehepaare | Married couples |
| 3 | Eingetr. Lebenspartnerschaften | Registered civil partnerships |
| 4 | Nichteheliche Lebensgemeinschaften | Non-marital partnerships |
| 5 | Alleinerziehende Mütter | Single mothers |
| 6 | Alleinerziehende Väter | Single fathers |
| 7 | Mehrpersonenhaushalte ohne Kernfamilie | Multi-person households without core family |
household_senior| code | german | english |
| 1 | Haushalte mit ausschließlich Senioren/-innen | Households with only seniors |
| 2 | Haushalte mit Senioren/-innen und Jüngeren | Households with seniors and younger people |
| 3 | Haushalte ohne Senioren/-innen | Households without seniors |
household_size_group| code | german | english |
| 1 | 1 Person | 1 Person |
| 2 | 2 Personen | 2 Persons |
| 3 | 3 Personen | 3 Persons |
| 4 | 4 Personen | 4 Persons |
| 5 | 5 Personen | 5 Persons |
| 6 | 6 und mehr Personen | 6 and more Persons |
dwelling_occupancy| code | german | english |
| 1 | Von Eigentümer/-in bewohnt | Occupied by owner |
| 11 | Eigentum: mit aktuell geführtem Haushalt | Ownership: with currently managed household |
| 12 | Eigentum: ohne aktuell geführtem Haushalt | Ownership: without currently managed household |
| 2 | Zu Wohnzwecken vermietet | Rented for residential purposes |
| 21 | Vermietet: mit aktuell geführtem Haushalt | Rented: with currently managed household |
| 22 | Vermietet: ohne aktuell geführtem Haushalt | Rented: without currently managed household |
| 3 | Ferien- und Freizeitwohnung | Holiday and leisure home |
| 4 | Leer stehend | Vacant |
| 5 | Diplomaten-/Streitkräftewohnung | Diplomatic/Military housing |
| 99 | Gewerbl. Nutzung | Commercial use |
dwelling_ownership_home| code | german | english |
| 1 | Privatperson/-en | Private person(s) |
| 2 | Privatwirtschaftliche Unternehmen (jur. Personen) | Private sector companies (legal persons) |
| 3 | Öffentliche Unternehmen, Kirchen o.ä. | Public companies, churches or similar |
| 4 | Wohnungsgenossenschaft | Housing cooperative |
| 99 | Trifft nicht zu (da keine Eigentumswohnung) | Does not apply (no condominium) |
dwelling_ownership_property| code | german | english |
| 1 | Gemeinschaft von Wohnungseigentümern/-innen | Homeowner association |
| 2 | Privatperson/-en | Private person(s) |
| 3 | Wohnungsgenossenschaft | Housing cooperative |
| 4 | Kommune oder Kommunales Wohnungsunternehmen | Municipality or municipal housing company |
| 5 | Privatwirtschaftliches Wohnungsunternehmen | Private sector housing company |
| 6 | Anderes privatwirtschaftliches Unternehmen | Other private sector company |
| 7 | Bund oder Land | Federal or state government |
| 8 | Organisation ohne Erwerbszweck (z.B. Kirche) | Non-profit organization (e.g. church) |
floor_space| code | german | english |
| 1 | Unter 30 | Under 30 |
| 2 | 30 - 39 | 30 - 39 |
| 3 | 40 - 49 | 40 - 49 |
| 4 | 50 - 59 | 50 - 59 |
| 5 | 60 - 69 | 60 - 69 |
| 6 | 70 - 79 | 70 - 79 |
| 7 | 80 - 89 | 80 - 89 |
| 8 | 90 - 99 | 90 - 99 |
| 9 | 100 - 109 | 100 - 109 |
| 10 | 110 - 119 | 110 - 119 |
| 11 | 120 - 129 | 120 - 129 |
| 12 | 130 - 139 | 130 - 139 |
| 13 | 140 - 149 | 140 - 149 |
| 14 | 150 - 159 | 150 - 159 |
| 15 | 160 - 169 | 160 - 169 |
| 16 | 170 - 179 | 170 - 179 |
| 17 | 180 und mehr | 180 and more |
| 99 | t.n.z., gewerblich | n.a., commercial |
dwelling_rooms| code | german | english |
| 1 | 1 Raum | 1 Room |
| 2 | 2 Räume | 2 Rooms |
| 3 | 3 Räume | 3 Rooms |
| 4 | 4 Räume | 4 Rooms |
| 5 | 5 Räume | 5 Rooms |
| 6 | 6 Räume | 6 Rooms |
| 7 | 7 und mehr Räume | 7 and more Rooms |
| 99 | t.n.z., gewerblich | n.a., commercial |
dwelling_constr_year (2011)| code | german | english |
| 1 | Vor 1919 | Before 1919 |
| 2 | 1919 - 1948 | 1919 - 1948 |
| 3 | 1949 - 1978 | 1949 - 1978 |
| 4 | 1979 - 1986 | 1979 - 1986 |
| 5 | 1987 - 1990 | 1987 - 1990 |
| 6 | 1991 - 1995 | 1991 - 1995 |
| 7 | 1996 - 2000 | 1996 - 2000 |
| 8 | 2001 - 2004 | 2001 - 2004 |
| 9 | 2005 - 2008 | 2005 - 2008 |
| 10 | 2009 und später | 2009 and later |
dwelling_constr_year (2022)| code | german | english |
| 1 | Vor 1919 | Before 1919 |
| 2 | 1919 - 1948 | 1919 - 1948 |
| 3 | 1949 - 1978 | 1949 - 1978 |
| 4 | 1979 - 1990 | 1979 - 1990 |
| 5 | 1991 - 2000 | 1991 - 2000 |
| 6 | 2001 - 2010 | 2001 - 2010 |
| 7 | 2011 - 2019 | 2011 - 2019 |
| 8 | 2020 und später | 2020 and later |
dwelling_building_type| code | german | english |
| 1 | Gebäude mit Wohnraum | Building with living space |
| 11 | Wohngebäude | Residential building |
| 111 | Wohngebäude (ohne Wohnheime) | Residential building (excluding dormitories) |
| 112 | Wohnheim | Dormitory |
| 12 | Sonstiges Gebäude mit Wohnraum | Other building with living space |
dwelling_building_design| code | german | english |
| 1 | Freistehendes Haus | Detached house |
| 2 | Doppelhaus Hälfte | Semi-detached house |
| 3 | Gereihtes Haus | Terraced house |
| 4 | Anderer Gebäudetyp | Other building type |
dwelling_building_size| code | german | english |
| 1 | Freistehendes Einfamilienhaus | Detached single-family house |
| 2 | Einfamilienhaus: Doppelhaushälfte | Single-family house: semi-detached |
| 3 | Einfamilienhaus: Reihenhaus | Single-family house: terraced |
| 4 | Freistehendes Zweifamilienhaus | Detached two-family house |
| 5 | Zweifamilienhaus: Doppelhaushälfte | Two-family house: semi-detached |
| 6 | Zweifamilienhaus: Reihenhaus | Two-family house: terraced |
| 7 | Mehrfamilienhaus: 3-6 Wohnungen | Multi-family house: 3-6 apartments |
| 8 | Mehrfamilienhaus: 7-12 Wohnungen | Multi-family house: 7-12 apartments |
| 9 | Mehrfamilienhaus: 13 und mehr Wohnungen | Multi-family house: 13 and more apartments |
| 10 | Anderer Gebäudetyp | Other building type |
dwelling_heat_type| code | german | english |
| 1 | Fernheizung (Fernwärme) | District heating (long-distance heating) |
| 2 | Etagenheizung | Self-contained central heating |
| 3 | Blockheizung | Block heating |
| 4 | Zentralheizung | Central heating |
| 5 | Einzel-/Mehrraumöfen (auch Nachtspeicherheizung) | Individual/multi-room stoves (including night storage heating) |
| 6 | Keine Heizung im Gebäude oder in den Wohnungen | No heating in the building or in the apartments |
dwelling_heat_src| code | german | english |
| 1 | Gas | Gas |
| 2 | Heizöl | Heating oil |
| 3 | Holz(pellets) | Wood (pellets) |
| 4 | Biomasse (ohne Holz), Biogas | Biomass (no wood), biogas |
| 5 | Solar-/Geothermie, Wärmepumpen | Solar, geothermal, heat pumps |
| 6 | Strom (ohne Wärmepumpen) | Electric heating (no heat pumps) |
| 7 | Kohle | Coal |
| 8 | Fernwärme | District heating |
| 9 | Kein Energieträger | No heating |
building_ownership_property| code | german | english |
| 1 | Gemeinschaft von Wohnungseigentümern/-innen | Homeowner association |
| 2 | Privatperson/-en | Private person(s) |
| 3 | Wohnungsgenossenschaft | Housing cooperative |
| 4 | Kommune oder Kommunales Wohnungsunternehmen | Municipality or municipal housing company |
| 5 | Privatwirtschaftliches Wohnungsunternehmen | Private sector housing company |
| 6 | Anderes privatwirtschaftliches Unternehmen | Other private sector company |
| 7 | Bund oder Land | Federal or state government |
| 8 | Organisation ohne Erwerbszweck (z.B. Kirche) | Non-profit organization (e.g. church) |
building_constr_year (2011)| code | german | english |
| 1 | Vor 1919 | Before 1919 |
| 2 | 1919 - 1948 | 1919 - 1948 |
| 3 | 1949 - 1978 | 1949 - 1978 |
| 4 | 1979 - 1986 | 1979 - 1986 |
| 5 | 1987 - 1990 | 1987 - 1990 |
| 6 | 1991 - 1995 | 1991 - 1995 |
| 7 | 1996 - 2000 | 1996 - 2000 |
| 8 | 2001 - 2004 | 2001 - 2004 |
| 9 | 2005 - 2008 | 2005 - 2008 |
| 10 | 2009 und später | 2009 and later |
building_constr_year (2022)| code | german | english |
| 1 | Vor 1919 | Before 1919 |
| 2 | 1919 - 1948 | 1919 - 1948 |
| 3 | 1949 - 1978 | 1949 - 1978 |
| 4 | 1979 - 1990 | 1979 - 1990 |
| 5 | 1991 - 2000 | 1991 - 2000 |
| 6 | 2001 - 2010 | 2001 - 2010 |
| 7 | 2011 - 2019 | 2011 - 2019 |
| 8 | 2020 und später | 2020 and later |
building_dwellings| code | german | english |
| 1 | 1 Wohnung | 1 Apartment |
| 2 | 2 Wohnungen | 2 Apartments |
| 3 | 3 - 6 Wohnungen | 3 - 6 Apartments |
| 4 | 7 - 12 Wohnungen | 7 - 12 Apartments |
| 5 | 13 und mehr Wohnungen | 13 and more Apartments |
building_size| code | german | english |
| 1 | Freistehendes Einfamilienhaus | Detached single-family house |
| 2 | Einfamilienhaus: Doppelhaushälfte | Single-family house: semi-detached |
| 3 | Einfamilienhaus: Reihenhaus | Single-family house: terraced |
| 4 | Freistehendes Zweifamilienhaus | Detached two-family house |
| 5 | Zweifamilienhaus: Doppelhaushälfte | Two-family house: semi-detached |
| 6 | Zweifamilienhaus: Reihenhaus | Two-family house: terraced |
| 7 | Mehrfamilienhaus: 3-6 Wohnungen | Multi-family house: 3-6 apartments |
| 8 | Mehrfamilienhaus: 7-12 Wohnungen | Multi-family house: 7-12 apartments |
| 9 | Mehrfamilienhaus: 13 und mehr Wohnungen | Multi-family house: 13 and more apartments |
| 10 | Anderer Gebäudetyp | Other building type |
building_type| code | german | english |
| 1 | Gebäude mit Wohnraum | Building with living space |
| 11 | Wohngebäude | Residential building |
| 111 | Wohngebäude (ohne Wohnheime) | Residential building (excluding dormitories) |
| 112 | Wohnheim | Dormitory |
| 12 | Sonstiges Gebäude mit Wohnraum | Other building with living space |
building_design| code | german | english |
| 1 | Freistehendes Haus | Detached house |
| 2 | Doppelhaus Hälfte | Semi-detached house |
| 3 | Gereihtes Haus | Terraced house |
| 4 | Anderer Gebäudetyp | Other building type |
building_heat_type| code | german | english |
| 1 | Fernheizung (Fernwärme) | District heating (long-distance heating) |
| 2 | Etagenheizung | Self-contained central heating |
| 3 | Blockheizung | Block heating |
| 4 | Zentralheizung | Central heating |
| 5 | Einzel-/Mehrraumöfen (auch Nachtspeicherheizung) | Individual/multi-room stoves (including night storage heating) |
| 6 | Keine Heizung im Gebäude oder in den Wohnungen | No heating in the building or in the apartments |
building_heat_src| code | german | english |
| 1 | Gas | Gas |
| 2 | Heizöl | Heating oil |
| 3 | Holz(pellets) | Wood (pellets) |
| 4 | Biomasse (ohne Holz), Biogas | Biomass (no wood), biogas |
| 5 | Solar-/Geothermie, Wärmepumpen | Solar, geothermal, heat pumps |
| 6 | Strom (ohne Wärmepumpen) | Electric heating (no heat pumps) |
| 7 | Kohle | Coal |
| 8 | Fernwärme | District heating |
| 9 | Kein Energieträger | No heating |
z22_categories("sex") # Features without categories are given code 0 z22_categories("families")z22_categories("sex") # Features without categories are given code 0 z22_categories("families")
First off, this package uses a couple of semi-official terms to make it easier to unequivocally identify certain parts of an aspect. When we are talking about a
feature, we talk about an indicator aggregated to grid cells, e.g., age or the number of dwellings.
category, we talk about the discrete classifications of features, e.g., ages 10 to 19, 20 to 29, 30 to 39, etc.
Both feature and category have to be provided to uniquely identify a dataset.
This documentation is a collection of definitions as they are provided by the Federal Statistical Office of Germany.
This characteristic indicates the year of construction of a building with living space in microcensus classes on the respective census reference date. The year of construction refers to the year in which the building was completed. In the case of conversions, extensions and additions to the house, the original year of construction of the building applies. In the case of completely destroyed and rebuilt buildings, the year of reconstruction is taken as the year of construction.
The census distinguishes three types of building classifications. Because they are very close terminologically, they need clarification:
Originally called "building type size" (Gebäudetyp-Größe), this classification provides information on the building type in relation to its size. Categories range from detached single-family buildings to multi-story multi-unit buildings.
Originally called "building type" (Gebäudeart), this classification provides information about the residential use of residential buildings. It distinguishes buildings based on how much space is used for residential purposes. Categories include:
Buildings with living space: Permanent buildings which are either fully or partially reserved for residential use by households. This also includes buildings used for administrative or commercial purposes if they contain at least one dwelling used for residential purposes. Buildings with living space are divided into residential buildings and other buildings with living space.
Residential buildings: Buildings in which at least half of the total usable floor space is used for residential purposes. Residential buildings also include dormitories (where residents run their own household).
Dormitories: Dormitories are residential buildings that primarily serve the housing needs of certain groups of the population (e.g. student residences, retirement homes). Dormitories have common rooms. Residents of dormitories run their own households.
Other buildings with living space: Buildings in which less than half of the total floor space is used for residential purposes, e.g. because the building is predominantly occupied by stores or offices.
Originally called "building type construction design" (Gebäudetyp-Bauweise), this classification specifies the morphological design of a building, i.e. whether it is detached, semi-detached, terraced or something else.
Persons with German citizenship are counted as German citizens. When assigning citizenship, a distinction is made between persons with German and non-German citizenship. Persons with a German citizenship are considered to be German, regardless of the existence of other citizenships.
Members of the German Armed Forces, police authorities and the Foreign Service working abroad and their families residing there are not included in this analysis, as they cannot be assigned regionally at grid cell level in Germany.
This characteristic indicates the type of core family according to national typification, i.e. according to the reference person principle, taking into account secondary residents. A core family consists of two or more persons belonging to the same private household and is made up of the reference person of the private household - a central person of the private household defined by age, marital status and gender - and at least one other person, e.g. the partner or a child of the reference person. This family concept restricts relationships between ancestors and descendants to direct relationships (first degree), i.e. relationships between parents and children. Only one core family can exist in a household. Other persons living in the household are not assigned to a core family. A household without a core family is possible.
The type of core family depends on the type of couple relationship or the gender of the single parent, and on the presence and age (under or over 18) of children. The term marriage is not differentiated according to the gender of the married persons. Persons in shared accommodation are not included here, only persons who have their own household.
A range of terms relate to core families:
A couple comprises of married couples, couples in a registered civil partnership and couples in a non-marital partnership who live together in a private household.
A married couple is a couple married according to the legal marital status on the reference date and living in a private household.
A registered civil partnership (ELP) is a legally recognized same-sex couple in a private household according to the legal marital status on the reference date.
A non-marital partnership (NELG) is a mixed-sex couple in a private household who were not married to each other according to their legal marital status on the reference date.
A single mother or a single father is a parent without a partner with at least one child within a private household.
A child is a biological son, stepson or adopted son or a biological daughter, stepdaughter or adopted daughter (regardless of age) whose usual place of residence is in the private household of at least one parent and one parent is the caregiver and/or partner of the caregiver.
A senior is defined as a person who has reached the age of 65 on the census date.
A dwelling is defined as rooms that are closed off from the outside, intended for residential purposes, usually located together, which enable the management of a separate household and are not used entirely for commercial purposes.
A dwelling does not necessarily have to contain a kitchen or kitchenette. Apartments have their own entrance directly from the outside, from a stairwell or a vestibule. However, a dwelling may also include basement or floor rooms (e.g. attics) that are developed for residential purposes outside the actual end of the dwelling.
To determine the floor space, the following areas are taken into account:
full: floor areas of rooms or parts of rooms with a clear height of at least 2 meters.
half: floor areas of rooms or parts of rooms with a clear height of at least 1 meter but less than 2 meters; unheatable observatories, swimming pools, and similar rooms closed on all sides.
generally a quarter, but no more than half: areas of balconies, loggias, roof gardens, terraces.
Persons with a non-German nationality are counted as foreigners. When assigning nationality, a distinction is made between persons with German and non-German nationality. Persons with German citizenship are considered German, regardless of the existence of other citizenships.
A private household consists of at least one person. This is based on the "concept of communal living": all persons who live together in dwelling, regardless of their residential status (sole residence, main or secondary residence), are considered members of the same private household, meaning that there is one private household per occupied dwelling. There is a maximum of one core family in a household. Other persons living in the household are not assigned to a core family.
The characteristic reflects the type of heating in the building. This evaluation is carried out for dwellings. The predominant type of heating in the building is broken down according to which spatial unit (district, building block, building, dwelling, room) is heated by the heating system. In passive houses, systems for heat recovery/controlled ventilation systems are considered "heating" and are assigned accordingly (usually: central heating).
Here, entire residential districts are supplied with heat from a central district heating plant (so-called district heating).
Self-contained central heating refers to a central heating system for all rooms in a self-contained dwelling, whereby the heating source (for example, gas boiler) is usually located within this dwelling.
Block heating is when a block of entire houses is heated by a central heating system and the heating source is located in or on one of the buildings or in its immediate vicinity (so-called local heating).
With central heating, all the residential units in a building are heated from a central heating point located within the building (usually in the basement). This also includes heat pumps.
Individual stoves (such as coal or night storage stoves) only heat the room in which they are located at any one time. They are usually permanently installed. A multi-room stove (e.g. tiled stove) heats several rooms at the same time (also through air ducts). No heating in the building or in the dwellings
The marital status indicates a person's marital status under personal law. The marital status under personal law is determined in accordance with the Personenstandsgesetz (PStG) and the Lebenspartnerschaftsgesetz (LPartG).
The introduction of the right to marriage for persons of the same sex (Eheöffnungsgesetz) has allowed same-sex couples to marry since October 1, 2017. The establishment of new registered civil partnerships under the Lebenspartnerschaftsgesetz (LPartG) has no longer been possible since October 1, 2017. Unless existing civil partnerships are converted into a marriage, registered civil partnerships remain in place.
The average net rent per square meter is the ratio between the total rent per square meter of the dwellings and the total number of dwellings. The calculation is made for rented dwellings in residential buildings (excluding dormitories). Dwellings not rented out are excluded from the calculation.
Ownership is divided into home ownership and property ownership. Home ownership determines who is entitled to ownership of a dwelling in a building divided according to the Wohneigentumsgesetz (WEG) while property ownership determines who is entitled to ownership in a building. Owners can be private individuals or legal entities.
The ownership rate represents the share of owner-occupied dwellings in all occupied dwellings. Not taken into account: Vacant dwellings, vacation and leisure dwellings and commercially used dwellings. The calculation is made for dwellings in residential buildings (excluding halls of residence).
Persons born up to August 2, 1945 in former German eastern territories within the borders of Germany in 1937 are not counted as born abroad, but are assigned the German state code. If the place of birth is not within these borders, the current state code is assigned. Places of birth in countries that have merged into other countries, such as the Soviet Union or Yugoslavia, are assigned to the countries that exist today wherever possible.
Comprises the member states of the European Union as of 15 May 2022, previously last amended by the UK's withdrawal in 2020. Persons born in Czechoslovakia are also included in "EU27 country (as of 2020)" with the current country codes. Croatia is also included here following its accession to the EU on July 1, 2013.
Includes the Russian Federation and Turkey as well as other current country codes of the former Soviet Union and the former Yugoslavia. Great Britain is assigned here following its withdrawal from the EU.
Includes all other countries. This category includes other current country codes of the former Soviet Union that were not assigned to "Other Europe".
Includes "Not specified".
Each resident is assigned to an address and thus to a grid cell with a side length of 100 m, 1 km or 10 km. Members of the German Armed Forces, police authorities and the Foreign Service working abroad and their families living there are not included in this analysis, as they cannot be assigned regionally at grid cell level in Germany.
A room is either a living room, dining room, bedroom or other separate room (e.g. habitable cellar or floor rooms) of at least 6 square meters in size as well as self-contained kitchens, regardless of their size. Bathrooms, toilets, hallways and utility rooms are generally not counted. A living room with a dining area, sleeping alcove or kitchenette is to be counted as one room. Accordingly, dwellings in which there is no structural separation of the individual living areas (e.g. so-called "loft dwellings") consist of only one room.
The characteristic shows the energy source of the heating in the building. This evaluation is carried out for dwellings. Energy source used to heat the building. If there are several energy sources in the building, it is the one that heats the largest part of the living space. In passive houses, the residual heat requirement is covered by an additional source, which is specified here.
Gas
Heating oil
Wood, wood pellets
Biomass (excluding wood), biogas: All organic substances produced by plants or animals from which energy can be obtained by burning. Energy can be obtained through combustion. This includes straw, organic waste or liquid manure (excluding wood). Biogas is produced during the fermentation of biomass and is also classified here.
Solar/geothermal energy, environmental heat, exhaust air heat: Solar energy as well as energy from water, air and earth is obtained here with the help of collectors, heat pumps and heat exchangers. This also includes heat obtained from the exhaust air of buildings (so-called exhaust air heat).
Electricity (without heat pumps)
Coal
District heating (various heating sources)
No energy source (no heating)
The vacancy rate (dwellings) represents the ratio of vacant dwellings to all occupied and vacant dwellings. The market-active vacancy rate represents the proportion of vacant dwellings that are available again within three months as a percentage of all dwellings in residential buildings. Not taken into account: Vacation and leisure dwellings as well as commercially used dwellings. The calculation is made for dwellings in residential buildings (excluding halls of residence).
Translated and slightly edited version of the dataset descriptions of the Zensus 2022 and Zensus 2011 gridded datasets by the Federal Statistical Office of Germany.
© Statistische Ämter des Bundes und der Länder, 2024
Given pairs of coordinates, generates their INSPIRE grid representation. Given INSPIRE identifiers, can also extract the X and Y coordinates.
An INSPIRE ID contains information about the CRS, cell size and the ETRS89-LAEA coordinates of the south-west corner of the grid cell in its format.
CRS3035RES{cellsize}mN{y}E{x} # long format
{cellsize}N{y}E{x} # short format
The short format always uses meters while the short formats aggregates cell sizes greater or equal to 1000m to km.
z22_inspire_generate(coords, res = NULL, short = FALSE, llc = FALSE) z22_inspire_extract(inspire, as = c("df", "sf"), meta = FALSE)z22_inspire_generate(coords, res = NULL, short = FALSE, llc = FALSE) z22_inspire_extract(inspire, as = c("df", "sf"), meta = FALSE)
coords |
A list, matrix, or dataframe where the X and Y coordinates are
either in the columns Can also be a |
res |
Resolution of the grid. Can be |
short |
If |
llc |
Do the coordinates in |
inspire |
A vector of INSPIRE IDs. Can be either short or long format. |
as |
Specifies the output class. Must be one of |
meta |
Whether to include parsed CRS and resolution in the output.
If |
To remain fast even for huge grid datasets, the function is just a very
simple sprintf wrapper that performs no input checks. To
produce valid INSPIRE identifiers, make sure to transform your data to
ETRS89-LAEA (e.g. using
st_transform(..., 3035)). You should also
make sure that the coordinates are the south-west corner of existing
INSPIRE grid cells.
z22_inspire_generate returns a character vector containing
the INSPIRE identifiers. z22_inspire_extract returns a dataframe
or sfc object containing the points extracted from
the INSPIRE identifiers. Note that the returned coordinates are always
the centers of the grid cells as opposed to the south-west corners.
library(dplyr, warn.conflicts = FALSE) # Generate IDs from a dataframe coords <- tibble(x = c(4334150, 4334250), y = c(2684050, 2684050)) identical(z22_inspire_extract(z22_inspire_generate(coords))[c("x", "y")], coords) # Extract coordinates from short ID strings z22_inspire_extract("100mN34000E44000") # Generate IDs from an sf dataframe if (requireNamespace("sf", quietly = TRUE)) { coords <- sf::st_as_sf(coords, coords = c("x", "y"), crs = 3035) z22_inspire_generate(coords) }library(dplyr, warn.conflicts = FALSE) # Generate IDs from a dataframe coords <- tibble(x = c(4334150, 4334250), y = c(2684050, 2684050)) identical(z22_inspire_extract(z22_inspire_generate(coords))[c("x", "y")], coords) # Extract coordinates from short ID strings z22_inspire_extract("100mN34000E44000") # Generate IDs from an sf dataframe if (requireNamespace("sf", quietly = TRUE)) { coords <- sf::st_as_sf(coords, coords = c("x", "y"), crs = 3035) z22_inspire_generate(coords) }
Retrieve the values and coordinates of gridded features from the censuses 2011 and 2022.
When we are talking about a
feature, we talk about an indicator aggregated to grid cells, e.g., age or the number of dwellings.
category, we talk about the discrete classifications of features, e.g., ages 10 to 19, 20 to 20, 30 to 39, etc.
Both feature and category have to be provided to uniquely identify a dataset.
z22_data( feature, categories = NULL, year = 2022, res = "1km", all_cells = FALSE, normalize = FALSE, as = c("df", "sf", "raster"), update_cache = FALSE )z22_data( feature, categories = NULL, year = 2022, res = "1km", all_cells = FALSE, normalize = FALSE, as = c("df", "sf", "raster"), update_cache = FALSE )
feature |
A grid feature. See |
categories |
One or multiple feature categories. See
|
year |
Census year. Currently, only 2011 and 2022 are available. Defaults to 2022. |
res |
Resolution of the grid dataset. Can be |
all_cells |
If |
normalize |
If |
as |
Specifies the output class. Must be one of |
update_cache |
By default, both functions cache attribute files for
the remainder of the R session. They are downloaded to a temporary directory
and - if the file to download already exists - are recovered from the cache.
In other words, when rerunning the same request multiple times, the
subsequent calls should be much faster. If |
By default, data are downloaded from the
z22data data repository which
stores all pre-processed data. You can download this repository and use
it offline or use an entirely different repository by setting
options(z22.data_repo = "path/to/z22data").
A tibble, SpatRaster or
sf tibble depending on the as argument.
If a tibble is returned each category in categories is stored in
a column. If a SpatRaster is returned, each category is a
named layer.
# Get gridded population pop <- z22_data("population", res = "10km", as = "raster") terra::plot(pop$cat_0) # Get data about the number of people born in a EU27 country z22_data("birth_country", categories = 21, res = "1km")# Get gridded population pop <- z22_data("population", res = "10km", as = "raster") terra::plot(pop$cat_0) # Get data about the number of people born in a EU27 country z22_data("birth_country", categories = 21, res = "1km")
Replace category codes with their labels.
z22_decode(codes, feature, year = NULL, lang = c("english", "german"))z22_decode(codes, feature, year = NULL, lang = c("english", "german"))
codes |
A vector of character codes, possibly prefixed with
|
feature |
A grid feature that the category |
year |
Census year. This is needed only for four features,
|
lang |
Specifies the language of the output description. Can be
either |
.data with category codes decoded to labels.
# retrieves a the translation of cat codes directly z22_decode(1, "marital_status") # recycles codes z22_decode(c(1, 1, 1), "marital_status") # undefined codes are returned as NA z22_decode(c(1, 2, 3), feature = "sex") # special case: cat_* strings z22_decode("cat_2", feature = "sex")# retrieves a the translation of cat codes directly z22_decode(1, "marital_status") # recycles codes z22_decode(c(1, 1, 1), "marital_status") # undefined codes are returned as NA z22_decode(c(1, 2, 3), feature = "sex") # special case: cat_* strings z22_decode("cat_2", feature = "sex")
Get a list of available features. To get a list of all categories, see
z22_categories.
For further clarification of terms used in the feature labels, see the glossary.
z22_features(theme = NULL, year = NULL, res = NULL, legacy_names = FALSE)z22_features(theme = NULL, year = NULL, res = NULL, legacy_names = FALSE)
theme |
Theme of the feature. Available themes are |
year |
Census year. Can be 2011 or 2022. If |
res |
Resolution of the feature grid. Can be |
legacy_names |
If |
A tibble containing the following columns:
theme: Theme of the feature
feature: Feature name
desc: Human-readable english description
z22: Whether the feature is available in the Census 2022
z11_100m: Whether the feature is available in the Census 2011
at a 100m resolution
z11_1km: Whether the feature is available in the Census 2011
at a 1km resolution
has_cat: Whether the feature is is further divided into
categories.
# return all features related to dwellings z22_features("dwellings") # return all features available in the Census 2011 z22_features(year = 2011) # return all features available in 2011 at a 1km resolution z22_features(year = 2011, res = "1km")# return all features related to dwellings z22_features("dwellings") # return all features available in the Census 2011 z22_features(year = 2011) # return all features available in 2011 at a 1km resolution z22_features(year = 2011, res = "1km")
Retrieve the entire INSPIRE grid.
Unlike the feature grids retrieved from z22_data,
the INSPIRE grid encompasses the entire area of Germany. You can thus use
it to join with the incomplete feature grids from z22_data
to create a complete dataset.
z22_grid(res, year = 2019, as = c("df", "sf", "raster"), update_cache = FALSE)z22_grid(res, year = 2019, as = c("df", "sf", "raster"), update_cache = FALSE)
res |
Resolution of the grid. Can be |
year |
Version of the grid. Can be 2015, 2017, 2018 and 2019. Defaults to the latest version. |
as |
Specifies the output class. Must be one of |
update_cache |
By default, both functions cache attribute files for
the remainder of the R session. They are downloaded to a temporary directory
and - if the file to download already exists - are recovered from the cache.
In other words, when rerunning the same request multiple times, the
subsequent calls should be much faster. If |
Note the uncompressed object sizes of the output (2019 version):
100 m: 38 million cells, 291 MB
250 m: 6 million cells, 47 MB
1 km: 384 thousand cells, 3 MB
5 km: 16 thousand cells, 0.12 MB
10 km: 4 thousand cells, 0.03 MB
A tibble, SpatRaster or
sf tibble depending on the as argument.
# Get high-res grid as tibble z22_grid("100m") # Get low-res grid as raster z22_grid("1km", as = "raster")# Get high-res grid as tibble z22_grid("100m") # Get low-res grid as raster z22_grid("1km", as = "raster")
Helper function to convert the output of z22_data to a
long table. This can be useful for plotting or other data wrangling tasks.
Note that pivoting can quickly become expensive for larger 100m grids.
z22_pivot_longer(.data, feature, lang = c("english", "german"))z22_pivot_longer(.data, feature, lang = c("english", "german"))
.data |
Output of |
feature |
A grid feature that is represented by |
lang |
Specifies the language of the output description. Can be
either |
Note that all columns starting with "cat_*" are automatically used
for pivoting.
A dataframe containing the columns category, value,
x and y. All non-category columns are preserved.
# get feature grid age <- z22_data("age_short", res = "10km") # pivot to a long table z22_pivot_longer(age, feature = "age_short")# get feature grid age <- z22_data("age_short", res = "10km") # pivot to a long table z22_pivot_longer(age, feature = "age_short")