Edward Tufte is one of my favorite writers. He’s a specialist in creating information graphics and a proponent of dense data displays. He is the author of several books, most of which I own. In his latest book, Beautiful Evidence, he introduced sparklines, little graphs that can fit in the same line as text. Sparklines are a wonderful way to combine words and graphics to tell a story with statistics.
Here’s an example of how they can help improve your understanding of numeric data. Assume your company has three products called A, B, and C. Here’s a spreadsheet created in Excel 2010 that shows sales for the products over a seven month period along with total sales.
Sales of three products over seven months
Which product is doing best? Is it Product C with the highest total sales? Or is it Product A, with the highest sales in July? I suppose I could create a graph of the three products, but that would take up a lot of space. Wouldn’t it be nice to create a dashboard that displayed and compared the sales of the three products?
A sparkline of the same data reveals trends
Well, why don’t I create a sparkline? Voilà! Now we can see that sales of Product C are falling rapidly, Product B are flat, and Product A are quite erratic. Pretty nifty, n’est pas? Now I can investigate the reason for these numbers.
Since publication of Tufte’s book, several companies and open source groups have built add-ins for Excel to create sparklines and embed them within a cell of a spreadsheet. In fact, sparklines are so useful that Microsoft decided to implement them in the upcoming version of Excel, as explained in a Jul 2009 MSDN blog post.
I’ve had a chance to play around with this new feature and find it to be quite easy to use. First you select a sparkline type from the Insert ribbon. You select the data range and the destination cell and click OK. This causes the sparkline to be inserted and a Design ribbon to appear on the far right (see below). The ribbon displays quite a few options to make your sparkline pretty. You can group multiple sparklines so that they all have the same min, max, and formatting.
Sparkline ribbon in Excel 2010
I found two annoyances though. First, you only get three choices for chart types, line, column, and win/loss. I wish there were more, especially a scatterplot, since most interesting data is not evenly spaced. Most of the 3rd party sparkline add-ins provide scatterplots, so hopefully Microsoft will add them in the next version of Excel. A good comparison between Excel 2010 and the open source Sparklines for Excel add-in is provided in a recent blog post.
The second annoyance deals with copy-paste. Because sparklines are so compact, it would be nice to be able to embed them in a Word document. However, as you can see in the example below, copying a range of cells containing a sparkline and then pasting it in Word causes the sparklines to disappear. Note that this limitation is due to the way the clipboard works in Office, so will affect all sparklines, not just Microsoft’s implementation.
Copying a group of cells containing sparklines in Excel
Pasting the same cells in Word. Oops what happened to my sparklines?
Having some software experience, I understand why this happened. But most users won’t and will just be frustrated. The sparklines are not static pictures, they are charts generated from the data in the Excel spreadsheet. Word can’t draw the graphs, so when I paste them, it just ignores them. If I want to retain the sparklines, I need to paste the selection as a graphic. But I don’t really want to paste the entire selection as a picture. I want to paste the cells and the text as an editable Word table and have the three sparklines pasted as 3 separate images inside their respective cells of my table.
Hopefully, the Office team will improve paste fidelity of sparklines in the next version of Office, though my guess it would be somewhat difficult to implement and they may decide it’s not worth the effort.
I wanted to see what Edward Tufte thought of the new sparkline feature in Excel and so visited his blog. It turns out he’s a bit apoplectic and so are his fans. But not about Microsoft adding sparklines to Excel. He’s actually happy about that. Rather, it is because Microsoft filed for a patent covering its implementation. This probably isn’t the place to discuss the validity of software patents. However, I will say it is really easy to get a software patent. All it takes is a few hours of thinking about the best way to solve a computer problem and anyone can file a patent. For instance, check out U.S. patent 7437659 that was implemented in Publisher 2003.
[Update1: I clarified my example with screenshots and clarified that the paste problem is not a fault of the sparkline feature.]
[Update2: I just posted a blog entry that talks a bit more about software patents (see Mar 6).]
[Update3: President Obama just named Edward Tufte to the Recovery Independent Advisory Panel. Let’s hope that he can improve transparency and communications in reporting financial matters.]