Inspiration
Water-quality monitoring produces massive amounts of environmental data across different locations and time periods. However, raw measurements alone do not provide an easy way to determine whether a water body is in a healthy condition or showing signs of environmental stress.
AquaPulse was created to transform complex water-quality data into an accessible, data-driven assessment. Our goal was to build a system that can learn from historical GEMStat observations and identify potentially At-Risk water-quality conditions using scientifically defined criteria and machine learning.
What it does
AquaPulse analyzes five key water-quality parameters:
- Dissolved Oxygen (DO)
- Temperature
- pH
- Nitrate
- Phosphorus
The system first identifies reliable healthy-reference monitoring stations from the GEMStat dataset using water-quality characteristics, consistency, and temporal coverage.
Scientific thresholds are then used to identify environmental stress and classify observations as Healthy, Intermediate, or At-Risk. These scientifically labelled observations are used to train a Random Forest classification model.
For a new water-quality observation, AquaPulse can predict whether the condition is Healthy or At-Risk and provide the probability associated with the prediction.
This creates a practical bridge between large-scale environmental datasets and understandable water-quality assessment.
How we built it
We built AquaPulse as a data-processing and machine-learning pipeline using Python.
The workflow consists of:
- Processing GEMStat station metadata and water-quality measurements.
- Screening thousands of river monitoring stations.
- Identifying healthy-reference stations using reference scoring, consistency, and temporal coverage.
- Applying scientifically defined water-quality thresholds.
- Constructing a validated Healthy and At-Risk dataset.
- Balancing the machine-learning dataset to reduce class imbalance.
- Training a Random Forest classifier using DO, Temperature, pH, Nitrate, and Phosphorus.
- Evaluating the model using a station-level train/test split to prevent station leakage.
- Integrating the trained model with the AquaPulse interface for user-facing predictions.
The final model was evaluated on previously unseen monitoring stations and achieved 98.68% accuracy, 97.22% precision for At-Risk observations, 100% recall for At-Risk observations, and an ROC-AUC of 1.00 on our held-out test set.
Feature-importance analysis showed that Phosphorus and Nitrate were the strongest contributors to the model's predictions, followed by Dissolved Oxygen.
Challenges we ran into
The GEMStat dataset contains measurements from thousands of monitoring stations across different countries, monitoring programs, and time periods. Preparing this heterogeneous dataset for machine learning was one of our biggest challenges.
We had to deal with incomplete measurements, inconsistent station coverage, different monitoring histories, and the difficulty of identifying reliable healthy-reference stations.
Another major challenge was class imbalance. We initially had far more At-Risk observations than validated healthy observations. We addressed this by carefully constructing a balanced training dataset while retaining observations from multiple monitoring stations and time periods.
We also had to ensure that our evaluation did not suffer from station-level data leakage. Instead of randomly splitting individual measurements, we separated monitoring stations between training and testing.
Accomplishments that we're proud of
We are proud of building a complete pipeline from raw environmental data to an operational machine-learning prediction system.
Some of our key accomplishments include:
- Screening 22,981 GEMStat monitoring stations.
- Identifying 3,698 usable river stations for water-quality analysis.
- Creating a scientifically labelled dataset containing 43,605 complete station-date observations.
- Selecting and validating 30 healthy-reference stations.
- Creating a balanced Random Forest training dataset.
- Performing station-level leakage-free evaluation.
- Achieving 98.68% accuracy and 1.00 ROC-AUC on our held-out test set.
- Identifying the most influential water-quality parameters through feature-importance analysis.
- Building the foundation for integrating environmental intelligence into an accessible user interface.
What we learned
This project taught us that successful machine learning begins with the quality and design of the dataset.
We learned how to work with large-scale environmental monitoring data, identify meaningful reference conditions, apply scientific domain knowledge to create interpretable labels, and construct a machine-learning dataset while controlling for station-level leakage and class imbalance.
We also learned that model performance must be evaluated carefully. A high accuracy score is meaningful only when the evaluation methodology reflects how the model will encounter unseen data in practice.
What's next for AquaPulse
We plan to extend AquaPulse beyond binary Healthy/At-Risk classification.
Future improvements include:
- Expanding the number and geographical diversity of healthy-reference stations.
- Incorporating additional water-quality parameters.
- Providing more detailed explanations for individual predictions.
- Adding temporal trend analysis to detect deteriorating water quality.
- Incorporating uncertainty and confidence indicators into predictions.
- Expanding the system into a real-time monitoring and alert platform.
- Improving the visualization and user experience through an interactive dashboard.
Our long-term vision is for AquaPulse to evolve from a water-quality classification system into an intelligent environmental monitoring platform that helps users understand changing water conditions and identify potential risks earlier.
Built With
- analysis
- analytics
- classification
- data
- environmental
- forest
- gemstat
- learning
- machine
- monitoring
- numpy
- pandas
- predictive
- python
- quality
- random
- science
- scikit-learn
- water
Log in or sign up for Devpost to join the conversation.