Repository navigation
Add NZ joint territorial authority, region and AS-area support - #1393
Merged
Merged
Conversation
Generate a spec-only atomic geography support for NZ whose area is the joint TA x REGC x AS cell, built from the pinned SA1-to-TA-and-region concordance and the existing G8-m AS placement. Within each TA, observed Census SA1 shares split the TA's ERP anchor through the existing largest-remainder kernel, so all 67 TA anchors are conserved exactly and regional totals are reproduced only approximately (a diagnostic, not a target). Marginal shares are never multiplied. Region 99 keeps its own SA1 cells under TA 067. The 33 Census residents under TA 999 stay in audit-only cells with no ERP anchor and are never reassigned to a real TA. Pin all 29 REGC page URLs, hashes, sizes and feature counts, and verify the bytes before reading any geography. The generator has --check. NZ transport is not activated; the resource is registered and described only. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 25, 2026 02:41
Contributor
Author
|
Merged by the NZ hub (session local_e407a527) at 389e33a with --merge. Gates: |
MaxGhenis
added a commit
that referenced
this pull request
Oct 25, 2026
#1393 added atomic_geography_support.json and changed country_package.json, geography_spine.json and spec/sources.yaml, so the NZ golden conflicted. The golden was regenerated from the merged tree with the test's own summary function. Keys only this branch changed keep its values, keys only main changed take main's, and the fingerprint, resource list and country_package.json hash are the merged tree's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
MaxGhenis
added a commit
that referenced
this pull request
Oct 25, 2026
#1375 merged main (#1393), which added atomic_geography_support.json and changed country_package.json, so the NZ golden conflicted. The golden was regenerated from the merged tree with the test's own summary function. Keys only one side changed keep that side's values; the fingerprint, the resource list and the country_package.json hash, which both sides changed, are the merged tree's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 26, 2026
The region-99 support note in the generator, calibration_bindings.json and the calibration-targets doc said G8-m2 (#1393) was not in this stack's base. The merge of #1394's head brought in #1382's fix4 head, which carries #1375's merge of main, so #1393 (4e31e42) is now an ancestor. Drop the dependency clause; the support statement itself is unchanged. calibration_bindings.json is regenerated with the generator, and the NZ golden follows its hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Independent of the #1375/#1382 stack.
What this does
Adds NZ's joint territorial authority × region × Accommodation Supplement area support (G8-m2). It is spec-only, with no transport activation. NZ's atomic geography unit becomes the joint TA × REGC × AS cell, so TA, region and AS area all derive from one atomic area by lookup.
tools/build_nz_joint_geography.py, which has--check.nz/atomic_geography_support.json, 140 cells, in the existingsupport_from_surfaceschema):outside-ta|…cells. They get no ERP anchor and no sampling mass, and are never reassigned to a real TA. This follows the crosswalk's existing Census-to-ERP discrepancy policy.docs/nz-joint-geography-report.jsonholds source counts, every straddling TA's cells, every outside-TA SA1, the pins and Census conservation:country_package.jsonregisters the resource;geography_spine.jsondescribes the joint unit;spec/sources.yamlre-pins that policy resource;Invariants (tested)
--checkregenerates the committed support and audit byte for byte.Verification
test_transport_codecs_geography.py: 22 passed;test_nz_joint_geography.py: 33 passed;test_fetch_nz_as_area_sources.py: 10 passed;test_nz_as_area_crosswalk.py: 70 passed;ci_test_plan.py verify,graph_acceptance_burndown.py --verify,git diff --checkand the generator's--checkare all clean.test_nz_joint_geography.py(33 passed) and the generator's--check, and regenerated with the page pins reversed: identical bytes.Merge
🤖 Generated with Claude Code