Update location data for Census 2022#37
Merged
Nowosad merged 4 commits intoNowosad:masterfrom Jan 27, 2026
Merged
Conversation
- Remove census_de dataset (Chapter 14 now uses z22 package directly) - Regenerate metro_names using Census 2022 population data - Now detects 10 metropolitan areas (vs 8 with Census 2011) - Added: Hannover, Dresden - Regenerate shops data for updated metro list (~180k shops) - Update documentation to reflect changes - Update data-raw script to use z22 package Breaking change: census_de is removed. Users should use the z22 package directly for German census data. Co-Authored-By: Claude Opus 4.5 <[email protected]>
3 tasks
Co-Authored-By: Claude Opus 4.5 <[email protected]>
The z22 package now returns correct coordinates, see JsLth/z22#4. Updated installation instruction to use GitHub version. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Owner
|
Hi @jannes-m -- thanks for the PR. Two questions I have before merging:
|
- Bundle census data (pop, women, mean_age, hh_size) at 1km resolution - Removes z22 runtime dependency from geocompr chapter - Population, mean_age, hh_size from Census 2022; women from Census 2011 - z22 package still used during data preparation (data-raw script) - Update documentation in R/location.R Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
Author
Updated approach based on feedbackAfter discussion, we've changed the approach to bundle Changes in latest commits:Regarding shops.rda size increase (1.5 MB → 4.5 MB):
Regarding z22 external dependency:
census_de dataset:
Ready for review! |
Owner
Contributor
Author
|
Awesome, thanks a lot @Nowosad! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the location/geomarketing datasets to use Census 2022 data (via the z22 package) instead of the bundled Census 2011 data.
Changes
census_de: This dataset is no longer needed as Chapter 14 now uses the z22 package directlymetro_names: Now detects 10 metropolitan areas (vs 8 with Census 2011)shops: Updated OSM shop data for all 10 metros (~180k shops)Breaking Changes
census_dedataset is removedCoordination
The geocompr Chapter 14 refactoring depends on these updated datasets.
Test Plan
metro_nameshas 10 entriesshopssf object has geometry and ~180k rows🤖 Generated with Claude Code