Postal Codes Dataset for Kenya, KE

268
Updated:
Files:1
Size:48.3 kB
Rows:890
Formats:csv
License:CC-BY-4.0

Postal Codes Dataset for Kenya, KE 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-ke/
https://datahub.io/logistics/postal-codes-ke/_r/-/.licensing-notes.md
https://datahub.io/logistics/postal-codes-ke/_r/-/.migration-notes.md
https://datahub.io/logistics/postal-codes-ke/_r/-/ATTRIBUTION.txt
https://datahub.io/logistics/postal-codes-ke/_r/-/README.md
https://datahub.io/logistics/postal-codes-ke/_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-ke/_r/-/datapackage.yaml
README.md— documentation
https://datahub.io/logistics/postal-codes-ke/_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-ke-sample

About

Last updated
6 October 2026
Total rows
100
Format
CSV
File size
5.72 kB

About this dataset

Kenya (KE): 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.30 (closed 2026-10-02)
  • Commit: 76630d2 (worktree commit 1bc644c, identical diff), landed in batch 2; accuracy wording later changed in 5311ad3
  • Parity verdict: explained (row_order only); signed off by the user
  • Producer: custom, refresh disabled

Sources

InputURLNotes
GeoNames postal exporthttps://download.geonames.org/export/zip/KE.zipThe only input the old builder used

Posta Kenya's "Post Office and Post Office Code Locator" on openAFRICA is an unresolved lead (its CKAN API was behind a Cloudflare challenge on 2026-09-03, per the produce.py docstring). Not pursued in P5.

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

Rows: 890 live and 890 fresh, none only on one side, 0 changed cells. One class, row_order. Live is CRLF, fresh is LF. The informational check against the public sample came out unexplained; it doesn't affect the gate.

Cause: GeoNames reordered its export (rows moved within a postal code). Examples:

  • 30705: live has Kipsaiya before Kapsumai; fresh has Kapsumai first.
  • 30411 Kipsaraman, 20424 Oloomirani, 40329 Pala, 20131 Keringet each moved by one line within their group.

Decisions

DecisionByBasis
Accept row_orderUser, 2026-10-02 ("agree to all", session 2479b1c9)Batch 2 sign-off in docs/parity/p5.md
Accuracy description admits undocumented valuesAgent flagged 8 rows with accuracy 3 (e.g. 30705 Kipsaiya/Kapsumai; the rest 1 ×337, 4 ×545); orchestrator reworded all batch-2 descriptors in 5311ad3Reported to the user with batch 2; "agree to all"
Remove row and distinct-code counts and "0 collisions" from README and descriptor; drop the stale licence_status.decision sentenceOrchestrator instruction (P5 brief)Kept "47/47 counties"

Transforms carried over

From build_postal_codes_product.py:

  • admin_code1 → ISO 3166-2:KE by a name crosswalk of the 47 counties, keyed on GeoNames' spellings ("Elegeyo-Marakwet", "Murang'A", "Tharaka - Nithi"). GeoNames' own code is alphabetical with Nairobi as "05", unrelated to ISO.
  • alternative_city_name empty; admin2/admin3 stay empty (the source stops at county level).
  • The old asserts are ProducerErrors: every county maps, unique (postal_code, place_name), no literal "nan", no float accuracy. New check: all 47 counties present. No row-count assert.
  • build_postal_codes_product.py and publish_r2.py removed.

Open questions

  • ATTRIBUTION.txt ("890 rows") and .licensing-notes.md still carry counts; left for the end-of-epic sweep (pc-hfz, which subsumes pc-3d2).

Provenance

Reconstructed 2026-10-05 from the agent transcript 2479b1c9-c4dd-47e5-be82-34ccf8d49a80/subagents/agent-a6e55695bfab5e5f9.jsonl, the orchestrator session 2479b1c9-…, the commit messages (76630d2, 5311ad3), the bd close reason and docs/parity/p5.md.