[Zurich] Add consolidated bev_3903_all and bev_4031_all StatVar imports (Zurich_Population_By_Age_Sex_Origin_Combined & Zurich_Population_Number_Of_Birth_By_Sex_Origin_Combined) - #2232
Open
abhishekjaisw wants to merge 7 commits into
Conversation
…out goldens and with 6-check validation
Contributor
There was a problem hiding this comment.
Code Review
This pull request consolidates several legacy Zurich population and birth imports into two unified imports: Zurich_Population_By_Age_Sex_Origin_Combined and Zurich_Population_Number_Of_Birth_By_Sex_Origin_Combined. It introduces new rollup generation scripts (generate_rollups.py) and associated unit tests under bev_3903_all and bev_4031_all to handle spatial and demographic aggregations. Legacy metadata, mapping, and raw data files have been removed, and manifest.json has been updated accordingly. There are no review comments to evaluate, and I have no additional feedback to provide.
…Zurich imports into 2
…s via os.replace, and module isolation in tests
…ng) and validation_config scope
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
Add 2 consolidated multi-dimensional Zurich demographic imports (
Zurich_Population_By_Age_Sex_Origin_CombinedandZurich_Population_Number_Of_Birth_By_Sex_Origin_Combined) while retaining the 6 existing legacy split imports (Zurich_Population_By_Age,Zurich_Population_By_Origin,Zurich_Population_By_Sex,Zurich_Population_Number_Of_Birth,Zurich_Population_Number_Of_Birth_By_Origin,Zurich_Population_Number_Of_Birth_By_Sex) until removal is finalized:Zurich_Population_By_Age_Sex_Origin_Combined(statvar_imports/zurich/bev_3903_all/):BEV390OD3903.csv(https://data.stadt-zuerich.ch/dataset/bev_bestand_jahr_quartier_alter_herkunft_geschlecht_od3903).generate_rollups.pyaggregates economic population (AnzBestWir) across Quarter (QuarLang), District (KreisLang), and City (Ganze Stadt,wikidataId/Q72) and across all 8 demographic combinations (Age x Sex x Origin, 2-way marginals, 1-way marginals, and total population), emitting 108 StatVars (159,505observations).Zurich_Population_Number_Of_Birth_By_Sex_Origin_Combined(statvar_imports/zurich/bev_4031_all/):BEV403OD4031.csv(https://data.stadt-zuerich.ch/dataset/bev_tag_geburten_quartier_geschl_ag_herkunft_od4031).generate_rollups.pyaggregates daily live births (AnzGebuWir) into annual counts across Quarter, District, and City and across all 4 demographic combinations (Sex x Origin, 1-way marginals, and total births), emitting 9 StatVars (12,086observations).zurich_population_common.tmcf, and theirmanifest.json/README.mdentries remain untouched instatvar_imports/zurich/for now until removal is finalized.Verification
pytest statvar_imports/zurich/: 39/39 unit tests passed (bev_3903_all/generate_rollups_test.py,bev_4031_all/generate_rollups_test.py,wir_2552_wiki/generate_rollups_test.py).pytest import-automation/workflow/import_automation_workflow_test.py: 16/16 passed (catalog count = 200).yapf --diff -ronstatvar_imports/zurich/bev_3903_all/andstatvar_imports/zurich/bev_4031_all/: 0 formatting diffs.373890be737712744167b3f0c22d2065648b17c4: both consolidated imports reachedImportStatus.STAGINGwith 6/6 validation rules (check_deleted_records_percent,check_empty_import,check_missing_refs_count,check_lint_error_count,check_max_date_consistent,check_max_date_freshness) passing (0lint errors,0missing refs,0.0%deleted records).