You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Locations in listings.json are plain strings — "Cambridge, MA", "Toronto, ON, Canada", "Online". The globe (#16) needs lat/lng. This issue turns those strings into coordinates and caches them so we only geocode each place once.
What to build
New script .github/scripts/geocode.py:
Read listings.json; collect the unique location strings.
For each location not already in .github/scripts/geocode_cache.json, call free Nominatim: https://nominatim.openstreetmap.org/search?q=<loc>&format=json&limit=1
Set header User-Agent: hackhq-geocoder (github.com/Jose-Gael-Cruz-Lopez/hackhq)
Sleep ≥ 1s between requests (Nominatim rate limit)
Store { "<location>": {"lat": .., "lng": ..} } in the cache; commit the cache file.
Treat Online / Virtual / Remote / empty (case-insensitive) as no location → geo_status = "virtual".
For a listing with multiple locations, geocode the first physical one; if all are virtual → virtual.
Unresolvable place → geo_status = "failed" (log it; don't crash).
Context
Locations in
listings.jsonare plain strings —"Cambridge, MA","Toronto, ON, Canada","Online". The globe (#16) needs lat/lng. This issue turns those strings into coordinates and caches them so we only geocode each place once.What to build
New script
.github/scripts/geocode.py:listings.json; collect the unique location strings..github/scripts/geocode_cache.json, call free Nominatim:https://nominatim.openstreetmap.org/search?q=<loc>&format=json&limit=1User-Agent: hackhq-geocoder (github.com/Jose-Gael-Cruz-Lopez/hackhq){ "<location>": {"lat": .., "lng": ..} }in the cache; commit the cache file.Online/Virtual/Remote/ empty (case-insensitive) as no location →geo_status = "virtual".geo_status = "failed"(log it; don't crash).geocoded_listings.json, or return in-memory) withlat,lng,geo_statusadded — consumed by the sync step (Backend: Sync GitHub Action (listings.json → geocode → Supabase upsert) #13).Acceptance
geocode.pygeocodes unique locations via Nominatim with proper UA + rate limitinggeocode_cache.json(re-runs hit the cache, no re-fetch)Online/Virtual/Remote→geo_status = virtual, no coordsgeo_status = failed, script still exits 0Part of #10 · Design spec · Repo data lives in
.github/scripts/listings.json