feat: per-story HQ-to-exchange geocoding for globe arcs (Phase 1 of #48, sensor-implemented) - #52
Merged
Merged
Conversation
Prerequisite for the globe uplift (#48, joint proposal with Gemini porting the Google Studio concept's interaction design onto our existing globe.gl globe): /api/news/globe-data only aggregated news by RSS SOURCE region (e.g. "Bloomberg" -> a fixed coordinate), with no per-story ticker HQ/exchange data — so there was no way to draw the concept's per-story sentiment-colored arcs. New ticker_geo.py: a small explicit dictionary (~24 major US/ASX/crypto tickers, mirroring the concept's resolveTickerMetadata) plus a stable hash-jittered anchor-city fallback for anything not explicitly listed (same fallback strategy as the concept, reimplemented in Python). /api/news/globe-data now also returns story_arcs: for every news item with a ticker, its HQ and exchange coordinates plus title/sentiment — additive, existing points aggregation unchanged. Verified with a real functional test against live data (not just an import check): registered a test user, hit the live endpoint, got 148 real story_arcs. Confirmed the explicit dictionary resolves correctly (BHP.AX, NVDA) and the hash fallback correctly handles tickers outside it (NAB.AX). Phase 2 (per-story arc rendering + hotspot clustering on the actual globe) is a separate follow-up PR per #48's phased spec.
3 tasks
essentialbit
added a commit
that referenced
this pull request
Jul 2, 2026
Replaces the dashboard globe's 4 hardcoded decorative "geopolitical flight path" arcs (always the same 4 hubs -> NY, no real data behind them at all) with real per-story HQ-to-exchange arcs from Phase 1's story_arcs data (PR #52, already merged), colored by each story's actual sentiment score instead of a fixed rainbow palette. Capped to the 40 most recent stories to keep the globe high-signal per the new MISSION.md guiding principle #7 (minimalist, high-signal UI) -- uncapped would mean 100+ overlapping arcs on a 24h+ window, which reads as cluttered, not sophisticated. Conservative interpretation note: #48's Phase 2 spec bundles both arcs AND hotspot clustering. Splitting these — this PR is arcs only (the higher-value, more contained piece); hotspot clustering is a natural Phase 2b follow-up rather than risking a larger, harder-to-review PR. Verified with a real functional test: launched the live app, confirmed /api/news/globe-data still returns real story_arcs (165 for a 24h window), confirmed the dashboard page serves with the new code intact, and checked the extracted inline JS with `node --check` (exit 0, no syntax errors) since a headless browser wasn't available to click through it directly. Co-authored-by: Saifodius <penny-suing-henna@duck.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of #48 (consensus 0.63, risk:medium). Sensor-implemented this cycle.
Prerequisite for the globe uplift (joint proposal with Gemini, porting the Google Studio concept's interaction design onto our existing globe.gl globe):
/api/news/globe-dataonly aggregated by RSS source region, no per-story ticker HQ/exchange data, so there was no way to draw the concept's per-story sentiment-colored arcs.What this adds
New
ticker_geo.py— a small explicit HQ/exchange dictionary (~24 major US/ASX/crypto tickers) plus a stable hash-jittered anchor-city fallback for anything not listed, mirroring the concept's ownresolveTickerMetadatafallback strategy./api/news/globe-datanow also returnsstory_arcs: for every news item with a ticker, its HQ and exchange coordinates plus title/sentiment. Additive — existingpointsaggregation unchanged.Phase 2 (actually rendering per-story arcs + hotspot clustering on the globe) is a separate follow-up per #48's phased spec — this PR is backend-only.
Test plan
pointsaggregation still works unchanged