z22

Download German gridded census data quickly and easily

https://github.com/jslth/z22

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.3%) to scientific vocabulary

Keywords

r r-package rstats
Last synced: 10 months ago · JSON representation ·

Repository

Download German gridded census data quickly and easily

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
r r-package rstats
Created almost 2 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License Citation Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  warning = FALSE,
  message = FALSE,
  dev = "ragg_png",
  dpi = 300)
```

# z22


[![R-CMD-check](https://github.com/JsLth/z22/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/JsLth/z22/actions/workflows/R-CMD-check.yaml)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![CRAN status](https://www.r-pkg.org/badges/version/z22)](https://CRAN.R-project.org/package=z22)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Codecov test coverage](https://codecov.io/gh/JsLth/z22/branch/main/graph/badge.svg)](https://app.codecov.io/gh/JsLth/z22?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/jslth/z22/badge/main)](https://www.codefactor.io/repository/github/jslth/z22/overview/main)


As part of the German census, a number of socio-economic indicators are
published at a small-scale grid level (100m, 1km, 10km). Usually the
corresponding data files are very large and hard to work with. `{z22}` aims to
quickly and efficiently retrieve German census grid data. The package also
eases comparisons to grid data from the census 2011 by establishing a
standardized feature format.

Powered by the [z22data](https://github.com/jslth/z22data) data repository
which hosts the census grid data in small and digestible chunks. Based on the
predecessor package [z11](https://github.com/stefanjuenger/z11/) which allows
easy access to the gridded data from the Census 2011.


## Installation

You can install the development version of z22 like so:

```{r eval=FALSE}
pak::pkg_install("jslth/z22")
```


## Example

The package contains a main function, `z22_data`, to retrieve and process census
grid data. The following example downloads a feature grid on the vacancy share
in Germany at a 1x1 km resolution.

```{r}
library(z22)
library(terra)

grid_vac <- z22_data("vacancies", res = "10km", rasterize = TRUE)
grid_vac
```

Code for the plot ```{r eval=FALSE} library(ggplot2) df_vac <- z22_pivot_longer(grid_vac, "vacancies") ggplot(df_vac) + geom_tile(aes(x, y, fill = value)) + coord_sf(crs = 3035) + facet_wrap(~category, nrow = 2) + scale_fill_viridis_c("Share", na.value = "transparent", transform = "log2") + theme_bw() + labs(x = NULL, y = NULL) + theme(panel.grid = element_blank(), axis.text = element_blank()) ```
```{r echo=FALSE} library(ggplot2) df_vac <- z22_pivot_longer(grid_vac, "vacancies") ggplot(df_vac) + geom_tile(aes(x, y, fill = value)) + coord_sf(crs = 3035) + facet_wrap(~category, nrow = 2) + scale_fill_viridis_c("Count", na.value = "transparent", transform = "log2") + theme_bw() + labs(x = NULL, y = NULL) + theme(panel.grid = element_blank(), axis.text = element_blank()) ``` ## Available data ```{r echo=FALSE} knitr::kable(z22:::make_feature_table()) ```

Owner

  • Name: Jonas Lieth
  • Login: JsLth
  • Kind: user
  • Location: Cologne, Germany
  • Company: GESIS - Leibniz Institute for the Social Sciences

Citation (CITATION.cff)

# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "z22" in publications use:'
type: software
license: MIT
title: 'z22: Official Gridded Data from the German Census 2022'
version: 1.0.0
doi: 10.32614/CRAN.package.z22
identifiers:
- type: url
  value: https://jslth.github.io/z22/
abstract: Quickly and efficiently retrieve gridded census data from Germany's 2011
  and 2022 censuses.
authors:
- family-names: Lieth
  given-names: Jonas
  email: jonas.lieth@gesis.org
  orcid: https://orcid.org/0000-0002-3451-3176
preferred-citation:
  type: manual
  title: 'z22: Official Gridded Data from the German Census 2022'
  authors:
  - family-names: Lieth
    given-names: Jonas
    email: jonas.lieth@gesis.org
    orcid: https://orcid.org/0000-0002-3451-3176
  doi: 10.32614/CRAN.package.z22
  year: '2025'
  version: 1.0.0
  url: https://github.com/jslth/z22/
  abstract: Quickly and efficiently retrieve gridded census data from Germanys 2011
    and 2022 censuses.
repository-code: https://github.com/jslth/z22
url: https://github.com/jslth/z22/
contact:
- family-names: Lieth
  given-names: Jonas
  email: jonas.lieth@gesis.org
  orcid: https://orcid.org/0000-0002-3451-3176
keywords:
- r
- r-package
- rstats
references:
- type: software
  title: 'R: A Language and Environment for Statistical Computing'
  notes: Depends
  url: https://www.R-project.org/
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
  version: '>= 3.3.0'
- type: software
  title: utils
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: stats
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  institution:
    name: R Foundation for Statistical Computing
    address: Vienna, Austria
  year: '2025'
- type: software
  title: cli
  abstract: 'cli: Helpers for Developing Command Line Interfaces'
  notes: Imports
  url: https://cli.r-lib.org
  repository: https://CRAN.R-project.org/package=cli
  authors:
  - family-names: Csárdi
    given-names: Gábor
    email: csardi.gabor@gmail.com
  year: '2025'
  doi: 10.32614/CRAN.package.cli
- type: software
  title: httr2
  abstract: 'httr2: Perform HTTP Requests and Process the Responses'
  notes: Imports
  url: https://httr2.r-lib.org
  repository: https://CRAN.R-project.org/package=httr2
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  year: '2025'
  doi: 10.32614/CRAN.package.httr2
- type: software
  title: dplyr
  abstract: 'dplyr: A Grammar of Data Manipulation'
  notes: Imports
  url: https://dplyr.tidyverse.org
  repository: https://CRAN.R-project.org/package=dplyr
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
    orcid: https://orcid.org/0000-0003-4757-117X
  - family-names: François
    given-names: Romain
    orcid: https://orcid.org/0000-0002-2444-4226
  - family-names: Henry
    given-names: Lionel
  - family-names: Müller
    given-names: Kirill
    orcid: https://orcid.org/0000-0002-1416-3412
  - family-names: Vaughan
    given-names: Davis
    email: davis@posit.co
    orcid: https://orcid.org/0000-0003-4777-038X
  year: '2025'
  doi: 10.32614/CRAN.package.dplyr
- type: software
  title: arrow
  abstract: 'arrow: Integration to ''Apache'' ''Arrow'''
  notes: Imports
  url: https://github.com/apache/arrow/
  repository: https://CRAN.R-project.org/package=arrow
  authors:
  - family-names: Richardson
    given-names: Neal
    email: neal.p.richardson@gmail.com
  - family-names: Cook
    given-names: Ian
    email: ianmcook@gmail.com
  - family-names: Crane
    given-names: Nic
    email: thisisnic@gmail.com
  - family-names: Dunnington
    given-names: Dewey
    email: dewey@fishandwhistle.net
    orcid: https://orcid.org/0000-0002-9415-4582
  - family-names: François
    given-names: Romain
    orcid: https://orcid.org/0000-0002-2444-4226
  - family-names: Keane
    given-names: Jonathan
    email: jkeane@gmail.com
  - family-names: Moldovan-Grünfeld
    given-names: Dragoș
    email: dragos.mold@gmail.com
  - family-names: Ooms
    given-names: Jeroen
    email: jeroen@berkeley.edu
  - family-names: Wujciak-Jens
    given-names: Jacob
    email: jacob@wujciak.de
  - name: Apache Arrow
    email: dev@arrow.apache.org
  year: '2025'
  doi: 10.32614/CRAN.package.arrow
- type: software
  title: terra
  abstract: 'terra: Spatial Data Analysis'
  notes: Suggests
  url: https://rspatial.org/
  repository: https://CRAN.R-project.org/package=terra
  authors:
  - family-names: Hijmans
    given-names: Robert J.
    email: r.hijmans@gmail.com
    orcid: https://orcid.org/0000-0001-5872-2872
  year: '2025'
  doi: 10.32614/CRAN.package.terra
- type: software
  title: sf
  abstract: 'sf: Simple Features for R'
  notes: Suggests
  url: https://r-spatial.github.io/sf/
  repository: https://CRAN.R-project.org/package=sf
  authors:
  - family-names: Pebesma
    given-names: Edzer
    email: edzer.pebesma@uni-muenster.de
    orcid: https://orcid.org/0000-0001-8049-7069
  year: '2025'
  doi: 10.32614/CRAN.package.sf
- type: software
  title: ggplot2
  abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics'
  notes: Suggests
  url: https://ggplot2.tidyverse.org
  repository: https://CRAN.R-project.org/package=ggplot2
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
    orcid: https://orcid.org/0000-0003-4757-117X
  - family-names: Chang
    given-names: Winston
    orcid: https://orcid.org/0000-0002-1576-2126
  - family-names: Henry
    given-names: Lionel
  - family-names: Pedersen
    given-names: Thomas Lin
    email: thomas.pedersen@posit.co
    orcid: https://orcid.org/0000-0002-5147-4711
  - family-names: Takahashi
    given-names: Kohske
  - family-names: Wilke
    given-names: Claus
    orcid: https://orcid.org/0000-0002-7470-9261
  - family-names: Woo
    given-names: Kara
    orcid: https://orcid.org/0000-0002-5125-4188
  - family-names: Yutani
    given-names: Hiroaki
    orcid: https://orcid.org/0000-0002-3385-7233
  - family-names: Dunnington
    given-names: Dewey
    orcid: https://orcid.org/0000-0002-9415-4582
  - family-names: Brand
    given-names: Teun
    name-particle: van den
    orcid: https://orcid.org/0000-0002-9335-7468
  year: '2025'
  doi: 10.32614/CRAN.package.ggplot2
- type: software
  title: sinew
  abstract: 'sinew: Package Development Documentation and Namespace Management'
  notes: Suggests
  url: https://github.com/yonicd/sinew
  repository: https://CRAN.R-project.org/package=sinew
  authors:
  - family-names: Sidi
    given-names: Jonathan
    email: yonicd@gmail.com
  year: '2025'
  doi: 10.32614/CRAN.package.sinew
- type: software
  title: knitr
  abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
  notes: Suggests
  url: https://yihui.org/knitr/
  repository: https://CRAN.R-project.org/package=knitr
  authors:
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  year: '2025'
  doi: 10.32614/CRAN.package.knitr
- type: software
  title: rmarkdown
  abstract: 'rmarkdown: Dynamic Documents for R'
  notes: Suggests
  url: https://pkgs.rstudio.com/rmarkdown/
  repository: https://CRAN.R-project.org/package=rmarkdown
  authors:
  - family-names: Allaire
    given-names: JJ
    email: jj@posit.co
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  - family-names: Dervieux
    given-names: Christophe
    email: cderv@posit.co
    orcid: https://orcid.org/0000-0003-4474-2498
  - family-names: McPherson
    given-names: Jonathan
    email: jonathan@posit.co
  - family-names: Luraschi
    given-names: Javier
  - family-names: Ushey
    given-names: Kevin
    email: kevin@posit.co
  - family-names: Atkins
    given-names: Aron
    email: aron@posit.co
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  - family-names: Cheng
    given-names: Joe
    email: joe@posit.co
  - family-names: Chang
    given-names: Winston
    email: winston@posit.co
  - family-names: Iannone
    given-names: Richard
    email: rich@posit.co
    orcid: https://orcid.org/0000-0003-3925-190X
  year: '2025'
  doi: 10.32614/CRAN.package.rmarkdown
- type: software
  title: testthat
  abstract: 'testthat: Unit Testing for R'
  notes: Suggests
  url: https://testthat.r-lib.org
  repository: https://CRAN.R-project.org/package=testthat
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  year: '2025'
  doi: 10.32614/CRAN.package.testthat
  version: '>= 3.0.0'

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "z22",
  "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').",
  "name": "z22: Official Gridded Data from the German Census 2022",
  "relatedLink": "https://jslth.github.io/z22/",
  "codeRepository": "https://github.com/jslth/z22/",
  "issueTracker": "https://github.com/jslth/z22/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "1.0.3",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.4.3 (2025-02-28 ucrt)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Jonas",
      "familyName": "Lieth",
      "email": "jonas.lieth@gesis.org",
      "@id": "https://orcid.org/0000-0002-3451-3176"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Person",
      "givenName": "Jonas",
      "familyName": "Lieth",
      "email": "jonas.lieth@gesis.org",
      "@id": "https://orcid.org/0000-0002-3451-3176"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Jonas",
      "familyName": "Lieth",
      "email": "jonas.lieth@gesis.org",
      "@id": "https://orcid.org/0000-0002-3451-3176"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "terra",
      "name": "terra",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=terra"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "sf",
      "name": "sf",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=sf"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "sinew",
      "name": "sinew",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=sinew"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 3.3.0"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "stats",
      "name": "stats"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "cli",
      "name": "cli",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=cli"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "httr2",
      "name": "httr2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=httr2"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "arrow",
      "name": "arrow",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=arrow"
    },
    "SystemRequirements": null
  },
  "fileSize": "1035.572KB",
  "citation": [
    {
      "@type": "SoftwareSourceCode",
      "datePublished": "2025",
      "author": [
        {
          "@type": "Person",
          "givenName": "Jonas",
          "familyName": "Lieth"
        }
      ],
      "name": "{z22: Official Gridded Data from the German Census 2022}",
      "identifier": "10.32614/CRAN.package.z22",
      "url": "https://github.com/jslth/z22/",
      "@id": "https://doi.org/10.32614/CRAN.package.z22",
      "sameAs": "https://doi.org/10.32614/CRAN.package.z22"
    }
  ]
}

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 43
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 43

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: 18 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 18 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JsLth (1)
  • tamilwai (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 454 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: z22

Official Gridded Data from the German Census 2022

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 454 Last month
Rankings
Dependent packages count: 26.5%
Forks count: 29.0%
Stargazers count: 29.5%
Dependent repos count: 32.6%
Average: 40.9%
Downloads: 86.7%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • httr2 * imports
  • keyring * imports