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.
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
Explore with AIpostal-codes-zw
| Field | Type | Description | Title |
|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 -- always ZW | Country Code |
| postal_code | string | Always empty -- Zimbabwe has no operational postal code system. Not a data gap; a structural fact about the country. | Postal Code |
| place_name | string | Locality/place name (GeoNames populated place) | Place Name |
| admin_name1 | string | Province -- all 10 covered; blank where GeoNames assigns a place to no province | Administrative Name 1 |
| admin_code1 | string | ISO 3166-2:ZW code | Administrative Code 1 |
| admin_name2 | string | Not populated in this release | Administrative Name 2 |
| admin_code2 | string | Not populated | Administrative Code 2 |
| admin_name3 | string | Not populated | 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 | Not populated -- the GeoNames gazetteer dump carries no accuracy field | Accuracy |
| alternative_city_name | string | Not populated in this release | Alternative City Name |
Download
Download CSVAbout
- Last updated
- 6 October 2026
- Total rows
- 2,101
- Format
- CSV
- File size
- 120 kB
About this dataset
Zimbabwe (ZW): migration notes
Internal record of the P6 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.8.26
- Commit: see
git log -- datasets/zw/(P6 zw commit on feat/single-source-of-truth, basee797eb1) - Parity verdict:
format-only(gate: pass, exit 0); CRLF→LF only - Producer:
custom, refresh disabled
Sources
| Input | URL | Notes |
|---|---|---|
| GeoNames gazetteer dump | https://download.geonames.org/export/dump/ZW.zip | ZW.txt, filtered to feature class P. The old builder read a local sources/ZW.txt snapshot of this file |
| GeoNames admin1 table | https://download.geonames.org/export/dump/admin1CodesASCII.txt | Used only to check GeoNames' province labels against the crosswalk. The old builder read a local sources/geonames_admin1CodesASCII.txt snapshot and joined on it by name |
- Both URLs are stable, unversioned GeoNames URLs. The fetch date and sha256 are recorded in
zw.inputs.json;--no-fetchreuses the cache. - Zimbabwe has no postal-code system and GeoNames has no postal export for ZW (
export/zip/ZW.zipis a 404), sopostal_codeis empty on every row.pipeline.postal_code_required: falsetells build.py this is intended (bj precedent).
Parity against the live public CSV (2026-10-05)
Rows: 2,101 live and 2,101 fresh, none only on one side, 0 changed cells, no cell classes, 0 duplicate keys. Once CRLF is normalised to LF the fresh zw.csv is byte-identical to the live CSV, including row order. Live sha256 c7f8001c…, fresh 544a432d… (the only difference is line endings).
No discrepancies to explain. The GeoNames dump at migration time still has 2,101 populated places, 2 of them on the reserved admin1 code 00 (Nyamapande, Sango), as on 2026-09-15.
Decisions
| Decision | By | Basis |
|---|---|---|
| Accept the CRLF→LF difference | Standing rule (P5 sign-off: row_order/CRLF-only pre-approved) | Equal rows, 0 changed cells |
| Drop the minimum-count assert (≥ 1,800 places) | P6 brief | Replaced by structural checks: every dump row is ZW, all 10 provinces present, primary key unique, GeoNames labels match the crosswalk, no literal nan |
| Key the crosswalk on GeoNames' bucket code (ZW.01–ZW.10) and check each GeoNames label, instead of joining on the label | Agent: port choice (bj pattern) | Same output; an upstream rename now stops the build with a clear message instead of a KeyError |
An admin1 code other than 00/blank that isn't in the crosswalk stops the build | Agent: port choice (bj precedent) | The old builder blanked it silently; blanking a real but new province would hide a crosswalk gap |
latitude/longitude typed number; accuracy stays string | Agent, per the brief | accuracy is empty on every row (the gazetteer dump has no accuracy field), so it isn't numeric data and doesn't get the GeoNames accuracy description |
primaryKey: [place_name, latitude, longitude] | Agent, from the produced CSV | Unique in the produced CSV (bj precedent). The old builder's PK also included admin_name1, which is redundant and blank on the 00 rows. (place_name, admin_code1) and (latitude, longitude) are not unique |
pipeline.postal_code_required: false | Brief rule (bj precedent) | postal_code is empty on every row |
Add admin1CodesASCII.txt to the descriptor sources | Agent | It is a fetched input |
| Field descriptions taken from the old builder's datapackage.json (minus counts) | Agent (bj precedent) | The P3 generic descriptions said "Postal code for the location" etc. The postal_code description no longer points at ATTRIBUTION.txt, which a free dataset doesn't ship |
Remove the row count from the descriptor description and README | Brief doc rule | Province count ("all 10") kept |
Transforms carried over
From build_postal_codes_product.py:
- Feature class
Ponly;place_nameis the dump'snamecolumn; latitude/longitude copied verbatim. admin_code1→ ISO 3166-2:ZW for the 10 provinces (verified against en.wikipedia.org/wiki/ISO_3166-2:ZW on 2026-09-15),admin_name1the ISO name, which drops GeoNames' " Province" suffix (Midlands, Mashonaland East, Matabeleland South, Masvingo).- Reserved admin1
00→ blank admin_name1/admin_code1. postal_code,accuracy,alternative_city_nameand admin tiers 2–3 empty.- Sorted by (admin_code1, place_name), ties in dump order.
- Not ported: the old builder's own datapackage.json, README, ATTRIBUTION and zip writing (build.py / committed docs handle those) and
publish_r2.py.
Open questions
- README.md was not the stale stub (it already describes the locality directory and says free), so only the row count was removed; no pending README rewrite.
- README.md still says "See
ATTRIBUTION.txtin the packaged data", but there is no ATTRIBUTION.txt in the repo for zw and free datasets ship no zip. Left alone; belongs to the pc-hfz sweep. .licensing-notes.mdstill carries dated counts and the staledata_available: false/licence_statuswording; left for pc-hfz.