Inspiration

According to the Canadian Centre for Injury Prevention and Control, in Canada, an average of 4 people are killed every day as a result of impaired driving. In 2019, there were 1,346 deaths caused by impaired driving, which represents approximately 30% of all traffic-related deaths in Canada. Impaired driving is also a leading criminal cause of death in Canada and it is estimated that it costs the country around $20 billion per year. These statistics show that impaired driving is a significant problem in Canada and highlights the need for continued efforts to reduce the number of deaths and injuries caused by this preventable behavior.

What it does

This program calculates the users blood alcohol concentration using a few input parameters to determine whether it would be safe for the user to drive their vehicle (Using Ontario's recommended blood alcohol concentraition 0.08). The program uses the users weight, sex, alcohol consumed (grams) (shots [1.5oz], wine glass [5oz], beer cup [12oz]), alcoholic beverage. The alcoholic beverage is a local database constructed using some of the most popoular drinks.

With the above parameters, we used the Widmark formula described in the following paper (https://www.yasa.org/upload/uploadedfiles/alcohol.pdf). The Widmark is a rough estimate of the blood alcohol concentration and shouldn't be taken as a definitive number. The Widmark formula is:

BAC=(Alcohol consumed in grams / (Body weight in grams * r)) * 100

How we built it

We used ReactJS for front-end and Firebase for the backend. For the Google technology we decided to integrate the Firebase Realtime Database. We store all of the drinks on there so that whenever we reload the page or access the website on different devices, we can continue from where we left off. Your alcohol blood concentration also depends on how much time has passed since you drank the drink, so we are able to store the time and update it continuously to show more accurate results.

Challenges we ran into

  • Incorporating time into elapsed time calculations
  • Use State hooks constantly delayed
  • Reading data from database

Accomplishments that we're proud of

  • Our first hackathon!

What we learned

  • How to fetch data from a database.

What's next for Alcohol Monitor

  • Photo scan of drink
  • More comprehensive alcohol database
  • More secure database implementation
  • User logins
  • Mobile implementation
  • BOOTSTRAP!
Share this project:

Updates