AquaGuard AI: Predictive Water Security

A Hacking4Humanity Project by Aayush Awasthy

Inspiration

The inspiration for AquaGuard AI came from a collision of two worlds: my community service and my passion for data. While volunteering for park cleanups and supporting local food pantries, I became acutely aware of how precious our basic resources are. Simultaneously, my work at the Kamin Science Center—explaining physics and STEM fundamentals to the public—made me realize that we often treat infrastructure issues, like water leaks, as reactive problems rather than predictable ones.

As a 2nd-degree Black Belt, I’ve been taught that the best way to handle a conflict is to anticipate it before it happens. I wanted to apply that same "Nityabhyasa" (disciplined practice) to our aging water infrastructure. If we can predict a leak before a pipe bursts, we don't just save money; we save a community's most vital resource.

What it does

AquaGuard AI is a predictive maintenance platform that shifts water management from a reactive "break-fix" model to a proactive "forecasting" strategy.

Historical Analysis: It ingests GIS data, pipe material history, and local pressure variables.

Risk Scoring: It assigns a "Leak Probability" to specific zones and blocks.

Actionable Dashboard: It provides a prioritized list for engineers, highlighting "High Risk" zones that require immediate inspection to prevent catastrophic failure.

How we built it

The project was built using a full-stack data science approach:

Data Processing: Using Python and Pandas, I cleaned historical GIS leakage datasets, handling categorical variables through Label Encoding.

The Engine: I implemented a Random Forest Classifier because of its ability to handle non-linear relationships between variables like pipe age, material, and location.

The Math: To ensure the model was actually learning and not just memorizing, I used Repeated Stratified K-Fold Cross-Validation. The probability of a leak is determined by the ensemble of decision trees

The Interface: I built a responsive HTML/JavaScript dashboard to visualize the "Priority Intervention List," ensuring that even non-technical city officials could interpret the AI's findings.

Challenges I ran into

The biggest hurdle was Data Divergence. Early in the process, the model showed high accuracy but poor ROC-AUC scores, meaning it was struggling to distinguish between a "likely leak" and a "lucky guess."

Coming from a TSA (Technology Student Association) background, I knew I had to go back to the feature engineering phase. I realized that 'Location_Code' was causing noise, so I dropped it and focused on the interaction between 'Zone' and 'Pipe Material'. This required a significant pivot in my Python logic, but it resulted in a much more stable and reliable model.

Accomplishments that I'm proud of

I am most proud of the Dashboard Integration. It’s one thing to have a high-accuracy Python script; it’s another to see those predictions live on a web interface. Successfully deploying a GitHub Actions pipeline to automate the model's execution was a huge milestone. It proved that this isn't just a school project—it's a functioning "Agentic" system that can update itself.

What I learned

I learned that "Quant" skills aren't just for Wall Street. Through my involvement in FBLA, I’ve seen how data drives finance, but through AquaGuard, I saw how data drives humanity. I learned how to handle Class Imbalance, as since leaks are rarer than non-leaks, and how to use SMOTE or specialized weighting to ensure the AI doesn't ignore the "needle in the haystack."

What's next for AquaGuard

The next step is Real-Time Integration. I want to move from "Next Month" predictions to "Real-Time" anomaly detection by integrating IoT sensor data. I also plan to expand the dashboard to include a "Carbon Footprint" metric that shows exactly how much energy is saved by preventing water loss. My goal is to pitch this as a viable policy tool for municipal governments, proving that Smart Water Helper technology is the future of urban resilience.

Built With

Share this project:

Updates