Inspiration

Lahore's groundwater is running out, but it's an invisible crisis, you can't see the water table dropping with your own eyes. I found real reports showing the water level fell from 31 feet to 79 feet deep in just 20 years, and some areas like Gulberg are now over 300 feet deep. If nothing changes, studies say Lahore could run out of accessible groundwater by 2040. I wanted to build something that makes this invisible problem visible, and actually helps people plan a solution instead of just showing scary numbers.

What it does

The app shows an interactive map of Lahore where each town is color-coded by groundwater risk level. A user can pick any town, enter their plot size, and choose a language (English, Urdu, or both). The AI then instantly generates a real, practical plan with three parts: a recharge well and rainwater harvesting design, layout and sizing guidance, and a short policy summary, all grounded in real cited data, not made-up numbers.

How we built it

I used Streamlit for the interface, Folium for the interactive map, and Google's Gemini API as the intelligence layer. All the groundwater data was manually collected from real public sources like news reports and research studies, organized into an Excel file with a "Read Me" tab explaining exactly where each number came from. When a user picks a town, the app sends that town's real data plus city-wide facts to Gemini, which returns a structured plan that gets displayed as separate cards. I also added charts (using Plotly) to show risk severity across towns and the historical water table decline trend.

Challenges we ran into

As a solo participant with no prior experience building an AI-powered app, I ran into several real errors along the way, including outdated model names (Gemini kept updating faster than tutorials could keep up), a deprecated Python library that had to be swapped out mid-build, and formatting issues with getting the AI's response to display cleanly instead of as one messy block of text. I debugged each one step by step and learned a lot about how AI APIs actually work in production.

Accomplishments that we're proud of

I'm proud that every number in this project is backed by a real, cited source nothing is made up, which matters a lot for a tool meant to inform real policy decisions. I'm also proud I built this entire project solo, from data research to a working deployed AI application, while having no prior experience with the Gemini API.

What we learned

I learned how to design prompts that keep an AI model grounded in real data instead of making things up, how to debug a live Python application, and how to take a rough idea and turn it into something people can actually click through and use.

What's next

Next steps would be adding real-time groundwater sensor data instead of static reports, expanding coverage to more Lahore towns, and adapting the tool for other water-stressed Pakistani cities like Karachi and Quetta.

Built With

Share this project:

Updates

Submission history