🌐 Live Demo: chokepointmonitor.com
A full-stack geospatial risk visualization tool that correlates armed conflict events with energy market data across three critical maritime oil chokepoints: the Strait of Hormuz, Bab el-Mandeb, and the Strait of Malacca.
Chokepoint Monitor ingests conflict event data from ACLED and financial time-series data from Yahoo Finance, stores them in a PostGIS-enabled PostgreSQL database, and surfaces them through an interactive map with heatmaps, geofenced regions, and a financial correlation panel.
| Chokepoint | Daily Oil Flow | Strategic Importance |
|---|---|---|
| Strait of Hormuz | ~21M barrels | Primary route for Middle East oil exports |
| Bab el-Mandeb | ~5M barrels | Connects Mediterranean via Suez Canal |
| Strait of Malacca | ~16M barrels | Primary route for Asian energy imports |
- Explore the heatmap — Navigate to the Persian Gulf or Red Sea. Darker clusters = higher conflict density.
- Use the date slider — Filter events by time period (defaults to YTD, expands to 3-year history).
- Click a geofence — Click any chokepoint polygon to see conflict events within that region.
- Open the Insights panel — View financial correlation charts with risk metrics.
- Switch tickers — Try
CL=F(WTI Crude),BZ=F(Brent),FRO(Frontline Tankers), orSTNG(Scorpio Tankers).
The backend is a FastAPI service backed by Supabase (PostgreSQL + PostGIS). Conflict data is ingested via a Python pipeline from ACLED exports; financial data is fetched daily from Yahoo Finance via a GitHub Actions cron job. The frontend is Svelte 5 with MapLibre GL for WebGL map rendering and D3.js for correlation charts.
A key design decision: recency weighting for the heatmap is computed client-side on every slider change, so visual density stays consistent whether you're viewing 3 months or 3 years of data — no server round-trip needed.
Backend: FastAPI · PostgreSQL 15 + PostGIS · Supabase · Python · Uvicorn
Frontend: Svelte 5 · MapLibre GL · D3.js · Tailwind CSS · Skeleton UI
Infrastructure: Render · GitHub Actions (daily data pipeline) · Vite
- Node.js v22.12+
- Python 3.10+
- MapTiler API key (free tier available)
git clone https://github.com/samwilsonSW/ChokepointMonitor.git
cd ChokepointMonitor
npm run install:all
cp .env.example .env
# Add your SUPABASE_URL, SUPABASE_KEY, and MAPTILER_KEY to .env
npm run dev| Command | Description |
|---|---|
npm run install:all |
Install Node + Python dependencies |
npm run dev |
Run frontend + backend in parallel |
npm run dev:frontend |
Svelte dev server only |
npm run dev:backend |
FastAPI server only |
npm run render:build |
Production build for Render |
npm run render:start |
Production server for Render |
My biggest takeaway here is that global energy market movements are impacted by a lot more than just conflict events. I happened to be finishing up this MVP during the first month of the US-Iran conflict and the events around the Strait of Hormuz, causing a good amount of correlation, but this seems to be the exception, not the rule.
Outside of financial takeaways, I learned that architecture and system design is an extremely important thing to think about when building a project. The pipelines for this project were draining, particularly because I didn't take the time prior to starting to whiteboard out a clean design for how data would flow through the system. Going forward, I will be much more thoughtful about these types of decisions before building them out.
The dead ends: I spent a week trying to get some sort of real-time data view early on, wanting to build something that felt responsive and impressive. This inevitably resulted in wasting a week trying to build something that wasn't worth the time, effort, or money for a project of this scale. I understand this now: Tradeoffs are important, and recognizing them saves time, effort, and mental well-being.
This project was my first big undertaking, and it's made me enjoy being a developer in a way I hadn't before. There are improvements that should be made, especially with the UI, and maybe I'll come back around and clean those up in the future. For now, I'm moving on to another project, one that doesn't make me feel as attached to one single hypothesis or idea.
Built by Sam Wilson