Skip to content

feat(postcodes/DK): bulk-import 1,089 codes via DAWA (#1039)#1440

Merged
dr5hn merged 1 commit into
masterfrom
feat/postcodes-denmark-bulk
Apr 27, 2026
Merged

feat(postcodes/DK): bulk-import 1,089 codes via DAWA (#1039)#1440
dr5hn merged 1 commit into
masterfrom
feat/postcodes-denmark-bulk

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 27, 2026

Adds Danish postcodes via DAWA (CC-0 public sector data).

1,089 codes, 100% state + 100% coords. Region resolution via DAWA's kommune→region links (5 regions: Hovedstaden=84, Sjælland=85, Syddanmark=83, Midtjylland=82, Nordjylland=81).

License: SDFI Dataforsyningen DAWA (CC-0).

Refs: #1039

Adds Danish postcodes via DAWA (Danmarks Adressers Web API) — public
sector data published under CC-0 by SDFI/Dataforsyningen.

1. bin/scripts/sync/import_denmark_postcodes.py — pipeline that fetches
   /kommuner to build a kommune-code -> region-name map, then resolves
   each /postnumre record's region via its first kommune. Maps the 5
   Danish region names to states.json iso2 codes:
     Region Hovedstaden -> 84 (called "Denmark" in states.json)
     Region Sjælland    -> 85 (Zealand)
     Region Syddanmark  -> 83 (Southern Denmark)
     Region Midtjylland -> 82 (Central Denmark)
     Region Nordjylland -> 81 (North Denmark)

2. contributions/postcodes/DK.json — 1,089 codes covering all 5 regions
   with 100% state_id + 100% coordinate resolution.

Validation (zero errors)
- All codes match countries.postal_code_regex (^(\\d{4})\$)
- All FKs resolve, all state_codes agree with state.iso2

License & attribution
- Source: SDFI / Dataforsyningen DAWA (CC-0)
- Each row: source: "dawa"

Refs: #1039

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 27, 2026 11:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Apr 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CSC Validation Report

PR Format

  • ✅ Description provided
  • ❌ Data source linked
  • ✅ Issue linked (recommended for data changes)
  • ✅ Justification / context provided

Labels applied: data:postcodes, large-contribution

⚠️ Large Contribution

This PR contains 1089 records. Large contributions require manual review.

Schema Validation (1089 records)

✅ All records passed validation

Cross-Reference Validation

✅ 2178 reference(s) verified

Geo-Bounds Check

  • ⚠️ contributions/postcodes/DK.json: Record 574: coordinates (55.30340399, 15.67679007) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 834: coordinates (55.28286185, 7.56593986) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 850: coordinates (55.43289751, 5.24215492) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 851: coordinates (55.71982269, 4.43594447) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 853: coordinates (55.45206547, 6.6069035) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 862: coordinates (56.20098497, 4.07461311) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 863: coordinates (55.93212987, 4.28511819) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 908: coordinates (56.54689645, 5.04556549) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 911: coordinates (56.86776362, 6.26580665) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/DK.json: Record 916: coordinates (57.2597249, 7.47858654) fall outside DK bounds [54.56, 57.75] x [8.08, 15.2] (with 0.45deg tolerance)

0 errors, 12 warning(s) | Status: Ready for review (with warnings)

@dr5hn dr5hn merged commit c8d3514 into master Apr 27, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-denmark-bulk branch April 27, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:postcodes enhancement New feature or request large-contribution ready-for-review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants