← Back to Portfolio

03 — Cross-Correlation Lag Analysis

Computes pre-whitened cross-correlation between rainfall/snowmelt and sewer flow for each plant, identifies dominant lag signatures, and classifies plants as inflow-dominated, infiltration-dominated, or mixed.

cross-correlation lag-analysis pre-whitening arima i-and-i-classification
Pythonpandasnumpystatsmodelsscipymatplotlibseaborn

Key Findings

  • Pre-whitening removes autocorrelation artifacts that inflate raw CCF peaks — essential for accurate lag identification
  • Inflow-dominated plants show sharp CCF peaks at 1-3 hour lag; infiltration-dominated show broad peaks at 24-48 hours
  • Snowmelt-flow CCF reveals different lag characteristics than rainfall-flow CCF, with broader, more sustained correlation

Notebook