A dashboard that says why the numbers moved
- ROLE
- Solo build
- TIMEFRAME
- 2025
- STACK
- Python, pandas, STL, Streamlit
- LINKS
- github ↗
the why
NOT JUST ALERTS
The problem
Ops dashboards are good at saying "something's wrong" and terrible at saying where. An anomaly alert without attribution is homework: someone still has to dig through state, store, and department cuts by hand.
Approach
KPI Sentinel computes six retail KPIs daily (units, revenue, average price, price index, zero-sales rate, demand volatility) across the full M5 hierarchy: global, state, store, category, department, down to ~30,000 items. Anomalies are flagged against seasonality-aware baselines (STL decomposition with weekly seasonality, scored with robust MAD), then a hierarchical contribution analysis walks the tree from global to department to attribute the move. A Streamlit dashboard exposes the overview and a root-cause explorer, and incident reports are generated automatically.
Results
M5 has no ground-truth anomaly labels, so evaluation runs on synthetic anomaly injection rather than a logged real incident: there's no committed precision/recall number here yet. What's real and running: STL decomposition with weekly seasonality, MAD-based anomaly scoring with a 3.5 threshold over a 28-day rolling window, a 2-day cooldown after a flagged anomaly so one incident doesn't retrigger itself, and a Streamlit dashboard with a root-cause explorer and auto-generated incident reports.