Inside the automated pipeline that recalculates 40 cities every hour — and immediately after any M5.5+ earthquake detection.
🧠 OPEN BRAIN DASHBOARD LIVEEvery hour, without fail, a silent digital sentinel awakens on PythonAnywhere servers. It scans 30+ live 3D hazard simulations across 500+ monitored cities. When an earthquake hits M5.5 or above, it doesn't wait for the next scheduled cycle—it breaks protocol and broadcasts immediately. This is the Brain Engine: Pandita Data's automated nervous system that keeps your risk scores breathing in real time.
At the heart of Pandita Data's intelligence delivery is scheduler.py, a Python automation worker running on PythonAnywhere's cron infrastructure. Every 60 minutes, this process awakens to fetch fresh hazard telemetry, recompute AI risk scores, and push updates to your Brain Dashboard. The system operates on a three-tier data pipeline: live sensor ingestion (seismic networks, weather APIs, satellite feeds) → SQLite local cache → REST API distribution to front-end clients.
What makes this architecture resilient is redundancy. If one city's calculation stalls, parallel execution threads continue processing others. Failed API calls queue for retry within 15 minutes. The entire cycle completes in under 8 minutes, leaving a 52-minute buffer for network latency and system hiccups.
At the top of each hour (00:00, 01:00, 02:00 UTC), scheduler.py awakens. It connects to SQLite's local cache and pulls the latest risk coefficients. Simultaneously, REST API calls fan out to USGS, JMA, BMKG, and other seismic networks. Weather APIs deliver wind speed, precipitation, and barometric pressure. Satellite thermal data surfaces active volcanic and wildfire signatures. All raw inputs feed into the Brain Engine's AI risk model—a trained ensemble that weighs magnitude, depth, proximity, soil type, and historical precedent. Scores recalculate across all 30+ simulation modules. Results write back to SQLite. The REST API publishes fresh risk values to the front-end, refreshing your Brain Dashboard within seconds.