Building Energy Boot Camp 2019 - Day 3
Today, we learned about SQLite and the SQLite Database Browser. We were given a database containing several tables full of town data of every type, from census results to quarterly water usage. After learning about how to utilize the sqlalchemy and pandas packages together to load tables from the database as dataframes. Armed with this knowledge, we were assigned a new project, in which we must calculate how many houses use, on average, more than 300 gallons of water per day. The difficulty in this project lies in the calculation of the gallons per day, as only the total amount of water used, in cubic feet, is stored in the database and assigned to a certain date range. This means that to calculate how many gallons a house uses per day, all of the rows corresponding to that house must be found (ranging from 2 to 6 rows), the total number of days accounted for must be calculated using the two date columns, prior_date
and current_date
, and this total, along with the converted difference between the largest and smallest measurements, will give the average GPD (gallons per day).
Unfortunately, I was unable to finish the assignment today, and will do my best to finish it tomorrow.