On Friday, when mindlessly scrolling through Instagram, I came across a post from the City of Coppell that claimed city residents had consumed 18 million gallons of water alone on July 28th. Currently, by contract, Coppell can only acquire 18.5 million gallons of water from Dallas Water Utilities; thus, the sudden increase in water usage is alarming. This situation stresses the need to conserve water for the sake of the environment and from a financial standpoint. Thus, this issue of water consumption inspired me to create Save Your Water – a website that makes the first step towards reducing future water consumption.

What it does

Save Your Water is a website that first allows city residents/users to upload a file documenting a history of their daily water usage (in the past month or so). After the user upload their file, the website generates a scatter plot graphing their cumulative water usage (in gallons) against the # of days which allows users to visualize the growth of their water usage. After the scatterplot of historical water usage is generated, the user is prompted to enter the number of days in the future they would like to see their projected water usage for. The website then generates another scatterplot (using a linear regression ML algorithm) with cumulative water usage predictions for the user-inputted number of days. The user is then prompted with an option to learn how they can conserve their water – specifically tailored towards users who are utilizing an unreasonable quantity of water. If users say “yes” to learning about water conservation options, the website asks these users a series of questions regarding their water usage habits. Using these user-inputted responses, the website generates personalized water conservation options that users can implement in their homes to save water. Users can then select a particular water conservation option and the website will show them exactly how much water they can save in the future if they implement the option in their home. Thus, not only does Save Your Water allow city residents to recognize whether they are over-consuming water, but it also prompts them to take action through numerous water conservation strategies that are proven to work.

How we built it

First, I downloaded my family’s real water consumption data from my city’s website as a .csv file. Then, using Jupyter Notebook, I utilized several common Python packages/libraries including Pandas, NumPy, Matplotlib, and scikit-learn to read data, generate scatterplots, and predict future water consumption data. With regards to water conservation options, I utilized Python-based logic to obtain user-input and provide appropriate output. Additionally, React.js was used to create the website.

Challenges we ran into

One challenge I ran into was coming up with my initial idea. I struggled finding a viable project that would fit the environmental theme. I ended up jumping through several project ideas ranging from optimal catalyst design to Yosemite forest fires. However, after coming across the City of Coppell Instagram post, I knew Save Your Water would hold great significance as it addresses a relevant, current issue. After coming up with the initial idea for Save Your Water, I faced challenges with deciding website and Python-code functionality. I spent several hours detailing the logistics in terms of how the website would predict future water usage and provide personalized water conservation options. Lastly, from a technical standpoint, I faced challenges in terms of creating the website and user-interface. As a beginner in web-development, getting each component to appear how I wanted it to was a challenge. However, through online tutorials and research, I managed to get a basic layout for the website.

Accomplishments that we're proud of

Prior to this hackathon, I had very limited experience with web-development. Thus, building the basic user-interface for the Save Your Water website is an accomplishment I am incredibly proud of as it also lays the foundation for future project expansion. I am also proud of utilizing real-data for analysis. In previous projects, I often used simulated/dummy data for analysis and never got to testing my products on real-data. Thus, I am proud of using real water consumption data that provides a sense of authenticy to my project.

What we learned

In this project, I learned how to use several Python data science and machine learning packages/libraries. Specifically, I learned how to use these packages/libraries to read in data, visualize data, and predict future data. Furthermore, I learned React – a javascript library for building website user-interfaces – and how to manipulate features to alter the visual aesthetic of my site.

What's next for Save Your Water

For future project expansion, I hope to effectively integrate the website and Python code (which I could not implement for this hackathon due to time constraints) to yield a fully functioning product. I will likely do this using Flask – a Python micro web framework – which would allow me to run Python scripts on website inputs (i.e. user clicks on a particular water conservation option). Additionally, as of now, Save Your Water only allows users to see how a single water conservation option affects their future water usage. However, in the future, I hope to allow the users to see how multiple options simultaneously in effect can alter their future water usage. Furthermore, Save Your Water, is currently aimed towards city residents so they can track their water usage and find ways to conserve their water. However, I hope to expand Save Your Water so it is also directed toward city officials who can use the website to track city-wide water usage and visualize how city-wide conservation efforts can alter future projected water consumption data.

Built With

Share this project: