Sparklines, wow 0

ludo, Friday 29 April 2005

I only learned about sparklines today thanks to a post by Sam Ruby, where he mentions the Ruby (as in "ruby the programming language") library RedHanded. Sparklines are a concept by Edward Tufte, which he describes as "wordlike graphics, with an intensity of visual distinctions comparable to words and letters".

Sparklines are more easily understood by example, as this simple graph of daily page views for this site or this one visualizing the same data with a different notation . If you cannot see the two examples, you should get yourself a better browser as the preferred way of embedding sparklines in HTML is by using RFC 2397 "data: URIs", which IE does not support.

If you're interested in creating sparklines, there are quite a few tools already available: the Ruby library Sam wrote about, a PIL-based Python script (the one I used to create the above examples) or a matplotlib-based one, and a PHP library. If I ever find the time, I'd like to add sparklines to the "about" section of my posts.