Current Cost Charting fun

Meter with Current Cost clamp fitted Current Cost display

Nick has already written a nice introduction to using the Google Chart API for drawing charts of household power consumption over time. I’ve been playing with some other parts of the API as part of setting up a web-based dashboard so Rachel and I can keep an eye on our house’s power (as monitored by the Current Cost meter) from the living room computer and our own laptops.

First, I also started playing with what Google describes as Google-o-meters. For example, a basic dial can be created like this

For power readings, I’d prefer to have the colours go from green through yellow to red, and since the colour argument takes an optional 4th component for opacity (00-ff), let’s try making it semitransparent too.

For temperatures, something like this might be quite nice.

I’ve been spending some time thinking about alternatives to line graphs (or sparklines) for plotting daily power consumption. I’m really liking the radar chart option. These look a bit like this.

(using cht=r for straight lines, and again with the same data but using curved lines, thanks to cht=rs)

It seems quite well suited to rendering 24 hours of power consumption. Like so.
?cht=r (and rs for splines)
&chd=s:QKKHHHHIG9JwpHIXddcbUMRUQ (using simple encoding)
&chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|[etc...] (labels)
&chm=B,FF000040,0,1,0|h,00004444,0,0.5,1|h,00004444,0,1,1 (rings at 50 and 100%)

That was a Saturday. Can you tel when we got up and switched on the (power-hungry) electric shower? On a weekday, that initial spike comes a bit earlier.

Even better, I can overlay the daily plots from a whole week in one chart. Using semi-transparent shading helps create a sort of heat-map thingy, thusly.
&chm=B,FF000066,0,1,0|B,FF000066,1,2,0|[etc, shading for each series]|h,00004444,0,0.5,1|h,00004444,0,1,1

It looks as though most of our power is spent in the mornings, largely due to the electric shower.

Update: Nick’s done some great work which goes way beyond this…

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
The postings on this site are my own and don't necessarily represent my employer's positions, strategies or opinions.