feat(postcodes/SJ): 8 Svalbard + Jan Mayen codes (#1039)#1528
Merged
Conversation
Mirrors Svalbard (9170-9178) and Jan Mayen (8099) postcodes from
the already-shipped NO.json into SJ's own country namespace.
Why
---
Svalbard archipelago and Jan Mayen Island are administered by Norway
and use Norwegian post codes already shipped in NO.json under state
codes 21 (Svalbard) and 22 (Jan Mayen). CSC represents Svalbard
and Jan Mayen as their own country (iso2=SJ, country_id=211), so
without a companion SJ.json, postcode lookups for SJ return empty.
Coverage
--------
- 8 codes / country-only ship (SJ has no sub-state hierarchy in CSC)
- Svalbard: 9170, 9171 Longyearbyen; 9173 Ny-Ålesund; 9174 Hopen;
9175 Sveagruva; 9176 Bjørnøya; 9178 Barentsburg
- Jan Mayen: 8099
Source pipeline
---------------
1. Read NO.json (Bring mirror)
2. Filter to 8 SJ-target codes
3. Re-FK to country_id=211 (SJ)
4. Title-case locality names from the bring-shipped uppercase form
License
-------
Original source: Bring (Norway Post) via Norway importer.
Each row: source: "bring-via-sj-mirror"
Validation
----------
- python3 -m py_compile passes
- 100% regex match (^\d{4}$)
- No state_id (country-only)
- No auto-managed fields (id, created_at, updated_at, flag)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
CSC Validation ReportPR Format
Labels applied: Schema Validation (8 records)✅ All records passed validation Cross-Reference Validation✅ 8 reference(s) verified Source URL Verification✅ 1 source URL(s) accessible ✅ All checks passed | Status: Ready for review |
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
NO.jsoninto SJ's own country namespace for Can we add a postcode for this? #1039Source
NO.jsonunder state codes 21 (Svalbard) and 22 (Jan Mayen)SJ.jsonso consumers querying bycountry_code='SJ'get the data directlyCoverage
Test plan
python3 -m py_compile bin/scripts/sync/import_svalbard_jan_mayen_postcodes.py^\d{4}$state_id(country-only)🤖 Generated with Claude Code