Postal Codes Dataset for Chile, CL

455
Updated:
Files:1
Size:38.6 kB
Rows:346
Formats:csv
License:CC-BY-4.0

Postal Codes Dataset for Chile, CL 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 license
20% off
$9.90$7.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-cl/
https://datahub.io/logistics/postal-codes-cl/_r/-/.licensing-notes.md
https://datahub.io/logistics/postal-codes-cl/_r/-/.migration-notes.md
https://datahub.io/logistics/postal-codes-cl/_r/-/ATTRIBUTION.txt
https://datahub.io/logistics/postal-codes-cl/_r/-/README.md
https://datahub.io/logistics/postal-codes-cl/_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-cl/_r/-/datapackage.yaml
README.md— documentation
https://datahub.io/logistics/postal-codes-cl/_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-cl-sample

About

Last updated
11 October 2026
Total rows
100
Format
CSV
File size
11.7 kB

About this dataset

Chile (CL): migration notes

Internal record of the P5 migration from the old script to the producer: the discrepancies found, their causes, and who decided what. This is a dated record (2026-10-11), so the numbers are as of the migration and not kept current. It is not shipped in the zip.

  • Issue: datopian/postal-codes#41 (no builder scripts in the repo)
  • Commits: the recovered builder, then the producer (this branch)
  • Parity verdict: format-only (gate: pass)
  • Producer: custom, refresh disabled

Recovered builder

The four-step chain fetch_source.py → build_base.py → integrity_checker.py → package.py (dated 2026-08-31) was found uncommitted under the old top-level cl/ folder in the working copy, together with the saved GeoNames CL.txt. It is committed unchanged in the commit before this one, then removed by the producer commit. (publish_r2.py from the same folder is not recovered: every per-dataset R2 writer is replaced by scripts/publish_r2.py.)

Re-run on 2026-10-11 against its saved inputs it reproduces the live cl.csv byte for byte (sha256 95fe7c6cb3…). The producer was then checked the same way: its transform() on those saved inputs gives the live data, differing only in line endings.

Sources

InputURLNotes
GeoNames postal exporthttps://download.geonames.org/export/zip/CL.zipCC BY 4.0. The only source. GeoNames truncates Chilean codes, so this is comuna-level

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

Rows: 346 live and 346 fresh, none only on one side, 0 changed cells. The only difference is CRLF → LF. The public sample matches the zip (format-only).

GeoNames' file hasn't changed for Chile since the live build, so there is no upstream drift to explain.

Decisions

DecisionByBasis
Port the recovered builder faithfully; no new source or logicUser, 2026-10-11The 2026-10-03 rule ("no producer from scratch when no builder exists") doesn't apply: the builder was found, and re-running it reproduces the live CSV byte for byte
LF line endings (the old script wrote CRLF)Standing rule (user, 2026-10-02)format-only verdicts pass; every shared producer writes LF
Drop the hardcoded row-count assertP5 ruleStructural checks (columns, uniqueness, formats, full admin coverage) stand in
Keep README.md and ATTRIBUTION.txt from the repo; don't re-harvest them from the live zipAgent, following PR #38The repo copies were corrected there (no hardcoded data, true sources); the zip copies still carry counts and the old wording
refresh.enabled: falseAgentNothing publishes before the owner signs off; flip it when R2 is updated

Transforms carried over

  • admin_code1 = the first two digits of admin_code3 (the comuna code), never GeoNames' own region number. The build stops if a prefix maps to more than one region name.
  • Codes are kept as text (the legacy pandas copy lost leading zeros).
  • Checks (7-digit postal codes, 5-digit comuna codes, region codes 01-15, no nan, unique (postal_code, admin_name3), Chile's bounding box with the Antarctic comuna exempt) are ProducerErrors.
  • Known gap, disclosed in the README: 21 Ñuble comunas stay under Biobío (the export pre-dates the 2018 split).

Open questions

  • Correos de Chile's terms and Chile's database-protection position are unconfirmed (.licensing-notes.md); the data is GeoNames' CC BY 4.0 export.
  • R2 is untouched. Publishing waits for the owner's sign-off.

Provenance

Written 2026-10-11 from the recovered script, the re-run against R2, scripts/parity.py cl (reads the live zip, writes nothing) and the Frictionless validation of the built zip.