# Guess What Time Justin Wakes Up

April 16, 2014

First, a little bit on my tools.

For analysis tools, I’m mainly using Python (in the form of iPython notebooks) with the Pandas module for data analysis (the sklearn module for machine learning later). Suffice it to say it’s rad. I also use Github, both for my analysis and modeling as well as this blog itself (as you can tell from the current web address), so you’re welcome to peruse or use any of my code from there. I’ll try to keep my iPython notebooks pretty clean and explained well as a supplement to the blog. You can find the notebook for the analysis below here. (Just click the link - you don’t need anything special to be able to view the notebook.)

Pandas has been great for data analysis and makes things intuitive and quick. As a mechanical engineer, a lot of my previous work was in Matlab. It of course has its strengths but for data analysis it always took quite a bit of manual data munging, especially when it came to time series.

Anyways, using the Python groupby function I can manipulate the time series of my hourly electricity consumption from my BGE smart data. The data starts from January 18 and I now have a few full months of data. Below is a quick code snipet of how I’m using groupby in this case.

# elec_and_weather: hourly electricity usage
elec_and_weather.groupby([(elec_and_weather.index.dayofweek==5)|(elec_and_weather.index.dayofweek==6),elec_and_weather.index.hour])