A machine learning approach to estimating nitrate-nitrogen concentrations in shallow groundwater across New Zealand.

Journal: Chemosphere
Published Date:

Abstract

Nitrate contamination of shallow groundwater is a concern for drinking water safety and ecosystem health globally, yet national-scale prediction techniques remain limited. Here, we describe the development and evaluation of an ensemble machine learning framework to estimate median nitrate (NO3-N) concentrations in shallow groundwater across New Zealand. From 957 state of the environment monitoring bores, 589 shallow (<50 m), oxic bores with complete model data were retained. These were combined with 99 predictor variables describing land use, hydrogeology, climate, topography, and soils. Candidate tree-based machine learning models (RF, XRT, XGBoost, LightGBM) were trained and stacked into an ensemble, evaluated with 10-fold cross-validation repeated 10 times within the training set. On the held-out 20% test set, the ensemble model achieved an RMSE of 3.13 mg/L NO3-N and R2 of 0.56, indicating moderate performance. Soil age, dairy cattle density, land use, and bore depth were amongst the strongest predictors of median groundwater nitrate. Gridded estimates indicated a pattern of increased concentrations in intensively farmed areas, with hotspots exceeding the drinking water standard of 11.3 mg/L, though high concentrations were systematically underestimated. This approach demonstrates the first spatially continuous, data-driven estimates of median nitrate in shallow groundwater across New Zealand, offering a tool to inform water quality management and resource management. The machine learning framework can be applied in other regions where monitoring data are sparse but environmental predictors exist.

Authors

Keywords

No keywords available for this article.