Germany (DE) build pipeline
Rebuilt from the original GeoNames DE export rather than the copy already sitting in R2
(that copy was produced by scripts/geonames/geonames_parse_to_R2.py with pandas and no
dtype=str, which float-coerces numeric-looking admin codes and strips punctuation from
compound names — same defect class documented for PT).
Run order
python3 fetch_source.py # GeoNames DE.txt
python3 build_base.py
python3 recover_alt_names.py
python3 resolve_duplicates.py
python3 integrity_checker.py
python3 package.py
python3 publish_r2.py # written this session — did not exist before. dry run by default.
Sources
- GeoNames
DEpostal export — CC BY 4.0
Verification (2026-08-19)
Reproducible, integrity check PASS (0 duplicates by its own key), not byte-identical — 23,297 rows rebuilt vs 23,293 live on R2, a documented and understood +4-row gap, not an unexplained mismatch:
- The rebuild fixes two real bugs present in the live R2 copy: float-coerced admin codes losing leading zeros, and dropped hyphens in compound place names (e.g. "Rehburg-Loccum", "Ostprignitz-Ruppin"). This is a quality improvement, not a regression.
resolve_duplicates.py's hand-verified rule table (sources/duplicate_resolutions.csv, 4 rows) is keyed to the old, buggy place-name text from the live copy. Once the two bugs above are fixed upstream of it, none of its 4 rules match anymore, so it resolves 0 groups instead of 4.- Before a real publish, update
duplicate_resolutions.csvto match the corrected place-name text if exact row-count parity with the current live file matters; until then,publish_r2.py's dry-run plan will show a +4 row diff and should not be run with--applywithout that follow-up.