Problem
scripts/validate-places.mjs misses several classes of bad data:
- type must match filename (promised by
places.schema.json:22) — not checked
- id pattern from the schema (
<city-prefix>-<type>-<number>) not enforced — bare numeric ids like 96545 coexist with mum-gov_offices-01
valid_till format unchecked (only verified.on is date-validated)
- near-duplicate coordinates unchecked. Real examples currently in the dataset:
amritsar-sat-01 (Ashok Vatika Public School, G.T. Road) and amritsar-sat-02 (Invictus International School, Loharka Road) share identical coords 31.635666,74.87875 — different schools, so at least one coordinate is wrong
mumbai-sat-01 (Tardeo) and mumbai-sat-05 (Colaba) share 19.054999,72.869203 — ~7 km apart in reality
- added_by identity drift:
"Yojeet(Circout-sudo)" vs "Yojeet(Circout)" — same person, two identities
Fix
Fix the two wrong coordinates (verify against Google Maps), normalize added_by, then extend the validator: enforce 1-3, warn on coords closer than ~50 m between different-named places, and consider an allowed-contributors or format check for added_by.
Acceptance criteria
Problem
scripts/validate-places.mjsmisses several classes of bad data:places.schema.json:22) — not checked<city-prefix>-<type>-<number>) not enforced — bare numeric ids like96545coexist withmum-gov_offices-01valid_tillformat unchecked (onlyverified.onis date-validated)amritsar-sat-01(Ashok Vatika Public School, G.T. Road) andamritsar-sat-02(Invictus International School, Loharka Road) share identical coords31.635666,74.87875— different schools, so at least one coordinate is wrongmumbai-sat-01(Tardeo) andmumbai-sat-05(Colaba) share19.054999,72.869203— ~7 km apart in reality"Yojeet(Circout-sudo)"vs"Yojeet(Circout)"— same person, two identitiesFix
Fix the two wrong coordinates (verify against Google Maps), normalize added_by, then extend the validator: enforce 1-3, warn on coords closer than ~50 m between different-named places, and consider an allowed-contributors or format check for added_by.
Acceptance criteria