Postal Codes Dataset for Pakistan, PK

282
Updated:
Files:1
Size:156 kB
Rows:2,563
Formats:csv
License:CC-BY-4.0

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

About

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

About this dataset

Pakistan (PK): 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.44 (closed 2026-10-02)
  • Commit: b76af60 (worktree commit 4e48049), landed in batch 2
  • 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/PK.zipThe only input; same URL as the old builder

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

Rows: 2,563 live and 2,563 fresh, none only on one side, 0 changed cells. Line endings went from CRLF to LF.

Cause: GeoNames reordered its export (upstream drift). Sorted, the two files are identical. Two pairs of rows swapped within a postal code:

Postal codeLive orderFresh order
40520Chak Ram Das, Chak MubarakChak Mubarak, Chak Ram Das
63050Jamalpur Edso, JamalpurJamalpur, Jamalpur Edso

The informational sample check reported unexplained against postal.datahub.io/pk/pk.csv. It doesn't feed the gate, and the cause was not traced.

Decisions

DecisionByBasis
Accept row_orderUser, 2026-10-02 (session 2479b1c9-…, "agree to all" to the batch-2 sign-off question)Recorded in the sign-off section of docs/parity/p5.md
Leave the one accuracy 3 row as an upstream valueAgentPresent in live and fresh
Reword the accuracy description to admit undocumented valuesOrchestrator (commit 5311ad3, batch 2); reported to the user with the batch-2 resultsThe standard text said "GeoNames documents no other values"
Remove row, distinct-code and collision counts from README and description; keep "7/7 covered"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):

  • admin_code1 → ISO 3166-2:PK by name across the 7 provinces/territories. GeoNames' own 02–08 code is an internal number.
  • Literal "nan" → empty; alternative_city_name is empty. admin_name2/admin_name3 stay empty.
  • The old asserts are now ProducerErrors: 12 columns and country PK per row, every province maps, unique (postal_code, place_name), all 7 provinces present, no float-formatted accuracy. No row-count assert.

Open questions

  • Resolved (2026-10-05, pc-28e.7.60): README now says "GeoNames accuracy code" with no code list. Was: README.md still lists the accuracy codes as "(1/4/6)", though the data has a 3. Only the descriptor was reworded.
  • .licensing-notes.md and ATTRIBUTION.txt ("2,563 rows") still contain counts. The agent flagged this; 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-a04ef573a310c3c65.jsonl, the orchestrator session 2479b1c9-…, the commit messages (b76af60, 5311ad3), docs/parity/p5.md and the bd close reason.