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

http://chart.apis.google.com/chart?chs=200x120
&cht=gom
&chd=t:50
&chl=label

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.

http://chart.apis.google.com/chart
?chs=200x120
&cht=gom
&chco=00ff0099,ffff0099,ff000099
&chd=t:62
&chl=1.24%20KW

For temperatures, something like this might be quite nice.

http://chart.apis.google.com/chart
?chs=200x120
&cht=gom
&chco=0000ff99,ffffff99,ff000099
&chd=t:75
&chl=22%C2%B0C

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.

http://chart.apis.google.com/chart
?cht=r
&chs=200x200
&chd=t:20,40,80,40,20,30
&chco=FF0000
&chxt=x
&chxl=0:|0|1|2|3|4
&chm=B,FF000040,0,1,0

(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.

http://chart.apis.google.com/chart
?cht=r (and rs for splines)
&chs=300x300
&chd=s:QKKHHHHIG9JwpHIXddcbUMRUQ (using simple encoding)
&chco=FF0000
&chxt=x
&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.

http://chart.apis.google.com/chart
?cht=rs
&chs=300x300
&chd=s:CBBBBBBBBDXcCBCCXQFFFGEDC,CCBBBBCbTZMCECCCTORRFFFCB, [...] (one per series)
&chxt=x
&chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23
&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…

24 Comments »

RSS feed for comments on this post. TrackBack URI

  1. With a standard line chart I can compare by eye the area under the line to compare the kWh used by a given spike.

    I don’t think I can do this on a radar chart as the area under the line is not proportional to use, so tall spikes cover a disproportionally large area.

    So for displaying information to people, given that many people will naturally read a chart by comparing the area under the line, I’m a little worried that they de-emphasise the cost of long running low level use.

    That said, I do think that this chart would be really good for recognising patterns as it creates recognisable shapes and can represents time as the continuum it is, rather than something that starts and stops at 00:00.

    Comment by David Illsley — May 12, 2008 #

  2. Hi David

    Do you find the disproportionatly large area (or is it indirectly proportional?) under a spike offputting? Would it be less misleading if the chart wasn’t shaded?

    I think the trend of the line is valuable, even if the area underneath it isn’t as meaningful as it would be on an x/y plot. I should have pointed out that the readings are being summed (or could be averaged, but summed it nice), at one hour intervals. If it was plotting one reading per minute, the area under the line would probably more relevant. With that coarse-grained data you’re not seeing comparisons between short-and-fat or tall-and-skinny spikes anyway, the data is already trended into hourly readings. (And I were taking the area seriously I should be using straight lines rather than spline curve smoothing too).

    I think these graphs are a reasonable way to show a pattern of usage. At least, their clock-ness makes it very easy to use them to spot temporal patterns. Even better than overlaying a week’s worth of data onto one chart seems to be laying seven of them side by side in a row. Once I have a grid of a few weeks, I expect to be able to see patterns in the columns. We always get up later on Saturday, for one thing. Perhaps seeing the overlaid total for a week (at the end of each row) and same day-of-the-week across many weeks (at the bottom of each column) will be interesting. Lots to play with, anyway.

    Comment by Roo — May 12, 2008 #

  3. Hey Roo, I’m in absolute agreement that it’s a good way to show patterns and do comparisons between 24 hour periods – the interesting shapes and the pseudo clock form see to it. I’m intrigued how many types of days exist and can be identified (weekday/weekend/WAH day…) and how early in the day it can be done and I think these style of charts could help with that.

    When I was first looking at the 24hr chart above, I wasn’t comparing across days, but between the hours, and it was only a while later that I realised that I hadn’t correctly understood the relationship between the power used for the shower vs the power used overnight.

    Given that you were summing not averaging and the resultant sample rate is 1/hr, I still wasn’t understanding it correctly ;-) and area really isn’t relevant – it’s all about the distance along each hourly axis.

    To your questions: Now that I understand that area is meaningless because of the data point being plotted, it’s not as offputting. While the shading may have helped my confusion, I think it helps when doing the overlays of multiple days – colour mixing comes to mind as a something to investigate.

    Lots of things to play with indeed!

    Comment by David Illsley — May 12, 2008 #

  4. [...] Turning the data into graphs and charts: Nick, Roo [...]

    Pingback by dale lane » Blog Archive » CurrentCost - first impressions — May 15, 2008 #

  5. Following on from David’s interesting observation, why not plot the square root of the power consumption on the radial axis?

    The spikes would be less exaggerated, but you would still have the “clockiness” and the area would be proportional to the energy consumption.

    Comment by joe chacko — May 17, 2008 #

  6. And this is the reason I blog. Cleverer people than me read it and take the time to make suggestions I’d never have thought of on my own.

    Thanks Joe (and David). I’ll try that.

    Comment by Roo — May 17, 2008 #

  7. [...] know the device spits out an XML packet every six seconds, and people have been grabbing that and feeding it into Google Charts or homebrew solutions. The Current Cost website gives a demo of an interesting-looking app which is [...]

    Pingback by COPE: James Wallis levels with you » Current fun — May 21, 2008 #

  8. [...] are lots of interesting things to do with the data, which I’ll start to play with once I have a meaningful volume of it. One [...]

    Pingback by CurrentCost « log.illsley.org — May 26, 2008 #

  9. [...] want to start with something a bit different to graphs, because there’s already been a lot of cool work done in different graphing [...]

    Pingback by dale lane » Blog Archive » A daily CurrentCost “bill” — May 28, 2008 #

  10. [...] My long awaited current cost meter arrived this week . I have been looking forward to this arriving for the last month, especially after reading the blogs written by Dale Lane, Andy Piper, Roo Reynolds. [...]

    Pingback by Setting up my Current Cost Meter | Chris Dalby Untangles Networks — June 15, 2008 #

  11. [...] The current craze at IBM Hursley involves the CurrentCost meter, a simple little gadget that measures power usage in your house. These are being discussed on IBM [...]

    Pingback by Effing the Ineffable » Interfacing the CurrentCost meter to your PC — June 15, 2008 #

  12. [...] plan The more geeky amongst us have connected the CurrentCost to a server of some sort. By connecting it to something [...]

    Pingback by dale lane » Blog Archive » CurrentCost - getting the history into Windows — June 15, 2008 #

  13. Current Cost Monitor…

    A couple of guys at work have managed to lay their hands on a funky new device called a Current Cost meter. It’s pretty simple to understand, it measures your household electricity usage and displays……

    Trackback by Graham White: My Notes — July 23, 2008 #

  14. Graphing Current Cost…

    After hooking up my Current Cost Meter to a database recently I’ve been logging my power usage so the next step is to look at what I can do with the data. As I mentioned when I introduced my meter lo……

    Trackback by Graham White: My Notes — July 29, 2008 #

  15. [...] reading pages like this and this, the geek inside me knew I had to have one! After it finally arrived I plugged it in and was [...]

    Pingback by light.widgisoft.co.uk » Blog Archive » Current Cost Meter — October 4, 2008 #

  16. [...] I’d like to translate it into some simple charts that could sit on the sidebar of this blog. Some have used the Google Charts API. If I can work out what I’m doing, I’ll do the [...]

    Pingback by Counting the current | daveharte.com — November 24, 2008 #

  17. [...] I was at uni) and Paul Mutton’s Jibble on the Matter, and then the subsequent posts about doing roughly the same thing, I decided that my new flat would need to have an electricity monitoring [...]

    Pingback by Electricity Usage Logging with CurrentCost EnviR and a Raspberry Pi — November 11, 2012 #

  18. Sheathe your sword, draw your deck, and get prepared for Hearthstone – the quick paced strategy card match that’s easy to learn and massively exciting.
    Begin a free of charge match on Struggle.internet and enjoy your playing cards to sling spells, summon creatures, and
    command the heroes of Warcraft in duels of epic technique.
    With potent prebuilt decks, and hundreds of further cards to get,
    craft or purchase – your assortment never ever stops evolving.
    Obstacle gamers of all ability levels on Battle.internet or hone your
    expertise in apply matches from some of the best strategists of Azeroth – Thrall, Uther, Gul’dan, and far more!

    Hearthstone is the ideal game.
    Weapons are unique playing cards which can be equipped by heroes.
    Every weapon has an Attack benefit and a Durability price.
    Every hero can only equip one weapon at a time, and equipping a new weapon will ruin the aged 1.
    Attacking employing a weapon deals harm equivalent to its Assault, and minimizes its Toughness by one.
    When a weapon’s Toughness is reduced to zero, the weapon will be
    ruined.

    Weapons can be equipped in a number of ways.

    The major source of weapons is from playing weapon playing cards, the the
    very least frequent of the three card types. Some spells and minion battlecries also grant gamers
    weapons, as does the rogue hero energy Dagger Mastery.
    As properly as equipping weapons, some playing cards offer weapon synergy,
    bettering or drawing strength from them, or even destroying the enemy’s.
    Pirate playing cards have a strong weapon concept.

    Also visit my webpage hearthstone beta keys gratuit (Shannan)

    Comment by Shannan — December 17, 2013 #

  19. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get four e-mails with
    the same comment. Is there any way you can remove me
    from that service? Thanks a lot!

    My homepage: Hearthstone Beta Download

    Comment by Hearthstone Beta Download — January 3, 2014 #

  20. Yes! Finally something about hearthstone arena strategy.

    Comment by hearthstone wow — January 24, 2014 #

  21. It’s awesome to pay a quick visit this site
    and reading the views of all mates about this post, while I am also zealous of getting knowledge.

    Comment by how to make extra money — February 25, 2014 #

  22. That is a good tip especially to those fresh to the blogosphere.
    Short but very accurate information… Thank you for sharing this one.
    A must read post!

    Comment by legit ways to make money — April 15, 2014 #

  23. Simply want to say your article is as astounding. The clarity
    in your post is just excellent and i can assume you’re an expert on this subject.
    Well with your permission allow me to grab your feed to keep up to date with forthcoming post.
    Thanks a million and please carry on the rewarding work.

    my blog … kalkulator

    Comment by kalkulator — April 16, 2014 #

  24. Possibly you have utilized by acquiring the
    Crazy shirts Coupon Code merely to identify that you can not use this
    less expensive it provides? Anyone whom providers on the net simple Crazy shirts Coupon Code would’ve professional this
    problem. These kinds of Crazy shirts Coupon Code will usually be quite valued just
    by internet buyers considering that they make them end up being troubles
    in addition to experience describing significant revenues.

    You can stay clear of almost any type of issues
    along with taking advantage of a Crazy shirts Coupon Code should you understand
    they will to make essential techniques instead of they will.
    A great deal of the issues entirely eaten with the support of clients consist of:
    .

    Acquiring the done Crazy shirts Coupon Code: Many
    Crazy shirts Coupon Code make use of an occasion time-frame across that they might halt used to get a more budget-friendly price or merely just
    useful technique. With each other, an added person instead back
    can get fortuitous utilizing your Crazy shirts Coupon Code that include passed her expiration day when your business have actually really never ever deactivated this
    kind of decline.

    Not necessarily having a look at the Crazy shirts Coupon Code totally.
    Prior to selecting to just what precisely sort of Crazy
    shirts Coupon Code must be taken advantage of any
    person efficiently can well aren’t thrilled to uncovered find
    the most from using. You can not think virtually all Crazy shirts
    Coupon Code supply an established lesser.

    Going down acquiring a specific Crazy shirts Coupon Code.
    On the other hand, you can use software application
    applications keep to the real Crazy shirts Coupon Code so that you can use them
    despite the fact that essential.

    When you are getting online, you can have a big quantity wonderful offers of cash on a routine month-to-month basis using the appropriate Crazy
    shirts Coupon Code. Obtaining this sort of Crazy shirts Coupon Code can not be
    uncomplicated. Need to be truth, you’re likely to be spending
    lots of impartial trying to find people Crazy shirts
    Coupon Code.

    You have to recognize using Crazy shirts Coupon Code in the accountable technique or perhaps you perform find youself to acquire investing a more substantial cost for anybody opportunities.
    Since to recognize a rather a lot of elements being made quickly supplied with a
    tiny asking cost as a result of Crazy shirts Coupon Code, it does
    not produce simply.

    Possibly you have utilized by acquiring the Crazy shirts Coupon Code simply to acknowledge that you
    can not utilize this additional cost-effective it supplies?
    Given that they make them become issues along with proficiency connecting
    to pertinent revenues, these kinds of Crazy shirts Coupon Code will
    often be really appreciated simply by internet customers.

    Getting the done Crazy shirts Coupon Code: Most
    Crazy shirts Coupon Code use an occasion time-frame around that they could quit made use of to get a much more budget-friendly expenditure or merely just handy method.
    Before preferring to what particularly type of Crazy shirts Coupon Code
    need to be utilized anyone well can well aren’t enjoyed found out locate the most from utilizing.

    Possibly you have used by acquiring the Crazy shirts Coupon Code
    just to recognize that you can not use this more economical it offers?
    These types of Crazy shirts Coupon Code will usually
    be very valued just by internet purchasers considering that they make them wind up being troubles together with know-how describing pertinent revenues.

    Prior to opting to exactly what specifically sort of Crazy shirts Coupon Code
    should be utilized anyone successfully could well aren’t delighted to learned uncover the most from
    taking advantage of. When you are obtaining online, you could have a huge amount great bargains
    of cash on a regular month-to-month basis making usage of the right Crazy shirts Coupon Code.

    Possibly you have utilized by obtaining the Crazy shirts Coupon Code merely to acknowledge that you can not
    utilize this cheaper it provides? These kinds of Crazy shirts Coupon Code will normally be very valued merely by internet purchasers considering that they make them come to be issues in addition to expertise referring to significant
    revenues.

    Prior to choosing to what precisely kind of Crazy shirts Coupon
    Code should be made usage of any type of individual
    effectively could well aren’t delighted to discovered discover the most from making
    usage of. When you are obtaining online, you could
    have a huge volume remarkable deals of cash on a regular monthly basis using the right Crazy shirts Coupon Code.

    Comment by crazy shirts Coupon Code — April 17, 2014 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

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.