feat(postcodes/LU): 4,491 Luxembourg CACLR codes (#1039)#1488
Merged
Conversation
Adds the official Luxembourg postcode dataset from CACLR (Centre des Adresses du Cadastre du Luxembourg) via data.public.lu, CC-Zero. Why --- Closes the LU gap on issue #1039. The CACLR registry is the canonical reference for Luxembourgish addresses, published by the LU government under public-domain CC-Zero. Coverage -------- - 4,491 unique (code, locality, canton) tuples / 100% state FK - All 12 CSC cantons covered Source pipeline --------------- 1. data.public.lu API resolves the latest caclr.xlsx URL (URL is date-stamped and rotates every refresh) 2. Importer parses the denormalised TR.DiCaCoLo.RuCp join sheet directly via openpyxl 3. SOURCE_TO_ISO2 maps 13 source canton labels to 12 CSC iso2 ('LUXEMBOURG-VILLE' capital sub-classification collapses to L) 4. 118 '?' postcodes (newly named streets without assigned codes) are filtered out License ------- CC-Zero (public domain). Each row carries `source: "caclr-data-public-lu"` for export-time provenance. Validation ---------- - python3 -m py_compile passes - 100% regex match (^(?:L-)?\d{4}$) - 100% state_id valid + state.country_id == 127 + state_code agrees - 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:
|
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
Source
caclr.xlsx, sheetTR.DiCaCoLo.RuCp(denormalised join with district/canton/commune/locality/street/postcode)Why this source (not OpenPLZ or population CSV)
rnpp-code-postal.csvships only postcode+population — no canton or locality FKcaclr.xlsxcarries the full join chain required for state FKState FK strategy
13 source canton labels collapse to 12 CSC iso2 codes via
SOURCE_TO_ISO2. The only sub-classification handled isLUXEMBOURG-VILLE(the capital city, which is its own administrative entity but sits inside canton Luxembourg) → CSCL.118 records with
?postcode (newly-named streets without assigned codes) are filtered before regex check.Distribution
Test plan
python3 -m py_compile bin/scripts/sync/import_luxembourg_postcodes.py^(?:L-)?\d{4}$id,created_at,updated_at,flag)🤖 Generated with Claude Code