A frequent challenge for transforming time-series data (e.g. weather, meter data) is changing columns representing multiple times of the day to a single column or in OLAP terms what might generically be described as an “Hour of the Day” or “Interval” dimension.
With the benefit of smart electricity meters it’s possible to obtain hourly data showing household consumption in KWh. I downloaded this dataset for my own house in CSV format from United Energy’s EnergyEasy portal.
With some massaging, the data can be formatted to a structure which which makes aggregation easier. The excellent tool OpenRefine made this task easier, effectively unpivoting half-hourly measures which were in many columns into a single column, so that the data looks like this:
During which hours of the day is the highest average energy consumption? Is this different in summer vs winter? Has this changed from 2012 to 2013?
Has the minimum energy consumption overnight changed? Is the new (and slightly annoying) energy saving power board purchased in mid 2013 doing its job to reduce standby power use?
During which hours of the day is power usage the most variable?
Selectable date range – e.g. to compare a rolling 12 month period. This uses a “context” graphics section in D3.js with brush functionality to trigger realtime recalculation of data in the “focus” section when a user selects a range using their mouse. The live update of the hourly consumption profile means it’s easy to see trends over time in the “focus” area of the screen (shown in the following point):
Plotting of max / min / mean / standard deviation of KWh consumption per hour of the day:
“Snapshotting” of date range – e.g. to compare two consecutive years in an interactive way: