Hear the Energy Flow: Pachube + SoundCloud Mashup

It’s all very well and good to be able to visualize the energy flow from New Brunswick to Prince Edward Island, but what if we want more “ambient” feedback? What if we want to feel the energy flow?

Enter Pachube, SoundCloud, and a bit of PHP code to stitch them together. The result: iTunes plays songs with a beats-per-minute reflecting the current energy flow. Watch it in action:

What’s happening here is this:

  1. The New Brunswick System Operator page is being scraped and converted into a Pachube feed which exposes the data in XML (code here).
  2. The XML data is grabbed from Pachube and the figure, in megawatts, representing energy flowing from New Brunswick to Prince Edward Island is use to search SoundCloud via its API (code here).
  3. The tracks returned from SoundCloud are played in iTunes.

The result: you can hear how much energy is flowing over the cable from New Brunswick to Prince Edward Island.

Update: I’ve packaged up the code as a Mac OS X app that you can download and install without the need to fuss with code.


Chris's picture
Chris on April 15, 2012 - 23:39 Permalink

Intrigued by your project here but after reviewing the code, I’m not sure how the bpm updates as energy flow changes. Am I missing something?