Project 04

River flow forecasting

The 2013 Calgary floods caused over $6 billion in damage and displaced 100,000+ residents. This project builds a multi-model forecasting tool using 9.5M+ five-minute Bow River observations for early-warning systems that protect lives and infrastructure.

XGBoost ARIMA Time series Forecasting 9.5M readings
0.89 R-squared (XGBoost)

Streamlit dashboard pages

Current flow

Real-time Bow River flow visualization with historical context and rolling averages

Forecast

Multi-day ahead flow predictions with confidence intervals and flood-risk thresholds

03

Model comparison

Side-by-side evaluation of ARIMA, Random Forest, and XGBoost forecast accuracy

04

Alerts

Configurable flow thresholds with automated alerts when readings exceed safe levels

Key results

0.89
R-squared
XGBoost regressor
~10
MAE (m3/s)
Best model performance
9.5M+
Observations
Five-minute intervals

Methodology

Fetched 9.5M+ five-minute river level and flow observations via the Socrata API. Resampled to daily means and engineered rolling averages (7-day, 30-day) and lag features. Trained ARIMA/SARIMA for classical time-series modeling with confidence intervals. Trained Random Forest and XGBoost regressors on engineered lag and calendar features for comparison.

01 Fetch 9.5M river observations
02 Resample to daily means
03 Engineer rolling and lag features
04 Train ARIMA/SARIMA baseline
05 Train XGBoost and Random Forest
06 Deploy Streamlit dashboard