How krpaul/theworldincolour works
The World in Colour serves a country-level news-negativity heatmap on a globe and lets users find petitions related to a selected area. Its principal runtime path is the Flask app’s heatmap endpoint, which converts ranked country data and capital coordinates into map points for the frontend; a separate endpoint resolves a nearby country and fetches Change.org results. The repository also includes an offline news collection, manual-labeling, and sentiment-ranking workflow. The frontend and some offline wiring are represented by paths in the tree and README, but their source was not sampled, so uncertain connections are omitted.
Main entry points: app.py Flask routes · index.html Globe interface · news.py News collection · sentiment.py Sentiment scoring
Components 19
Web experience
- Flask routes
app.py - Map data
data.py - Rank and geography
heatmap - Globe interface
templates/index.html - Globe renderer
static/js/webgl-globe - Globe texture
globe
News scoring
- News collection
heatmap/news.py - Article dataset
heatmap/classification - Manual labeling
heatmap/classification/classify.py - Labeled articles
heatmap/classification - Sentiment scoring
heatmap/sentiment.py - Country scores
heatmap
Regional action
- Nearest capital
app.py - Petition search
charity/grab.py
Other components
- Visitor
- NewsAPI
- Google News
- Cohere model
- Change.org
Connections 22
- Visitor → Globe interface: uses
- Globe interface → Flask routes: requests
- Flask routes → Map data: loads map data
- Map data → Rank and geography: reads
- Flask routes → Globe interface: returns heat points
- Globe interface → Globe renderer: renders globe
- Globe renderer → Globe texture: loads texture
- News collection → NewsAPI: queries
- News collection → Google News: queries
- News collection → Article dataset: writes headlines
- Article dataset → Manual labeling: provides articles
- Manual labeling → Labeled articles: writes labels
- Sentiment scoring → Rank and geography: reads headlines
- Sentiment scoring → Cohere model: classifies headlines
- Sentiment scoring → Country scores: writes rankings
- Visitor → Globe interface: selects region
- Globe interface → Flask routes: requests charities
- Flask routes → Nearest capital: resolves coordinates
- Nearest capital → Rank and geography: reads capitals
- Flask routes → Petition search: searches country
- Petition search → Change.org: scrapes results
- Flask routes → Globe interface: returns petitions