Effects of Antecedent Precipitation Amount and COVID-19 Lockdown on Water Quality Along an Urban Gradient

Water quality is affected by multiple spatial and temporal factors, including the surrounding land characteristics, human activities, and antecedent precipitation amounts. However, identifying the relationships between water quality and spatially and temporally varying environmental variables with a machine learning technique in a heterogeneous urban landscape has been understudied. We explore how seasonal and variable precipitation amounts and other small-scale landscape variables affect E. coli, total suspended solids (TSS), nitrogen-nitrate, orthophosphate, lead, and zinc concentrations in Portland, Oregon, USA. Mann–Whitney tests were used to detect differences in water quality between seasons and COVID-19 periods. Spearman’s rank correlation analysis was used to identify the relationship between water quality and explanatory variables. A Random Forest (RF) model was used to predict water quality using antecedent precipitation amounts and landscape variables as inputs. The performance of RF was compared with that of ordinary least squares (OLS). Mann–Whitney tests identified statistically significant differences in all pollutant concentrations (except TSS) between the wet and dry seasons. Nitrate was the only pollutant to display statistically significant reductions in median concentrations (from 1.5 mg/L to 1.04 mg/L) during the COVID-19 lockdown period, likely associated with reduced traffic volumes. Spearman’s correlation analysis identified the highest correlation coefficients between one-day precipitation amounts and E. coli, lead, zinc, and TSS concentrations. Road length is positively associated with E. coli and zinc. The Random Forest (RF) model best predicts orthophosphate concentrations (R2 = 0.58), followed by TSS (R2 = 0.54) and nitrate (R2 = 0.46). E. coli was the most difficult to model and had the highest RMSE, MAE, and MAPE values. Overall, the Random Forest model outperformed OLS, as evaluated by RMSE, MAE, MAPE, and R2. The Random Forest was an effective approach to modeling pollutant concentrations using both categorical seasonal and COVID data along with continuous rain and landscape variables to predict water quality in urban streams. Implementing optimization techniques can further improve the model’s performance and allow researchers to use a machine learning approach for water quality modeling.