Posted by: decster | May 9, 2008

A week in the country

Have spent the last week at home in Ireland, mostly cutting grass.

Posted by: decster | April 5, 2008

Mapping Sovreign Wealth

Nice visualisation of the investment activities of sovreign wealth funds over the past three years. Click to enlarge

(Via The New York Times)

Posted by: decster | March 31, 2008

Thanks Arthur

I challenge you to watch the above three times without collapsing in tears

Posted by: decster | March 3, 2008

O’er the land of the free

I’ve always thought the US national anthem to be a bit of a dirge. Maybe it is because the anthem is generally heard being brutally slaughtered by some wailing Mariah Carey-wannabe, or worse, Mariah Carey herself.

On their recent historic visit to North Korea, the New York Philharmonic Orchestra performed a rendition of The Star Spangled Banner. Given North Korea’s position as the world’s last Stalinist dictatorship and the United States’ self-styled role as the world’s flagship democracy, it’s stirring stuff. So stirring in fact that I found myself singing along at one point which is saying something given nobody ever knows the words.

Posted by: decster | March 2, 2008

Forever blowing bubbles

February’s Harper’s Magazine has a thought-provoking article on inflationary bubbles, that is:

“asset-price hyperinflation”—the huge spike in asset prices that results from a perverse self-reinforcing belief system, a fog that clouds the judgment of all but the most aware participants in the market. Asset hyperinflation starts at a certain stage of market development under just the right conditions. The bubble is the result of that financial madness, seen only when the fog rolls away.

After an overview of bubbles from the South Sea Bubble to more recent affairs, Harper’s speculates as to what the next bubble might be:

There are a number of plausible candidates for the next bubble, but only a few meet all the criteria. Health care must expand to meet the needs of the aging baby boomers, but there is as yet no enabling government legislation to make way for a health-care bubble; the same holds true of the pharmaceutical industry, which could hyperinflate only if the Food and Drug Administration was gutted of its power. A second technology boom—under the rubric “Web 2.0”—is based on improvements to existing technology rather than any new discovery. The capital-intensive biotechnology industry will not inflate, as it requires too much specialized intelligence.

There is one industry that fits the bill: alternative energy, the development of more energy-efficient products, along with viable alternatives to oil, including wind, solar, and geothermal power, along with the use of nuclear energy to produce sustainable oil substitutes, such as liquefied hydrogen from water.

This is followed by a speculative chart on what an alternative energy bubble might look like:

alt-energy-bubble.gif

Alternative energy doubtless has the ability to be the Next Big Thing. Peak oil, uncertain gas supplies, gathering interest from the political mainstream and the populist desire for energy independence all suggest that the sector has the potential for rapid growth. And then there’s the interest from the venture capitalists. This week’s Economist has a piece on how the bright young things of Silicon Valley are turning their attention to the area of alternative energy. Forbes ran a similar story last month.

I wonder if in 10 years we’ll be sitting in a bar consoling each other on getting burned in the Solar Energy Bubble or maybe about how we paid for second homes off the proceeds of that wind turbine IPO. Maybe it’s time to go long alternative energy.

Not too long though.

Posted by: decster | February 28, 2008

Eric Bana, what a tosser

Posted by: decster | January 24, 2008

Red, Black and Falling

Posted by: decster | January 21, 2008

Bedtime (II)

Girlfriend: I’m banning your jokes from the bedroom

Decster:  You can’t, that’s like banning love from the Sixties

Girlfriend: Love was appropriate for the Sixties, your jokes are not appropriate for the bedroom

It’s been a while since any funny business happened in Decster’s bed.

Posted by: decster | January 13, 2008

Google Chart and sparklines

Following on from my earlier post on the Google Chart API, I have been playing around with the API a bit more. This time I’ve been focusing on sparklines.

Followers of the work of Edward Tufte will be familiar with sparklines. Properly described, they are small, high resolution graphics embedded in a context of words, numbers, images. Simply described, they are graphs that fit in a line. Examples are always good so returning to the the previous post’ example of Irish generation of electricity from wind over the past six years, were we to represent it with a sparkline and it would look like this: .

Hmmm, but that doesn’t look very informative. There are no labels, for example, and its hard to grasp a sense of scale (full graph for comparison). The simplicity of a sparkline belies its power. With a glance I can see that windpower generation in Ireland has been increasing. The power of sparklines becomes more apparent when you want to quickly visualise and compare several sets of data, share prices of competing companies would be a good example. For my next example though I’m going to depict US military personnel wounded in Iraq since 2003 (data). To show-off the potential of this visualisation method even more, green lines are used to indicate a downward trend in figures, red is upward and grey is used where the trend was ambiguous:

2003
2004
2005
2006
2007

What has really impressed me here is how simple it was for me to generate these sparklines. In the past I’ve played around with graphic modules in both Perl and Ruby in an attempt to generate sparklines but none have come close to the simplicity and ease of use of the Google API. Most impressive of all has been that no matter what image dimensions I feed to Google, the returned sparkline is always properly rendered and well scaled.

Further reading:

Posted by: decster | January 7, 2008

A first look at Google Chart

The Google Chart API has been around for a few months now but I’ve only gotten around to having a play with it this evening. The API offers an easy way to generate simple graphs for embedding in a web page. To use the API you construct a URL with parameters specifying how the graph will appear and including the encoded chart data and in return it then presents you with a PNG representation of your chart. Essentially what you are doing is simply hotlinking to the picture of the chart which is hosted by Google. Of course there’s nothing to stop you saving the image and uploading it to your website later on but for ad hoc generation of charts, Google are onto a good thing. Enough with the prattle, lets take a look at how it works.

To generate a chart one of course needs data. Unbeknownst to many, I take a keen interest in the construction of new wind farms in my native Ireland. This may have something to do with the plans to construct one of the world’s largest offshore wind farms near where I grew up or maybe it’s simply because I like windmills. Anyway this data from Sustainable Energy Ireland on the construction of wind farms in Ireland over the past few years affords me the opportunity to graph some meaningful data.

Adding up the amount of megawattage constructed every year in Ireland between 2000 and 2006 provides the following dataset:

2000 2001 2002 2003 2004 2005 2006
46.67 8.4 12.575 74.4 135.15 152.25 246.5

 

In order to use the API you need to encode the above data into a more compressed version using one of a choice of encoding techniques. As I’m using a small dataset, I’m using the simplest encoding technique. Google provide some sample Javascript so after a few minutes effort I’ve encoded my dataset as JCCPbfy. In addition to the data I also need to include the labels for the X and Y-axes, dimensions of the image, the encoding technique used and a few other parameters which are well documented by Google. So what I’ve ended up with is a URL that looks like the following (I’ve highlighted the bits I’ve had to edit in bold):

http://chart.apis.google.com/chart?chs=400×250&chd=s:JCCPbfy&cht=lc&
chxt=x,y&&chxl=0:|2000|2001|2002|2003|2004|2005|2006|1:||300+MW

And that’s it. I then simply take that URL and either wrap it in an <img> tag or, in this case, just point WordPress at it.

It’s nice to see that the number of wind farms completed each year in Ireland is on the increase but lets say I want a bar chart instead. Well that’s easy-peasy, I just change the cht parameter to say bvs and that’s it, I have a bar chart.

And who doesn’t like pie?

I’m only scratching the surface here and there are a bunch of other features like specifying colours, handling multiple datasets and so on. Sure there are limitations, like you can’t have more than 4,096 values in your dataset, but I suspect Google are onto another hit here. People like to talk about Software as a Service but I think what we are looking at here is another example of Components as a Service. Look at the ubiquity of Google Maps and you can see how Google Charts could become increasingly prevalent.

While I can’t see large enterprises ever using Google Charts in a big way, their mindsets aren’t designed to send data beyond their walls, I think there are important take-aways. For example, why not provide something equivalent to Google Charts for your applications? Why have disparate development teams each developing graphing components when those same graphs could be provided as part of a centralised service? In some enterprises the idea of separate software components already exists for things like search or authentication. My bet is that it won’t be too long before we see graphing offered in a similar way.

Plenty to chew over and something I’ll return to in the future .

Older Posts »

Categories