Files
CatoandClaude 3cb4b06b80 feat(places): the places inside every country, from Wikidata's ISO 3166-2 codes (#570)
- scripts/places-world-subdivisions.ts writes data/places/world/subdivisions.json:
  every item with an ISO 3166-2 code (P300, statement neither ended nor
  deprecated, item not dissolved) in every country no pack holds, named in
  five languages, with its item number. 4,759 places in 194 countries.
- Each sits under its nearest coded ancestor by P131+ (a department in its
  region), else under its country (src/lib/places/nesting.ts, pure, tested):
  two equally near ancestors that do not lie in each other (Brcko District)
  mean the place lies in both, so it sits under what they share. The world
  pack gains three tiers below a country.
- Neutral by the world list's rule: an item that is itself a world entry, and
  the codes in SUBDIVISIONS_WITH_OWN_PAGE (Taiwan, Abkhazia, Transnistria,
  Kosovo), keep their own pages and are not listed inside a claimant.
- The world-subdivisions source imports it after the deploy, like every file
  under data/places. Ten seconds locally.
- The importer inserts identifiers, names, relations and instruments a
  thousand rows a statement: five thousand places passed Postgres's 65,535
  parameters in one.
- One Wikidata helper (src/lib/wikidata/query.ts) for scripts.
- A banner photo fills a tile at full width, not enlarged from 960 into a
  blur; a place's line no longer names the world.


Claude-Session: https://claude.ai/code/session_019MDtmuJdjaMYdbLjujoC3k

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 07:16:16 +01:00
..