Tuesday, December 27, 2011

52: Sparklines


    Recently I've been reading a book called "Beautiful Evidence", the
latest release by Edward Tufte.  Tufte, once labelled by the New York
Times as "the Leonardo Da Vinci of data", is the author of a classic
series on "The Visual Display of Quantitative Information".
In these books he talks about the various ways to present numerical
and statistical information to a reader, and repeatedly stresses the
importance of such communication as a critical part of the job of a
scientist, social scientist, engineer, or anyone who analyzes data.
If data is presented in such a way that it is ignored or
misunderstood, it is useless.  For example, in one of his books, he
talks about how the 1986 space shuttle explosion could have been
prevented if the engineers had done a better job presenting their
concerns about O-rings to NASA management.  I would highly recommend
both his books and his live seminars.
    One of the most intriguing concepts in this latest volume is a
graph format called "sparklines".  The basic idea is that if you are
graphing a type of data where the general concept and the likely axes
are well-known, you should create a "sparkline", a tiny graph about
the size of a word of text.  You can then either include such graphs
embedded in the text itself, or create figures which, by the use of
multiple sparklines, show thousands of values and provide an amazing
data density compared to traditional figures.  In Tufte's words,
sparklines are "data-intense, design-simple, word-sized graphics".  If
you think about the vagueness of a typical English word, I think you
will realize that even an unlabeled, partially-defined graph is often
richer in information content.
    At first, you might wonder what Tufte has been smoking to think
it's useful to create a graph the size of a word.  How do you read the
axes?  How can you pick out a point and see the value there?  Well,
obviously, you don't.  But take a minute to think about how use use
graphs in real life.  For example, if you're reading an article about
today's stock trends, you might see a comment that Intel closed at 22.88,
while a figure elsewhere on the page indicates the 1-year or 5-year
history.  How much detail do you really look for in the graph?  If
you do let your eyes wander away from the text to that other part of
the page, chances are you'll take a quick glance and just get the
general trend.  I have difficulty recalling a recent instance where
I've actually looked at a point on the graph and traced it back to the
source values.
    Tufte provides many excellent examples where a sparkline might be
especially useful.  The stock values example I just mentioned is a
good one-- you really just want to see the trend, so why not include a
sparkline next to the closing price rather than having to look for figures
elsewhere on a page?  In medical monitoring equipment, if you need to
print a record describing a patient's glucose level, why not have a
sparkline next to the number so a doctor can see the recent trend at a
glance?  If describing a baseball team's progress over the season, why
not include a win/loss record sparkline while discussing it, or show
similar sparklines for the entire league on a single page?  You can
probably think of similar examples in your own areas of interest.
Think of a sparkline as just a single information-rich word of text,
and use it accordingly!
    So, if this concept is so great, why hasn't it caught on?  Sadly,
I think the real answer is that our tools just aren't well-adapted to
this new concept.  Usually you have to create graphs and text in
separate applications, then paste the graphics into the text.  Perhaps
some of you MS Word whizzes out there can do it better than I can, or
maybe I'm just a moron, but somehow I never find pasting pictures into
Word gets me exactly what I want.  And even when the graphs are
aligned and formatted properly, a slight change to font or paragraph
formatting messes them all up.  And since most of us are straitjacked
into our current toolsets, I have the feeling things will be this way
for a while.
    On the positive side, there are several applications for creating
sparklines linked into the wikipedia page, so with sufficient effort,
this technique really is open to anyone.  Next time you are writing a
paper that requires data to be presented in graph format, think hard
about whether sparklines might serve you better than traditional
graphs.  I know I will.
    And this has been your math mutation for today.




  • Edward Tufte at Wikipedia
  • Sparklines at Wikipedia
  • Tufte's sparklines page
  • No comments:

    Post a Comment