Skip to content

feat(US): add USPS military postal regions (AA/AE/AP)#1387

Merged
dr5hn merged 2 commits into
masterfrom
feat/issue-1378-us-military-postal-regions
Apr 25, 2026
Merged

feat(US): add USPS military postal regions (AA/AE/AP)#1387
dr5hn merged 2 commits into
masterfrom
feat/issue-1378-us-military-postal-regions

Conversation

@dr5hn
Copy link
Copy Markdown
Owner

@dr5hn dr5hn commented Apr 25, 2026

Closes #1378

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

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:

Field Value Rationale
type "military postal region" Not "state" — these aren't ISO 3166-2 entities
iso2 AA / AE / AP The USPS state-code abbreviation
state_code same as iso2 Mirrors iso2 for consumer convenience
iso3166_2 null No ISO 3166-2 subdivision code exists for these
level null No administrative hierarchy
parent_id null Top-level under US
latitude / longitude null Each region spans many non-contiguous areas worldwide; a centroid would be misleading
translations {} No canonical localised names; can be added later
native same as name English is the operational language

Auto-managed fields (id, created_at, updated_at, flag) are intentionally omitted per CLAUDE.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.js against the new records: 0 errors, 6 warnings. The warnings are about iso3166_2 and translations not 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 type value and the null lat/lon — happy to revise if you'd prefer a different convention.

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>
Copilot AI review requested due to automatic review settings April 25, 2026 11:23
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Apr 25, 2026
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.

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>
@dr5hn dr5hn merged commit 6cfc2da into master Apr 25, 2026
1 check failed
@dr5hn dr5hn deleted the feat/issue-1378-us-military-postal-regions branch April 25, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

US Military "states"

2 participants