feat(US): add USPS military postal regions (AA/AE/AP)#1387
Merged
Conversation
Adds three USPS military postal regions used for APO/FPO/DPO addressing
of US armed forces members:
- AA: Armed Forces of the Americas (Americas excluding Canada)
- AE: Armed Forces Europe (Europe, Middle East, Africa, Canada)
- AP: Armed Forces Pacific (Pacific & East Asia)
These are postal regions, not political states, so:
- type set to "military postal region" (not "state")
- iso3166_2 set to null (no ISO 3166-2 code exists)
- latitude/longitude set to null (regions cover huge non-contiguous areas)
- translations left as {} (no canonical localised names)
Source: https://faq.usps.com/s/article/How-Do-I-Address-Military-Mail
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds USPS military postal regions (AA/AE/AP) to the US entries in the states dataset to support APO/FPO/DPO addressing use cases.
Changes:
- Added three new US “military postal region” records: Armed Forces Europe (AE), Armed Forces of the Americas (AA), Armed Forces Pacific (AP).
- Populated these records with USPS-style codes and intentionally left certain geo/admin fields as
null.
Comment on lines
+53810
to
+53814
| { | ||
| "name": "Armed Forces Europe", | ||
| "country_id": 233, | ||
| "country_code": "US", | ||
| "iso2": "AE", |
Comment on lines
+53814
to
+53816
| "iso2": "AE", | ||
| "state_code": "AE", | ||
| "iso3166_2": null, |
- Remove spurious `state_code` field (state records don't carry this; it's a city-record field that points to the parent state). - Add the four missing nullable fields that every other state record has: `fips_code`, `timezone`, `wikiDataId`, `population` — all null since these postal regions don't have FIPS codes, span multiple timezones, lack a Wikidata entity, and have no defined population. - Reorder fields to match the canonical state-record key order (matching id 1462 Washington as the template). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #1378
Adds three USPS military postal regions used for APO/FPO/DPO addressing of US armed forces members:
Source: https://faq.usps.com/s/article/How-Do-I-Address-Military-Mail
Schema choices
These are postal regions, not political states, so they don't fit the typical state schema cleanly. Decisions made:
type"military postal region""state"— these aren't ISO 3166-2 entitiesiso2AA/AE/APstate_codeiso2iso2for consumer convenienceiso3166_2nulllevelnullparent_idnulllatitude/longitudenulltranslations{}nativenameAuto-managed fields (
id,created_at,updated_at,flag) are intentionally omitted perCLAUDE.md.Placement
Inserted at the end of the contiguous US block (after Washington), since existing US records aren't sorted alphabetically — they're in id-assignment order. This keeps the US block contiguous in the file.
Validation
Local run of
.github/scripts/validate-schema.jsagainst the new records: 0 errors, 6 warnings. The warnings are aboutiso3166_2andtranslationsnot being in the strict schema's known-field list — but every existing US state record carries those fields, so the warnings are pre-existing dataset-wide and not introduced by this PR.@dr5hn please review the schema choices, particularly the
typevalue and thenulllat/lon — happy to revise if you'd prefer a different convention.