Featured case study · Squamish, British Columbia

ClimateFlow BC

I combined official 2020 climate and streamflow records from Squamish, then compared linear regression and random forest models with a chronological holdout.

Role
Independent data project
Tools
Python, pandas, scikit-learn, Streamlit
Data
Official daily climate and hydrometric records
Validation
Chronological 80/20 holdout

01 · Project question

Can same-day weather help explain river discharge?

I examined how temperature and precipitation relate to streamflow in the Squamish watershed. This is a project workflow and model comparison, not an operational streamflow forecast.

02 · Data preparation

Cleaning and joining the records

I standardized the dates and units in the climate and streamflow records, joined them by date, and checked missing values before modeling. The merged table contains 366 daily observations. Feature construction and required exclusions left 349 rows for model comparison.

1

Acquire

Use official climate and hydrometric observations.

2

Clean

Standardize dates, units, and missing values.

3

Prepare

Create weather and time-aware predictors without future leakage.

4

Test

Hold out the final 20% of observations chronologically.

03 · Model comparison

Linear regression and random forest

I used linear regression as an interpretable baseline and random forest to capture nonlinear relationships. Both models used the same later-in-time holdout period. A random split could place nearby dates in both sets and produce an overly optimistic test.

ModelMAERMSER²
Random forest51.6 m³/sNot reportedNot reported
Linear regressionNot reported84.0 m³/s0.663

These are the metrics recorded in the project materials. A value marked “Not reported” is not being estimated here.

04 · Limitations

What the model does not capture

Same-day weather at one station cannot represent the entire watershed. Snowpack, upstream precipitation, earlier conditions, basin storage, and lagged effects also influence streamflow.

05 · Next steps

Additional data and testing

I would add lagged precipitation, earlier temperature, snow or freezing-level indicators, weather records from more stations, and observations from additional years. I would also report the same evaluation metrics for every model.