Skip to content

feat(postcodes/AU): bulk-import 3,175 codes via Australia Post (#1039)#1434

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

feat(postcodes/AU): bulk-import 3,175 codes via Australia Post (#1039)#1434
dr5hn merged 1 commit into
masterfrom
feat/postcodes-australia-bulk

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 27, 2026

Summary

Adds Australian postcodes via the matthewproctor/australianpostcodes mirror (CC-BY 4.0 attributed to Australia Post).

  1. bin/scripts/sync/import_australia_post_postcodes.py — pipeline grouping CSV rows by postcode, picking one canonical record per code (first locality alphabetically).

  2. contributions/postcodes/AU.json3,175 codes covering all 8 states/territories.

Validation (zero errors across 3,175 records)

Check Result
Records 3,175
state_id resolved 100%
Coordinates present 100%
Codes matching postal_code_regex (^\d{4}$)
FK resolution
state_codestate.iso2 agreement
No auto-managed fields

State resolution

CSV state codes (ACT, NSW, NT, QLD, SA, TAS, VIC, WA) match states.iso2 exactly — no alias map needed.

License

  • Upstream: Australia Post (CC-BY 4.0)
  • Mirror: github.com/matthewproctor/australianpostcodes
  • Each row: source: "australia-post"

Cumulative postcode coverage after this lands

~212,000 postcode rows across 21 countries.

Refs: #1039

Adds the importer + first run for Australia. Australia Post publishes
postcode data under CC-BY 4.0; this PR uses the community-maintained
matthewproctor/australianpostcodes mirror as the source-of-truth feed
(redistributable under the same CC-BY licence).

1. bin/scripts/sync/import_australia_post_postcodes.py — pipeline that
   groups CSV rows by postcode and picks one canonical record per code
   (first locality alphabetically). State resolution is direct iso2
   match: CSV uses ACT/NSW/NT/QLD/SA/TAS/VIC/WA, identical to states.json.

2. contributions/postcodes/AU.json — 3,175 records covering all 8
   Australian states/territories 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: Australia Post (CC-BY 4.0)
- Mirror: github.com/matthewproctor/australianpostcodes
- Each row: source: "australia-post"

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 08:49
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 3175 records. Large contributions require manual review.

Schema Validation (3175 records)

✅ All records passed validation

Cross-Reference Validation

✅ 6350 reference(s) verified

Geo-Bounds Check

  • ⚠️ contributions/postcodes/AU.json: Record 979: coordinates (-31.55247, 159.081217) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2148: coordinates (-9.584901, 143.769211) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2911: coordinates (-10.487053, 105.64067) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2912: coordinates (-12.169719, 96.83152) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2982: coordinates (0, 0) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2990: coordinates (0, 0) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)
  • ⚠️ contributions/postcodes/AU.json: Record 2996: coordinates (0, 0) fall outside AU bounds [-43.64, -10.06] x [113.15, 153.64] (with 0.45deg tolerance)

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

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