Skip to content

feat(postcodes/BE): bulk-import 1,145 codes via bpost (#1039)#1438

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

feat(postcodes/BE): bulk-import 1,145 codes via bpost (#1039)#1438
dr5hn merged 1 commit into
masterfrom
feat/postcodes-belgium-bulk

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 27, 2026

Summary

Adds Belgian postcodes via the jief/zipcode-belgium mirror of bpost open data.

  1. bin/scripts/sync/import_belgium_postcodes.py β€” pipeline using the standard Belgian postal-prefix β†’ province convention.
  2. contributions/postcodes/BE.json β€” 1,145 codes, 100% state_id + 100% coords.

Postal prefix β†’ province

Range iso2 Province
1000-1299 BRU Brussels-Capital
1300-1499 WBR Walloon Brabant
1500-1999 / 3000-3499 VBR Flemish Brabant
2000-2999 VAN Antwerp
3500-3999 VLI Limburg
4000-4999 WLG Liège
5000-5999 WNA Namur
6000-6599 / 7000-7999 WHT Hainaut
6600-6999 WLX Luxembourg
8000-8999 VWV West Flanders
9000-9999 VOV East Flanders

Validation (zero errors)

Check Result
Records 1,145
state_id resolved 100%
Coordinates 100%
Codes matching ^(\d{4})$ βœ…
FK resolution βœ…

License

  • Upstream: bpost open data
  • Mirror: github.com/jief/zipcode-belgium
  • Each row: source: "bpost"

Refs: #1039

Adds Belgian postcodes via the jief/zipcode-belgium mirror of bpost
open data.

1. bin/scripts/sync/import_belgium_postcodes.py β€” pipeline reading the
   2,757-row JSON (city,zip,lat,lng); groups by zip, picks first city
   alphabetically per code. State resolution by postal-prefix range
   following the standard Belgian convention (1000-1299 BRU,
   1300-1499 WBR, 1500-1999 VBR, 2xxx VAN, 3000-3499 VBR, 3500-3999 VLI,
   4xxx WLG, 5xxx WNA, 6000-6599 WHT + 6600-6999 WLX, 7xxx WHT,
   8xxx VWV, 9xxx VOV).

2. contributions/postcodes/BE.json β€” 1,145 unique postcodes covering
   all 10 provinces + Brussels-Capital with 100% state_id and 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
- No auto-managed fields present

License & attribution
- Upstream: bpost open data
- Mirror: github.com/jief/zipcode-belgium
- Each row: source: "bpost"

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:11
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 the size:XS This PR changes 0-9 lines, ignoring generated files. label 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 1145 records. Large contributions require manual review.

Schema Validation (1145 records)

βœ… All records passed validation

Cross-Reference Validation

βœ… 2290 reference(s) verified

Geo-Bounds Check

βœ… All 1145 coordinate(s) within expected country bounds


βœ… All checks passed | Status: Ready for review

@dosubot dosubot Bot added the enhancement New feature or request label Apr 27, 2026
@dr5hn dr5hn merged commit 61980eb into master Apr 27, 2026
1 check passed
@dr5hn dr5hn deleted the feat/postcodes-belgium-bulk branch April 27, 2026 11:25
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