feat(postcodes/HU): 3,569 Magyar Posta codes (#1039)#1486
Merged
Conversation
Adds the full Magyar Posta + KSH Helységnévtár postal-code dataset joined by ferenci-tamas/IrszHnk (Feb 2026 refresh). Why --- Closes the HU gap on issue #1039. The single-file CSV from the ferenci-tamas mirror joins the official Magyar Posta workbook with the KSH gazetteer, giving postcode + settlement + sub-district + megye in one row. Coverage -------- - 3,569 codes / 100% state FK resolution - All 19 megyék + Budapest covered (20 of 43 CSC HU iso2 entries) - Cities of county rank (Pécs, Szeged, Debrecen, ...) are CSC-only iso2 entries; the source authoritatively reports megye, so those cities resolve to their containing megye State FK strategy ----------------- 20-entry hand-curated SOURCE_TO_ISO2 handles two name drifts: - 'főváros' (lit. "the capital") -> CSC 'BU' Budapest - 'Csongrád-Csanád' (2020 rename) -> CSC older 'CS' Csongrád County License ------- Repo has no LICENSE file. Upstream is official Hungarian government open data (Magyar Posta + KSH). Tier 5 per #1039 license-tier policy (free redistribution permitted, no formal licence). Each row: source: "magyar-posta-via-ferenci-tamas". Validation ---------- - python3 -m py_compile passes - 100% regex match (^\d{4}$) - 100% state_id valid + state.country_id == 99 + 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
ferenci-tamas/IrszHnk— joins Magyar Posta workbook with KSH Helységnévtár (Hungarian Central Statistics Office gazetteer)IrszHnk.csv(semicolon-delimited)State FK strategy
The CSV's
Vármegye.megnevezésecolumn gives the megye/county name. CSC has 43 HU iso2 entries (19 megyék + Budapest + 23 cities of county rank); since the CSV authoritatively reports megye, we map to those 20 county-level entries via a hand-curatedSOURCE_TO_ISO2.Two name drifts handled:
'főváros'(lit. "the capital") → CSCBUBudapest'Csongrád-Csanád'(2020 rename) → CSC olderCS"Csongrád County"Cities of county rank (Pécs, Szeged, Debrecen, ...) resolve to their containing megye since the source has no city-of-county-rank flag in the postcode dataset.
Distribution
Test plan
python3 -m py_compile bin/scripts/sync/import_hungary_postcodes.py^\d{4}$id,created_at,updated_at,flag)🤖 Generated with Claude Code