Postal Codes Dataset for Malaysia, MY

526
Updated:
Files:1
Size:156 kB
Rows:2,931
Formats:csv

Postal Codes Dataset for Malaysia, MY 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 — postal layer (MCMC, via data.gov.my) 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-my/
https://datahub.io/logistics/postal-codes-my/_r/-/.licensing-notes.md
https://datahub.io/logistics/postal-codes-my/_r/-/.migration-notes.md
https://datahub.io/logistics/postal-codes-my/_r/-/ATTRIBUTION.txt
https://datahub.io/logistics/postal-codes-my/_r/-/README.md
https://datahub.io/logistics/postal-codes-my/_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-my/_r/-/datapackage.yaml
README.md— documentation
https://datahub.io/logistics/postal-codes-my/_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-my-sample


About this dataset

Malaysia (MY): 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.37 (closed 2026-10-03)
  • Commit: c45efd0 (worktree commit d57dfae, landed unchanged), batch 5
  • Parity verdict: format-only (CRLF → LF); passes the gate
  • Producer: custom, refresh disabled

Sources

InputURLNotes
MCMC Postcode Dataset, via data.gov.myhttps://storage.data.gov.my/dictionaries/postcodes.csvStable URL (catalogue page data.gov.my/data-catalogue/poskod). Postal code, state, city
GeoNames postal exporthttps://download.geonames.org/export/zip/MY.zipCoordinates only, joined on postal code

Both are the inputs the old fetch_source.py already downloaded; nothing was switched.

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

Rows: 2,931 live and 2,931 fresh, none only on one side. 0 changed cells. With CRs stripped, the live my.csv and the fresh data/my.csv are byte-identical, so neither upstream had drifted since the live build.

The public 100-row sample (postal.datahub.io/my/my.csv) came out unexplained with 92 unclassified cells (informational only). The agent didn't look into it.

Decisions

DecisionByBasis
Land without askingStanding rule (row_order/CRLF-only, user, 2026-10-02)format-only, equal rows, 0 changed cells
Remove row, distinct-code/place, coordinate-row and duplicate-PK counts from README ("8.6% of rows" → "Some rows"); keep "16 of 16 states"Agent, per the README counts ruleATTRIBUTION.txt untouched
Accuracy description replaced with the standard GeoNames wordingAgent, per the producer brief

Transforms carried over (unchanged)

Folded from fetch_source.py → build_postal.py → build_deliverable.py → run_qa.py (the scripts README, delivery_README_template.md and publish_r2.py deleted):

  • Every MCMC field is whitespace-trimmed first. Untrimmed, "Negeri Sembilan " and "Bestari Jaya " create a fake 17th state and a duplicate row. Exact (state, city, postcode) duplicates are then dropped.
  • Coordinates joined on postal code only: the single GeoNames point for the code if there is one, else the unique city-name match (case- and space-insensitive), else empty. Never averaged.
  • lat/lon rounded to 5 dp with trailing zeros stripped; accuracy passed through.
  • admin_code1 = ISO 3166-2:MY without the MY- prefix, keyed on MCMC's state spelling.
  • admin_name2/3, admin_code2/3 and alternative_city_name stay empty.
  • Rows sorted by (admin_code1, postal_code, place_name).
  • Old asserts and QA checks are now ProducerErrors: unknown state, postal code not 5 digits, any of the 16 states missing, duplicate (postal_code, place_name), coordinates outside Malaysia's bounding box. No row-count assert.

Open questions

  • The README Fields table still has a "Fill" column with row-derived percentages (e.g. 91.4%), and the Contents table still lists validation_report.json, which neither the live nor the fresh zip contains. Flagged by the agent; left for the end-of-epic sweep (pc-hfz).
  • .licensing-notes.md still carries counts ("2,931 rows"); left for pc-hfz.

Provenance

Reconstructed 2026-10-05 from the agent transcript d33e1b7e-5027-498a-a97f-ba914ee2524e/subagents/agent-a34cbfef792ad386c.jsonl, the orchestrator session d33e1b7e-… (landing under the standing rule), the commit message, the bd close reason and docs/parity/p5.md.