Published

Indonesia (ID) build pipeline

Postal Codes Dataset for Indonesia, ID including name of the city, town, or place, various administrative divisions and alternative city names.

Indonesia (ID) build pipeline

Self-contained — runs entirely from this repo, no fedex-agents-prototype dependency. Fixed 2026-08-19: every script previously computed ROOT = parents[3] and hardcoded countries/IDN/... subpaths, which only resolved correctly in that other repo's layout. All paths are now self-relative (ID_DIR = parent of this scripts/ folder), and data/, sources/, id_id/ all live as siblings under datasets/id/.

The buyer-facing README.md shipped in the delivery is a static, hand-authored document (real row counts and coverage stats baked in — not regenerated per run). It's committed here as delivery_README_template.md (next to this file, since data/ and id_id/ are gitignored/regenerable) and run_qa.py copies it into the delivery folder — update that template by hand if the shipped numbers ever change.

Run order (from this directory)

mkdir -p ../sources
curl -sL -o ../sources/wilayah.sql          https://raw.githubusercontent.com/cahyadsn/wilayah/master/db/wilayah.sql
curl -sL -o ../sources/wilayah_kodepos.json https://raw.githubusercontent.com/cahyadsn/wilayah_kodepos/master/json/wilayah_kodepos.json
curl -sL -o ../sources/ID.zip               https://download.geonames.org/export/zip/ID.zip
unzip -o -q ../sources/ID.zip ID.txt -d ../sources/

python3 build_admin.py
python3 build_postal.py
python3 build_deliverable.py
python3 run_qa.py
python3 publish_r2.py    # dry run by default; --apply to publish

See countries/IDN/README.md in fedex-agents-prototype (if available — not required to run this pipeline) for the original documented known-issues list: why the two admin sources disagree on ~14% of villages, and why unresolved rows are shipped with empty admin fields rather than guessed.

Sources

  • cahyadsn/wilayah + wilayah_kodepos (GitHub, MIT) — Indonesian administrative hierarchy and village-to-postcode mapping
  • GeoNames ID — CC BY 4.0

Verification (2026-08-19)

Fresh end-to-end run, MD5-identical to live R2. All sources fetched fresh into ../sources/. build_admin.py produced 38 provinsi / 514 kab-kota / 7,285 kecamatan / 83,762 desa — exact match to the counts documented in fedex-agents-prototype/CLAUDE.md's Admin Level Mapping Registry. build_deliverable.py produced 81,044 rows, cross-check agreement 69.2%/30.8% — exact match to the documented figures. Final id.csv MD5 f8535e27c7cced5181606a65e3233b8c, byte-for-byte identical to the live R2 object (same MD5, same 7,656,248 bytes). Frictionless valid. Publish dry-run: csv/datapackage/README byte-identical, zip differs by 2 bytes (zip container metadata/timestamp only, not content).