Postal Codes Dataset for Thailand, TH

304
Updated:
Files:1
Size:59.7 kB
Rows:903
Formats:csv
License:CC-BY-4.0

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


About this dataset

Thailand (TH): 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.53 (closed 2026-10-02)
  • Commit: 5819a50 (worktree commit ad2d5dd, same content), landed in batch 3
  • Parity verdict: explained (row_order only); signed off under the standing rule
  • Producer: custom, refresh disabled

Sources

InputURLNotes
GeoNames postal exporthttps://download.geonames.org/export/zip/TH.zip
GeoNames gazetteer dumphttps://download.geonames.org/export/dump/TH.zipFor alternative_city_name. Added to the descriptor's sources in this commit

The old builder already fetched both over the network. The kongvut/thai-province-data district/sub-district upgrade stays out (licence unresolved, per .licensing-notes.md).

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

Rows: 903 live and 903 fresh, none only on one side. 0 changed cells. The only class is row_order: the same row set, reordered within postal codes (e.g. at 10140, live row 6 is Thung Khru, fresh row 6 is Rat Burana; 123 lines change position). The live CSV is CRLF, the fresh one LF.

The informational sample check against https://postal.datahub.io/th/th.csv came back unexplained (unclassified 57, float_suffix_dropped 66). The agent attributed it to the public sample being the old release with float accuracy; it is outside the gate and was not traced further.

Decisions

DecisionByBasis
Accept the row_order verdict and landStanding rule (row_order/CRLF-only, user, 2026-10-02)Equal rows, 0 changed cells
custom producer rather than the shared geonames oneAgentThe shared producer cleans names and lets the last dump entry win; the live file uses the first, with names verbatim
Drop the old exact-count asserts (903 rows, admin_name2 filled on 13 rows)Orchestrator instructionBrief: structural checks only
Remove row, distinct-code, blank-accuracy, admin_name2-fill and alt-name-fill counts; keep "74 of 77 provinces"Orchestrator instruction (the user's README counts rule)
Standard GeoNames accuracy descriptionOrchestrator instruction
Replace the licence_status.decision sentence with "CC BY 4.0, compatible with this product – this dataset is cleared to sell"AgentBrief: keep the meaning in plain words

Transforms carried over

From build_postal_codes_product.py (2026-08-28):

  • Cells copied verbatim with the csv module (no pandas), so no literal "nan" and no "4.0" accuracy. The "nan" check is case-sensitive because Nan is a real province.
  • alternative_city_name = first non-empty, non-numeric alternate name of the first dump entry whose asciiname equals place_name. It is re-derived from today's dump, so it moves when GeoNames' gazetteer does.
  • admin_code1 stays GeoNames' own two-digit code, as in the live file (not ISO 3166-2:TH).
  • The old asserts are now ProducerErrors: malformed row / wrong country, 5-digit postal code, two-digit province code, no "nan", no float accuracy, admin_code2/admin_name3/admin_code3 still empty, unique (postal_code, place_name).

Open questions

  • ATTRIBUTION.txt still says "903 rows"; it belongs to the pc-hfz sweep.

Provenance

Reconstructed 2026-10-05 from the agent transcript 2479b1c9-c4dd-47e5-be82-34ccf8d49a80/subagents/agent-af44f17db267ae217.jsonl, the orchestrator session 2479b1c9-… (also checked 068ca403-… and 803a95aa-…: no th decisions), the commit message, the bd close reason and docs/parity/p5.md.