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

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 (NO 3 -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 NO 3 -N and R 2 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

Institutions

Publication Details

Journal
Chemosphere
Published
2026-09-10
DOI
https://doi.org/10.1016/j.chemosphere.2026.145093
Primary Topic
Groundwater and Isotope Geochemistry
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

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

Isaac A. Bain, Simon Hales, Tim Chambers, Christopher J. Daughney
Chemosphere
Groundwater and Isotope Geochemistry
article

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

Isaac A. Bain, Simon Hales, Tim Chambers, Christopher J. Daughney
article en

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 (NO 3 -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 NO 3 -N and R 2 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.

ChemosphereVol. 412
Statistics New Zealand (NZ), University of Canterbury (NZ), Education New Zealand (NZ), University of Otago (NZ)
Clean water and sanitation
Openalex Percentile: Top 13%
Groundwater and Isotope Geochemistry
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.