Skip to content

feat(postcodes/SE): bulk-import 16,361 codes via SE community mirror (#1039)#1442

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

feat(postcodes/SE): bulk-import 16,361 codes via SE community mirror (#1039)#1442
dr5hn merged 1 commit into
masterfrom
feat/postcodes-sweden-bulk

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 27, 2026

Adds Swedish postcodes (~16k) via the zegl/sweden-zipcode community CSV.

state_id is null on every row. Swedish postcodes were assigned by sorting-route geography rather than administrative county boundaries, so there is no reliable prefix-to-county mapping; the source CSV has no kommune column. State backfill is a follow-up using a kommune-postcode crosswalk from Skatteverket open ortsdata.

Codes formatted as ### ## to match the SE postal_code_regex.

Refs: #1039

…1039)

Adds Swedish postcodes via the zegl/sweden-zipcode community CSV.

1. bin/scripts/sync/import_sweden_postcodes.py — pipeline reading
   Zip,City CSV. Formats codes in '### ##' form to match the SE regex.

2. contributions/postcodes/SE.json — 16k+ records.

state_id is null on every row: Swedish postcodes are organised by
sorting-route geography, not administrative county. Without a
kommune-postcode crosswalk the source CSV does not include, no
reliable state assignment is possible. State backfill remains a
follow-up using Skatteverket open ortsdata.

License & attribution
- Mirror: github.com/zegl/sweden-zipcode
- Each row: source: 'se-zipcode'

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:32
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 16392 records. Large contributions require manual review.

Schema Validation (16392 records)

✅ All records passed validation

Cross-Reference Validation

✅ 16392 reference(s) verified


All checks passed | Status: Ready for review

@dr5hn dr5hn merged commit 69601e3 into master Apr 27, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-sweden-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