Skip to content

data: validator blind spots — id pattern, type-vs-filename, valid_till format, duplicate coordinates (two real dupes found) #171

Description

@shauryagangrade

Problem

scripts/validate-places.mjs misses several classes of bad data:

  1. type must match filename (promised by places.schema.json:22) — not checked
  2. id pattern from the schema (<city-prefix>-<type>-<number>) not enforced — bare numeric ids like 96545 coexist with mum-gov_offices-01
  3. valid_till format unchecked (only verified.on is date-validated)
  4. 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
  5. 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

  • Both duplicate-coordinate pairs resolved
  • Validator enforces id/type/date rules and warns on near-dupe coords

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions