thermograph/static
Emi Griffith e3088720a6 Typo-tolerant location search suggestions (#33)
Add /api/v2/suggest and wire the location picker's search box to it as a
debounced type-ahead: top-5 place suggestions that tolerate a single-letter
typo (substituted, missing, or extra letter, or two adjacent letters swapped)
anywhere in the query, including the first character.

- backend/places.py: local place index built from a GeoNames cities dump
  (downloaded once into data/geonames/, loaded in a background thread; the
  app boots and serves without it). Exact-prefix matches rank first by
  population, then names one edit away; a token vocabulary respells one
  mistyped word against known place-name tokens ("pest seattle" ->
  "west seattle") for retry against the upstream geocoder, which covers
  neighbourhood-level places the dump lacks. THERMOGRAPH_CITIES picks the
  dump (default cities1000).
- /suggest blends local and upstream results by population with an exactness
  boost, so "Seatle" (a Cumbrian hamlet) can't outrank Seattle when the
  query is one edit from the city, while "munchen" still surfaces Munich via
  upstream (the index only knows English names). Upstream lookups are
  memoized and skipped entirely when the index answers convincingly.
- mappicker.js: debounced (250ms) live suggestions with abort + sequence
  guards against stale responses, arrow-key navigation, Enter-picks-highlight,
  Escape dismissing the list before closing the overlay. Submit goes through
  the same typo-tolerant endpoint.
- climate.geocode results now carry population (used for ranking).
2026-07-11 15:36:14 +00:00
..
app.js Worldwide coverage: grade any point on Earth (#32) 2026-07-11 15:02:28 +00:00
calendar.html Metric cards: status to top-right, normal under the value; bold head context (#20) 2026-07-11 07:20:13 +00:00
calendar.js Worldwide coverage: grade any point on Earth (#32) 2026-07-11 15:02:28 +00:00
compare.html Compare: put full state in the URL and gate reloads behind Refresh (#12) 2026-07-11 03:17:17 +00:00
compare.js Compare: resolve a location's name immediately on add 2026-07-11 07:50:48 -07:00
day.html Lead location labels with neighbourhood; drop ±7-day window jargon (#18) 2026-07-11 00:02:19 -07:00
day.js Picker map: smaller labels, darker roads; location label coords→place (#27) 2026-07-11 08:35:43 +00:00
index.html Stack the location head context top-down; drop sq-mi-cell wording (#19) 2026-07-11 07:10:46 +00:00
legend.html Add comfort-temperature compare view; simplify Feels calendar filter (#9) 2026-07-10 19:58:56 -07:00
mappicker.js Typo-tolerant location search suggestions (#33) 2026-07-11 15:36:14 +00:00
nav.js Worldwide coverage: grade any point on Earth (#32) 2026-07-11 15:02:28 +00:00
style.css Typo-tolerant location search suggestions (#33) 2026-07-11 15:36:14 +00:00