Every four hours, a pipeline I wrote reads the news from around the world and gives every country a score from 0 to 100. This is how it works, what I got wrong, and what I changed.
The map on 23 October 2026. The world score is the chaos level the average person lives in, weighted by population.
Why I built it
In late 2025 the news felt like one long scroll of conflict, protests, disasters and cyber attacks, with no shape to any of it. I am not a journalist or an analyst. I wanted one map that showed where pressure was actually building, honest enough that I could defend every number on it.
Drawing the map was the easy part. The hard part is scoring around 250 countries fairly from news that is messy, multilingual and wildly uneven. Some countries get a hundred articles a day. Some get one a week.
The one rule
The news dictates the chaos, not my opinion.No country appears in any list, cap, floor or override. Identical news about two different countries gives identical scores, and a unit test checks it.
Everything else follows from that. It is also why the model is a set of rules rather than a machine learning model. When a score looks wrong, I can point to the article and the exact step that moved it.
From a feed to a score
GitHub Actions runs the pipeline every four hours over a rolling 26 hour window:
Read 486 checked RSS feeds, plus USGS, GDACS, ReliefWeb, WHO and GDELT.
Clean and de-duplicate the articles, then write them to Supabase in a few bulk requests.
Work out where each story happened. "Russian strike on Kyiv" is Ukraine. "Houthis target Riyadh airport" is Saudi Arabia. The place being hit wins.
Give each article a harm signal from what it reports.
Group articles about the same event into stories, and stories into a single number for each day.
Blend the last 30 days, a memory of lethal violence, and any surge against the country's own normal.
Turn that into 0 to 100, let scores rise straight away but fall slowly, and serve them through a CDN.
Reading a headline
Step four is where most of the judgement lives. Each article is scored on evidence, not volume. Deaths count most, then heavy weapons, emergency powers and riot violence. Statements, predictions, court cases and anniversaries are dampened, because they report no new disorder.
0.00
harm signal for this one article
0 noise1 catastrophe
A simplified, in-browser version of the real rules, using the real constants from v3.2.0. The live model reads far more patterns, checks where the event happened and how widely it was reported, then works across days and weeks.
One line that replaced a list
A busy but calm country produces hundreds of low harm stories. A quiet war might produce three terrible ones. So a day is led by its worst stories, and every extra story adds less than the one before. This is the actual function from the repo:
/** D = 1 - exp(-sum_i term_(i) * DECAY^i / TAU), terms sorted descending. */export function dailyIntensity(terms: number[]): number {
if (terms.length === 0) return 0;
const sorted = [...terms].sort((a, b) => b - a);
let sum = 0;
let factor = 1;
for (const term of sorted) {
sum += term * factor;
factor *= CHAOS_MODEL.DAY_STORY_DECAY; // 0.5
}
return 1 - Math.exp(-sum / CHAOS_MODEL.DAY_TAU); // 0.35
}
Each story's term is its weight squared, so one serious event outweighs a pile of minor ones, and the total can never run away with itself.
What version 2 got wrong
Version 2 worked, but only because I kept patching it. Every time a country looked wrong, I added a rule for that country. By the end the map reflected my patches as much as the news. On the same data, v2 put France at 31 and Ukraine at 75, and nobody could have explained why without reading my code.
Version 3 rebuilt the score from scratch and deleted every patch: a list of 43 high volume countries whose scores were discounted, a soft cap that pinned about 15 countries at exactly 55, a severity cap for "stable" countries, and a spillover rule that lowered the scores of invaded countries such as Ukraine. If the rules are right, none of that is needed. If they are wrong, a patch only hides it.
Testing a change before it ships
Every change is replayed on a real export of the database before it goes live. This week's release, v3.2.0, did two things. Riots without deaths are now capped below lethal violence. And wars where killing is reported on several days are remembered for longer, so thinly covered conflicts stop fading out. Replayed on 7 October 2026:
Score on 7 October 2026 before (hollow) and after (filled) v3.2.0. France's riots drop below Ukraine's war. Myanmar, Syria and Sudan stop disappearing. Ukraine and Ethiopia do not move.
Some countries still score lower than they should. On this export Somalia, DR Congo and Niger had almost no reports of deaths. That is a coverage problem, and the fix is better sources, never a manual override.
Fixing what it reads
A model is only as good as its inputs. This month I audited every feed by hand. Of 1,162 listed feeds, only about 420 had ever worked, official alerts had quietly stopped arriving, and GitHub was skipping about a third of the scheduled runs.
I repaired 118 feeds, added 29 local sources for places the map under-covered, such as Somalia, Sudan, the Sahel and Myanmar, and removed 487 that were dead, stale or duplicated. Every remaining feed respects robots.txt, known state propaganda outlets are dropped before processing, and a watchdog inside Supabase restarts the ingest whenever GitHub skips a run.
Running it for nothing
The whole thing runs on the free tiers of GitHub Actions, Supabase and Vercel, and that shaped the design. Each run reads only the columns it needs from about 18,000 recent incidents, around 8 MB. It writes in a handful of bulk requests instead of thousands of single rows, and keeps only daily aggregates from GDELT. The map is served from a CDN cache and checks for new scores every five minutes, pausing when the tab is hidden.
TypeScript, React, Vite, MapLibre, Supabase and Postgres, GitHub Actions, Vercel.
What people share
Most visitors are on their phones, so version 3.1 was rebuilt around that, with cards made to be shared to Instagram Stories. These go out from the map's own account:
What the score is not
It measures recent, observable, reported pressure. It is not a prediction or a risk forecast. Where coverage is thin, the map says its confidence is low, and a score built mostly from filling gaps is never shown as high confidence.
Next up, in v3.2.1: a confidence level for each story, a check on alarming claims, grouping events as they arrive, and conflict data from UCDP.