Copy-forward duplicate wikiDataIds in other country files (follow-up to #1634)
Problem
The 2019 import bug fixed for Mexico in #1634 / #1637 also affects the other country files: when no Wikidata match was found for a row, the previous row's wikiDataId was carried forward, so runs of consecutive records share one QID.
Across 177 country files, 41,631 records sit in 15,454 shared-QID groups. Largest: FR 6,401 · BR 4,084 · PH 2,535 · DE 2,297 · ES 2,147 · CN 1,659 · AT 1,452 · AU 1,394 · IN 1,279 · US 1,228 · JP 1,157 · JM 835 · NL 713 · RO 683 · RU 660.
Approach
One country per PR, each re-matching every record in its groups against Wikidata from scratch (nothing inferred from the shared ID), with a blank ID preferred over a wrong one. Each country needs its own identity data: e.g. France has INSEE codes (P374) on every commune, Mexico needed GeoNames provenance and INEGI codes. Method and results are documented per country in .github/fixes-docs/FIX_<this issue>_SUMMARY.md.
Progress
- MX — #1637
- FR (6,401 records)
- BR (4,084)
- PH (2,535)
- DE (2,297)
- ES (2,147)
- remaining countries
Source: dr5hn/countries-states-cities-database