Postal Codes Dataset for Puerto Rico, PR

322
Updated:
Files:1
Size:10.1 kB
Rows:177
Formats:csv
License:CC-BY-4.0

Postal Codes Dataset for Puerto Rico, PR including name of the city, town, or place, various administrative divisions and alternative city names.

Part of a Data Solution

  • Postal Codes Solution

    Every worldwide postal-code dataset in one bundle — the ultimate global reference for precise postal codes.

    Explore →

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
20% off
$49.90$39.92
one-time payment

API Access

Access dataset files directly from scripts, code, or AI agents.

Browse dataset files
Dataset Files

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.

/logistics/postal-codes-pr/
https://datahub.io/logistics/postal-codes-pr/_r/-/.licensing-notes.md
https://datahub.io/logistics/postal-codes-pr/_r/-/.migration-notes.md
https://datahub.io/logistics/postal-codes-pr/_r/-/ATTRIBUTION.txt
https://datahub.io/logistics/postal-codes-pr/_r/-/README.md
https://datahub.io/logistics/postal-codes-pr/_r/-/datapackage.yaml
Key Files

Start with these files — they give you everything you need to understand and access the dataset.

datapackage.yaml— metadata & schema
https://datahub.io/logistics/postal-codes-pr/_r/-/datapackage.yaml
README.md— documentation
https://datahub.io/logistics/postal-codes-pr/_r/-/README.md
Typical Usage
  1. 1. Fetch datapackage.yaml to inspect schema and resources
  2. 2. Download data resources listed in datapackage.yaml
  3. 3. Read README.md for full context

Data Files

postal-codes-pr-sample

About

Last updated
2 October 2026
Total rows
100
Format
CSV
File size
5.73 kB

About this dataset

Puerto Rico (PR): 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.46 (closed 2026-10-02)
  • Commit: 7c3cfc1 (worktree commit 82b1183), landed in batch 3
  • Parity verdict: format-only (gate passes)
  • Producer: custom, refresh disabled

Sources

InputURLNotes
GeoNames postal exporthttps://download.geonames.org/export/zip/PR.zipThe only input; same URL as the old builder

The US Census ZCTA Gazetteer would be preferable, but on 2026-09-16 census.gov returned HTTP 403 and api.census.gov needs a key (see .licensing-notes.md). It also has no place or municipio names.

Parity against the live zip (2026-10-02)

Rows: 177 live and 177 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

DecisionByBasis
Accept CRLF→LFStanding rule (line-ending-only, user, 2026-10-02)format-only passes the gate
admin_code1 is the 5-digit Census FIPS code, not an ISO codeAgent: a faithful portISO 3166-2 defines no PR subdivisions
Refuse postal codes that aren't 00[679]NN instead of padding themAgent: a faithful portThe old builder asserted the source keeps the leading zero
Remove row, distinct-code and "0 collisions" counts from README and description; keep "78 municipios"Orchestrator instruction (README counts rule, plan §4 P5)Counts drift

Transforms carried over

From build_postal_codes_product.py (now removed, with publish_r2.py):

  • postal_code keeps its leading zero; anything not 5 digits starting 006/007/009 is a ProducerError.
  • admin_code1 = "72" + GeoNames' 3-digit municipio code. The 3-digit codes must match the PR county-equivalent roster (odd 001–153 plus 054), every municipio must be present, and name↔code must be 1:1.
  • admin_name2/code2/name3/code3 are empty: a literal "nan" is blanked, any other value is refused.
  • alternative_city_name is empty.
  • The old asserts are now ProducerErrors; unique (postal_code, place_name) and non-empty coordinates are checked. No row-count assert.

Open questions

  • .licensing-notes.md still contains counts ("176 rows", a stale historical figure); it is left for the end-of-epic sweep (pc-hfz).

Provenance

Reconstructed 2026-10-05 from the agent transcript 2479b1c9-c4dd-47e5-be82-34ccf8d49a80/subagents/agent-a76af718598b67a36.jsonl (the run was cut off by a rate limit and resumed), the orchestrator session 2479b1c9-…, the commit message, docs/parity/p5.md and the bd close reason.