Inspiration

Rain barrels that Vancouver residents use to conserve water.

Did you know that rain contains a bigger volume of water than you think? If it rains one inch in a day, a 1000 square foot roof will yield 600 gallons of water!

A rain barrel is a tank that collects rainwater as it flows out of the rain gutters along your roof. Even though you can't drink this water, it's far from useless! Here's how rain barrels can make your life easier, reduce your water bill, and benefit the planet:

  • Saved rainwater can be used to water plants or irrigate your lawn, especially in the summer months when your water footprint is often highest.
  • Rainwater is perfect for washing your car and cleaning outdoor fixtures.
  • Rainwater can even be used to flush your toilet!
  • After it rains, stormwater collects pesticides and other chemicals that eventually make their way to the ocean. By reusing water from your rain barrel, you are helping to clean up our oceans.

What it does

When you sign up, we'll ask you to provide the measurements of your rain-collecting system: the total volume of your rain barrels and the surface area of your roof. Barrel Buddy displays the weather at your location so that you know when to open your rain barrels and when to seal them to protect your rainwater from dirt and insects. It will also alert you when your rain barrels might be full, or when you need to take them in before temperatures drop below freezing.

How I built it

We pulled geolocation data from IP API and used the OpenWeather API to collect current and 7-day weather forecast data. This tells the user whether to take their rain barrels back in and put them out. We also created an algorithm that determines how much water is inside the barrel, compare it to how much rainfall was collected between the current and last login. If the outcome of the calculation is greater than 1, it would mean that the barrel is currently full. An email alert would be sent out to our users to remind them to empty their rain barrel

{(rainfall between last login x Roof top yield ratio*) + current volume} / barrel volume

*Roof top yield ration = (sq of roof x 600)/1000

Challenges I ran into

Getting the OpenWeather API to display the right data, and getting the backend data to display on the front-end page.

Accomplishments that I'm proud of

Communicating with the team and overcoming our obstacles together!

What I learned

We connected front-end and back-end using the database, sorta. With more time, the code could have definitely been more refined!

What's next for Barrel Buddy

When we envision the future of Barrel Buddy, we imagine that it could be readily integrated into a smart home system. By accessing the weather forecast in the area, the smart home will open the rain barrels when rain is anticipated and close them when it's not. It would have the added benefit of sensors watching your rain barrels so you can be notified when they fill up.

Share this project:

Updates