Part of a Data Solution
- Explore →
Postal Codes Solution
Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.
Premium
You're viewing a free sample
Get the complete dataset — all rows and files — delivered instantly after checkout, with lifetime access to the latest version.
- Secure checkout via Stripe
- Instant download after payment
- Lifetime access to the latest version
- Creative Commons Attribution 4.0 International license
API Access
Access dataset files directly from scripts, code, or AI agents.
Browse dataset files
API Access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.
Start with these files — they give you everything you need to understand and access the dataset.
- 1. Fetch datapackage.yaml to inspect schema and resources
- 2. Download data resources listed in datapackage.yaml
- 3. Read README.md for full context
Data Files
postal-codes-pa-sample
| Field | Type | Description | Constraints | Title |
|---|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always PA | Country Code | |
| postal_code | string | Panamanian postal code (5 digits) | { "pattern": "^\\d{5}$" } | Postal Code |
| place_name | string | Locality / corregimiento name | Place Name | |
| admin_name1 | string | Province or indigenous comarca, as supplied by the source | Administrative Name 1 | |
| admin_code1 | string | ISO 3166-2:PA code -- 10/14 subdivisions covered; blank where the source's admin1 bucket does not map to a single ISO subdivision (see ATTRIBUTION.txt) | Administrative Code 1 | |
| admin_name2 | string | Distrito (district) | Administrative Name 2 | |
| admin_code2 | string | GeoNames-internal distrito code -- NOT an ISO code (Panama's ISO 3166-2 register does not extend below province/comarca level) | Administrative Code 2 | |
| admin_name3 | string | Not populated -- no third admin tier in this source | Administrative Name 3 | |
| admin_code3 | string | Not populated | Administrative Code 3 | |
| latitude | number | GeoNames latitude (WGS84) | Latitude | |
| longitude | number | GeoNames longitude (WGS84) | Longitude | |
| accuracy | string | GeoNames accuracy of latitude/longitude. GeoNames documents 1=estimated, 4=geonameid, 6=centroid of addresses or shape; other values (e.g. 3) occur upstream without documentation. Empty where GeoNames gives none. | Accuracy | |
| alternative_city_name | string | Not populated in this release | Alternative City Name |
Download
Download sample CSVAbout
- Last updated
- 2 October 2026
- Total rows
- 100
- Format
- CSV
- File size
- 7.25 kB
About this dataset
Panama (PA): migration notes
Internal record of the P5 migration from the old scripts to the producer: the discrepancies found, their causes, and who decided what. This is a dated record, so the numbers are as of the migration and not kept current. It is not shipped in the zip.
- Issue: pc-28e.7.42 (closed 2026-10-02)
- Commit:
244e0b6(worktree commit50a9c14), landed in batch 2 - Parity verdict:
format-only(gate passes) - Producer:
custom, refresh disabled
Sources
| Input | URL | Notes |
|---|---|---|
| GeoNames postal export | https://download.geonames.org/export/zip/PA.zip | The only input; same URL as the old builder |
Panama's official codigospostalespanama.gob.pa has no bulk download (see .licensing-notes.md, 2026-09-11).
Parity against the live zip (2026-10-02)
Rows: 729 live and 729 fresh, none only on one side, 0 changed cells. With CRs stripped, the fresh CSV is byte-identical to live. The only difference is CRLF→LF. The informational sample check was also format-only.
Decisions
| Decision | By | Basis |
|---|---|---|
| Accept CRLF→LF | Standing rule (line-ending-only, user, 2026-10-02) | format-only passes the gate |
Leave admin_code1 blank for "Darien Y Comarca Embera" and "Comarca Wargandi" | Agent: a faithful port | No single ISO code for either bucket |
| Keep GeoNames' "Panama" bucket as PA-8 throughout | Agent: a faithful port | It predates the 2014 Panama Oeste (PA-10) split, and the source can't separate the rows. Documented, not resolved |
| Remove row, distinct-code, "30 rows" and "0 collisions" counts from README and descriptor; keep "10/14 subdivisions" | Orchestrator instruction (README counts rule, plan §4 P5) | Counts drift |
Reword the accuracy description to admit undocumented values | Orchestrator (commit 5311ad3, batch 2) | Applied to all landed GeoNames descriptors |
Transforms carried over
From build_postal_codes_product.py (now removed, with publish_r2.py):
admin_code1→ ISO 3166-2:PA by province name. GeoNames' numbering matches ISO for only 4 of 10 provinces, and the comarcas use KY/NB.- Literal "nan" → empty;
alternative_city_nameis empty. admin_name2/admin_code2(distrito) pass through as GeoNames-internal codes.- The old asserts are now
ProducerErrors: row shape and country, unmapped province, duplicate primary key, float-formatted accuracy. Added: all 10 ISO-mapped buckets present. No row-count assert.
Open questions
ATTRIBUTION.txt("729 rows", "29 rows", "214 rows") and.licensing-notes.mdstill contain counts; they are left for the end-of-epic sweep (pc-hfz).- Resolved (2026-10-05, pc-28e.7.60): README now says "GeoNames accuracy code" with no code list. Was:
README.mdstill lists the accuracy codes as "(1/4/6)"; only the descriptor was reworded.
Provenance
Reconstructed 2026-10-05 from the agent transcript 2479b1c9-c4dd-47e5-be82-34ccf8d49a80/subagents/agent-a15850c1d1ee1267d.jsonl, the orchestrator session 2479b1c9-…, the commit messages (244e0b6, 5311ad3), docs/parity/p5.md and the bd close reason.