Featured case study · Squamish, British Columbia
ClimateFlow BC
A reproducible workflow connecting 2020 climate observations with daily streamflow—and testing how far weather-based models can honestly go.
- Role
- Independent data project
- Tools
- Python, pandas, scikit-learn, Streamlit
- Data
- Official daily climate and hydrometric records
- Validation
- Chronological 80/20 holdout
01 · Question
Can same-day weather help explain river discharge?
The project examines how temperature and precipitation relate to streamflow in the Squamish watershed. The goal was not to claim operational forecasting performance. It was to build a clear, inspectable environmental-data workflow and compare an interpretable linear baseline with a nonlinear model.
02 · Data workflow
Aligned observations, documented exclusions.
Daily climate and streamflow records were cleaned, merged by date, and checked for missingness before modeling. The merged analysis table contains 366 daily observations. After feature construction and required exclusions, 349 observations remained for the modeling comparison.
Acquire
Use official climate and hydrometric observations.
Clean
Standardize dates, units, and missing values.
Engineer
Create weather and time-aware predictors without future leakage.
Validate
Hold out the final 20% of observations chronologically.
03 · Modeling
Two models, one time-respecting test.
A linear regression establishes an interpretable baseline. A random forest captures nonlinear relationships. Both are evaluated on the same later-in-time holdout period; no random split is used, because that could let nearby dates leak temporal structure across the train–test boundary.
Metrics are reported exactly as presented in the project materials; a dash means that metric is not being asserted here.
04 · Interpretation
Useful signal, meaningful limits.
The models capture part of the observed relationship, but same-day local weather cannot represent the entire watershed system. Snowpack, upstream precipitation, antecedent conditions, basin storage, and lagged effects all matter. The results should be read as a transparent modeling comparison—not a production flood or discharge forecast.
What I would do next
Expand the hydrologic context.
Next steps would include lagged precipitation, antecedent temperature, snow or freezing-level indicators, multi-station weather inputs, and validation across additional years. I would also report every evaluation metric for every model in one consistent comparison table.