HOME    BOOKS   ONE-DAY COURSE   ET NOTEBOOKS   SCULPTURE   PRINTS   POSTERS, GRAPH PAPER   ABOUT ET 
  CART

 

All 4 books by Edward Tufte now in
paperback editions, $100 for all 4
Visual Display of Quantitative Information
Envisioning Information
Visual Explanations
Beautiful Evidence
Paper/printing = original clothbound books.
Only available through ET's Graphics Press:
catalog + shopping cart
Edward Tufte e-books
Immediate download to any computer
connected to the internet:
La Representación Visual de Información
Cuantitativa, (200 páginas) $12
Visual and Statistical Thinking, $2
The Cognitive Style of Powerpoint, $2
Seeing Around + Feynman Diagrams, $2
Data Analysis for Politics and Policy, $2
catalog + shopping cart
Edward Tufte one-day course,
Presenting Data and Information
Philadelphia, October 14
New York, October 15, 16
Hartford, October 20
Bethesda, November 17
Washington, November 18, 19
San Jose, December 15
San Francisco, December 18, 19
Sparkline theory and practice Edward Tufte

A sparkline is a small intense, simple, word-sized graphic with typographic resolution. Sparklines mean that graphics are no longer cartoonish special occasions with captions and boxes, but rather sparkline graphic can be everywhere a word or number can be: embedded in a sentence, table, headline, map, spreadsheet, graphic. From Edward Tufte's book Beautiful Evidence.


New developments in sparklines: November 2013.

Diluting Perceptual Cluster/Streak Bias:
Informal, Inline, Interocular Trauma Tests

When people look at random number tables, they sees all kinds of clusters
and streaks (in a completely random set of data). Similarly, when people are
asked generate a random series of bits, they generate too few long streaks
(such as 6 identical bits a row), because their model of what is random
greatly underestimates the amount of streakiness in truly random data.

Sports and election reporters are notorious for their
streak/cluster/momentum/turning-point/trendspotting
narrative over-reach. xkcd did this wonderful critique:

To dilute streak-guessing, randomize on time over the same data,
and compare random streaks with the observed data.
Below, the top sparkline shows the season's win-loss sequence
(the little horizontal line = home games, no line = road games).
Weighting by overall record of wins/losses and home/road effects
yields ten random sparklines. Hard to see the difference between
real and random.

The 10 random sparkline sequences can be regenerated again and
again by, oddly enough, clicking on "Regenerate random seasons."
This is looking a bit like bootstrap calculation. For the real and amazing
bootstrap, applied to data graphics and contour lines, see Persi Diaconis
and Bradley Efron, "Computer Intensive Methods in Statistics."

The test of the 10 randomized sparklines vs. the actual data is an
"Interocular Trauma Test" because the comparison hits the analyst right
between the eyes. This little randomization check-up, which can be repeated
again and again, is seen by the analyst at the very moment of making
inferences based on a statistical graphic of observed data.
(Thanks to Adam Schwartz for his excellent work on randomized sparklines. ET)

-- Edward Tufte


Sparklines: Intense, Simple, Word-Sized Graphics



The most common data display is a noun accompanied by a number.
For example, a medical patient's current level of glucose is reported
in a clinical record as a word and number:
Placed in the relevant context, a single number gains meaning. Thus
the most recent measurement of glucose should be compared with
earlier measurements for the patient. This data-line shows the path
of the last 80 readings of glucose:
Lacking a scale of measurement, this free-floating line is dequantified.
At least we do know the value of the line's right-most data point,
which corresponds to the most recent value of glucose, the number
recorded at far right. Both representations of the most recent reading
are tied together with a color accent:
Some useful context is provided by showing the normal range of
glucose, here as a gray band. Compared to normal limits, readings
above the band horizon are elevated, those below reduced:
For clinical analysis, the task is to detect quickly and assess wayward
deviations from normal limits, shown here by visual deviations outside
the gray band. Multiplying this format brings in additional data from
the medical record; a stack, which can show hundreds of variables and
thousands of measurements, allows fast effective parallel comparisons:
These little data lines, because of their active quality over time, are
named sparklines—small, high-resolution graphics usually embedded
in a full context of words, numbers, images. Sparklines are datawords:
data-intense, design-simple, word-sized graphics.
   Sparklines and sparkline-like graphs can also move within complex
multivariate spaces, as in these 9-step sequential results (reading down
the columns) in merge-sorting 5 different types of input files. Four
variables and 18,000 numbers are depicted in these small multiples.

Below, Robert Sedgewick, Algorithms in C (Reading, Massachusetts, 1998), 353.
























Sparklines have obvious applications for financial and economic data—
by tracking and comparing changes over time, by showing overall trend
along with local detail. Embedded in a data table, this sparkline depicts
an exchange rate (dollar cost of one euro) for every day for one year:

Colors help link the sparkline with the numbers: red = the oldest and
newest rates in the series; blue = yearly low and high for daily exchange
rates. Extending this graphic table is straightforward; here, the price of
the euro versus 3 other currencies for 65 months and for 12 months:

Daily sparkline data can be standardized and scaled in all sorts of ways
depending on the content: by the range of the price, inflation-adjusted
price, percent change, percent change off of a market baseline. Thus
multiple sparklines can describe the same noun, just as multiple columns
of numbers report various measures of performance. These sparklines
reveal the details of the most recent 12 months in the context of a
65-month daily sequence (shown in the fractal-like structure below).

   Consuming a horizontal length of only 14 letterspaces, each sparkline
in the big table above provides a look at the price and the changes in
price for every day for years, and the overall time pattern. This financial
table reports 24 numbers accurate to 5 significant digits; the accompanying
sparklines show about 14,000 numbers readable from 1 to 2 significant digits.
The idea is to be approximately right rather than exactly wrong.
 1
   By showing recent change in relation to many past changes, sparklines
provide a context for nuanced analysis—and, one hopes, better decisions.
Moreover, the year-long daily history reduces recency bias, the persistent
and widespread over-weighting of recent events in making decisions.
Tables sometimes reinforce recency bias by showing only current levels
or recent changes; sparklines improve the attention span of tables.
   Tables of numbers attain maximum densities of only 300 characters per
square inch or 50 characters per square centimeter. In contrast, graphical
displays have far greater resolutions; a cartographer notes "the resolving
power of the eye enables it to differentiate to 0.1 mm where provoked to
do so." 2  Distinctions at 0.1 mm mean 250 per linear inch, which implies
60,000 per square inch or 10,000 per square centimeter, which is plenty.


1  On being "approximately right rather than exactly wrong,"
see John W. Tukey, "The Technical Tools of Statistics,"
American Statistician, 19 (1965), 23-28.

2  D. P. Bickmore, "The Relevance of Cartography," in J. C. Davis
and M. J. McCullagh, eds., Display and Analysis of Spatial Data
(London, 1975), 331.




Here is a conventional financial table comparing various return rates of
10 popular mutual funds: 3
















This is a common display in data analysis: a list of nouns (mutual funds,
for example) along with some numbers (assets, changes) that accompany
the nouns. The analyst's job is to look over the data matrix and then decide
whether or not to go crazy—or at least to make a decision (buy, sell, hold)
about the noun based on the data. But along with the summary clumps
of tabular data, let us also look at the day-to-day path of prices and their
changes for the entire last year. Here is the sparkline table: 4













Astonishing and disconcerting, the finely detailed similarities of these
daily sparkline histories are not all that surprising, after the fact anyway.
Several funds use market index-tracking or other copycat strategies, and
all the funds are driven daily by the same amalgam of external forces
(news, fads, economic policies, panics, bubbles). Of the 10 funds, only
the unfortunately named PIMCO, the sole bond fund in the table, diverges
from the common pattern of the 9 stock funds, as seen by comparing
PIMCO's sparkline with the stacked pile of 9 other sparklines below.










   In newspaper financial tables, down the deep columns of numbers,
sparklines can be added to tables set at 8 lines per inch (as in our example
above). This yields about 160 sparklines per column, or 400,000 additional
daily graphical prices and their changes
per 5-column financial page. Readers
can scan the sparkline tables, making simultaneous multiple comparisons,
searching for nonrandom patterns in the random walks of prices.


3  "Favorite Funds," The New York Times, August 10, 2003, p. 3-1.

4  In our redesigned table, the typeface Gill Sans does quite well
compared to the Helvetica in the original Times table. Smaller than
the Helvetica, the Gill Sans appears sturdier and more readable, in
part because of the increased white space that results from its
smaller x-height and reduced size. The data area (without column
labels) for our sparkline table is only 21% larger than the original's
data area, and yet the sparklines provide an approximate look at
5,000 more numbers.



Finally, the practical construction of sparklines requires thinking
about their design and production:

Aspect ratio   A graphic's width/height ratio makes a big difference in
displaying data. For all types of statistical graphics, the data-shape varies
as the aspect ratio varies. Below, for 6 sparklines all showing the same
data, note the substantial changes in shape as the y-scale increases by 25%
for each line while the x-scale is held constant.

How should a sparkline aspect ratio be chosen? Like a narrow ribbon, sparklines
have one long dimension and one short, as their wordlike shapes constrain their
aspect ratios. This financial sparkline is 5 to 1:

the full baseball season is 20 to 1:

the DNA chromosome sparklines run about 300 to 1.
   In general, statistical graphics should be moderately greater in length
than in height. And, as William Cleveland discovered, for judging slopes
and velocities up and down the hills in time-series, best is an aspect ratio
that yields hill-slopes averaging 45°, over every cycle in the time-series.
Variations in slopes are best detected when the slopes are around 45°,
uphill or downhill. 5 To put this idea informally, aspect ratios should
be such that time-series graphics tend toward a lumpy profile (below left)
rather than a spiky profile (below right) or a flat profile. Both graphs
here show the same data. The aspect ratio for this lumpy graphic is
chosen in accord with the 45° rule.
















The lumpy graphic reveals that sunspot cycles tend to rise rapidly and
decline slowly, a behavior strongest for cycles with high sharp peaks, less
strong for medium peaks, and absent for cycles with small low peaks.
None of this is visible in the graph of spikes! Cleveland's idea is essential
for sparkline displays of high-resolution time-series, such as in acoustics,
medicine, science, engineering, finance. For multiple sparklines, as in the
mutual fund data below, a global aspect ratio is obtained by averaging
over the relevant data-lines to yield an overall lumpy quality.

   These considerations yield practical advice for choosing aspect ratios for
sparklines: use the maximum reasonable vertical space available under the
word-like constraint, then adjust the horizontal stretch of the time-scale
to meet the lumpy criterion. Occasionally the analytical task or character
of the data may suggest a better alternative.

5  William S. Cleveland, Visualizing Data (Summit, New Jersey, 1993), 87-91, 218-227;
William S. Cleveland, The Elements of Graphing Data (Summit, New Jersey, revised
edition, 1994), 66-79.





Unintentional optical clutter   Above left, these binary-outcome sparklines
mainly show accidental arrangements of white space rather than binary
outcomes. Then, above right, a less cluttered version of the same data.
Closely spaced lines produce moiré vibration, usually at its worst when
data-lines (the figure) and spaces (the ground) between data-lines are
approximately equal in size, and also when figure and ground contrast
strongly in color value. The result is hyperactive optical clutter—for
example, below. In contrast, note the serene and cleanly differentiated
lines on this spring's new bamboo culm to the right.

   Changing the relative weight of the data-lines and also muting the
contrast between data and background reduces optical noise, as these
before/after designs of sparklines suggest:

   The standard method for printing color (4-color process) sometimes
produces unintentional noise when printing finely detailed material,
such as type and sparklines. In 4-color printing (cyan, magenta, yellow,
black), tiny dots of color mix together to make the desired color (for
example, cyan dots + yellow dots = apparent green). These color dots do
not align perfectly, and both type and thin lines can become gritty when
printed by conventional 4-color process, shown below.

High-quality maps avoid color dot combinations, as a close look at the
Swiss mountain map will indicate. Sparklines should be printed in a single
color, or by a judicious mix of 2 colors (magenta + yellow = red), or in flat
color (the ink itself is the desired color), or by stochastic color methods.
   Areas surrounding data-lines may generate unintentional optical
clutter. Strong frames produce melodramatic but content-diminishing
visual effects. At left, the dominant visual elements are, of all things,
the strong stripes of the negative spaces between the heavy frames:

A good way to assess a display for unintentional optical clutter is to ask
"Do the prominent visual effects convey relevant content?" In the
exhibits above earning the unfortunate X, the most prominent visual
effect is usually the clutter produced by activated negative space.



Resolution of sparklines   Sparklines work at intense resolutions, at the level
of good typography and cartography. Currently such intensities can be
found only on paper, film, and metal—where resolutions >1,200 dpi
are easily and inexpensively achieved. Today's computer monitors operate
at about 10% of paper's resolution, producing coarse typography in the
smaller point sizes as well as sparklines lacking in fine detail. Of course
sparklines can be displayed on computer screens but for serious work,
sparklines should be printed on paper. Combining paper's resolution
with the computer screen's interactivity is often effective.

Resolution of layouts of multiple sparklines   For monitoring processes that
produce lots of data (financial trading, sporting events, control rooms,
scientific and medical analysis, system administration), sparklines should
be printed and viewed at a density of 500 sparklines on A3 size paper
(about 25 x 45 cm, or 11 x 17 in). This is the data-equivalent of about 15
large computer screens or 300 PowerPoint slides. Unlike relentlessly
sequential screens and slides, 500 sparklines on a large piece of paper are
adjacent in space rather than stacked in time. By showing vast amounts
of data within the eyespan, spatial adjacency assists comparison, search,
pattern-finding, exploration, replication, review.
   Just as sparklines are like words, so then distributions of sparklines on
a page are like sentences and paragraphs. The graphical idea here is make
it wordlike and typographic
—an idea that leads to reasonable answers for
most questions about sparkline arrangements.

Imagine new software or a new computer display that enormously
improved the resolution of data graphics. How wonderful and valuable
that would be. Sparklines provide such improvements by design, by
direct, public, open-source methods.
   Sparklines vastly increase the amount of data within our eyespan and
intensify statistical graphics up to the everyday routine capabilities of
the human eye-brain system for reasoning about visual evidence, seeing
distinctions, and making comparisons. And data graphics are no longer
a special occasion in a separate place with a frame on some slide with a
label "Fig. 17-B". Sparklines are everywhere. With resolutions 5 to 100
times conventional graphics and tables, sparklines can help us learn from
the flood of numbers produced by modern measurement, monitoring,
and surveillance technologies. Providing a straightforward and contextual
look at intense evidence, sparkline graphics give us some chance to be
approximately right rather than exactly wrong.

-- Edward Tufte


Multiple Sparklines and Bars; Implementation Example from Europe

Below you will see our implementation of your sparkline idea into a standard software application for data analysis. We have always been very impressed of your rich examples and ideas for visualization. The example shows data of a pharmaceutical manufacturer. The chart helps in comparing the performance of their sales districts.

After having inhaled your books I set up a list of several dozen improvements we are going to implement. We would appreciate and look forward to any comment or feedback from you.

Sincerely yours,
Nicolas Bissantz

-- Nicolas Bissantz (email)


The red dot should refer to a specific number, as in the glucose example on the opening page of the chapter. The bar chart wastes space; you could show at least 100 numbers in the space that now shows 1 number. People read numbers in tables all the time (see the financial section and sports section of any good newspaper) and they don't need bars to see a bar to understand 1 number.

Background colors, frames and boxes don't add much. Avoid all data frames; the physical location of the numbers, words, and graphics enforces the implicit grid; that grid never needs to be expressed directly. See the euro exchange-rate table in the sparkline chapter; also the material on frames near the end.

-- Edward Tufte


Remarkable illustrations of firefly flights/flashes

Here's an illustration of different firefly flight/flash patterns (I suspect the original is much nicer than the web image):

http://ase.tufts.edu/biology/Firefly/#Flash

A straightened-out presentation of the traces would resemble the highway stripe graphic in Chapter 7 of "Visual Display."

-- Alex Merz (email)


Outlier treatment

I have a request for your "how-to" section. How would you handle a sparkline that has a value well beyond the normal value, since sparklines have an implied boundary?

For example, a "drug X" may sell about one hundred thousand dollars a month for "illness 1" and then the drug may have a new found curative value for "illness 2". "Illness 2" has no other drug, which would then put "drug X" in a dominating position with sales in the millions. How would you handle the above scenario?

I'd also like to see a weather example that uses the gray band for normal ranges and possibly the use of red and blue for temperatures above and below zero.

Sean

-- Sean Gerety (email)


Outliers are a problem in most statistical graphics, especially so in sparklines because of the limits on the y-axis. Taking the logarithm of Y is a good way to plot highly skewed data. Broken scales are sometimes used. Presumably tables will work. It does depend on what sorts of variance are relevant.

Brad Paley and I prepared some weather sparklines, although not with the good idea of cool/warm colors, but those sparklines have not yet made their way into the chapter as it moves toward closure.

-- Edward Tufte


arctan transform?

Plotting arctan(x/x0) instead of x is very effective for stabilizing residual plots with outliers. If the scaling factor x0 is chosen so that non-outlier values of x/x0 fall in the range -0.6 to 0.6 then the arctan is within 10% of the unscaled value (close enough to pass unnoticed in a residual plot), but outliers, no matter how large, remain plottable, but still recognizable as outliers. In practice, even if outliers are present one can still, for example, recognize a systematic trend among the non-outliers.

I have the impression that this approach is very little used, but I read about it around 25 years ago, probably in Technometrics or a similar journal.

-- Athel Cornish-Bowden (email)


Interpretation of transformed variables in regression equations

Some transformations have reasonable interpretations, some don't. In the 2-variable case, log Y on X, Y on log X, and log Y on log X, the resulting slopes have clear substantive interpretations with regard to the XY relationship. Log Y on log X is particularly helpful since the resulting slope is the elasticity of Y in relation to X. Similarly for Y on 1/X, or for log odds Y on log odds X. (More details in my Data Analysis for Politics and Policy, pp. 108-131.)

But for Y on arctan X, what does it mean to a reseacher to say that a unit change in arctan X is associated with a corresponding estimated slope change in Y? Thus optimizing the statistical properties of univariate distributions, usually by transforming them into a normal distribution, may at the same time be denying straightforward substantive interpretations of bivariate or multivariate relationships. Peculiar transforms useful for statistical courtesy seem contrary to nature. That is, there are probably no laws of nature where Y varies in proportion to arctan X (an assertion I may regret).

In the case of sparklines, Y transforms should make sense in terms of the velocities up and down the time-series. Time-scales can also be transformed, for example, to estimate doubling-times (try logs to the base 2 of time).

I was recently looking at some regressions of art auction prices on time; the researcher included 5 powers of time (t, t-squared, t-cubed, t to the fourth, and t to the fifth) in the multiple regression, resulting in the ludicrous situation of figuring out, say, the meaning of a cubic year, a unit change in cubic year, and how that relates to changes in price. Little drawings of square years and cubic years didn't help. And drawings were impossible for the hyperspace time scales. Yes, the researcher was looking for turns in prices over time, but the exercise had by then turned into mindless curve-fitting.

-- Edward Tufte


We've incorporated the idea of sparklines into a new project that we thought might be of interest to readers of this thread. Data visualizations of Google's massive news aggregator seem like an interesting way to graphically keep tabs on developing news stories. We've built an In The News visualizer which provides a visual reference for Google's "In The News" sidebar (seen at news.google.com), providing an archive of popular news items, links to headlines, and a method for comparing news item performance over time. We think this is going to be increasingly interesting as the US election season progresses, and stories about world events erupt and subside. The interface can be refocused on specific names, and groups of items can be compared over time using sparkline graphs. news.stamen.com

-- Eric Rodenbeck (email)


Nonetheless, Mariano Belinsky's example is most impressive -- not necessarily as a way of integrating graphs into text, but as a way of packing a tremendous amount of intelligible information into a small space. Even printed at high resolution on paper there are few examples that get as much information into a small space as he does, but on a computer screen I have rarely seen anything approaching it. By my estimate he has 90000 pixels for the 15 stocks shown on his web site, or 6000 per graph, yet one can easily see what each graph is doing and where any sudden changes occurred. The use of colour is nice, as well, though not entirely logical: red is used for stocks that fall and also for the yearly low, which is fair enough; but the implied logic is not carried over to the stocks that rise and the yearly high, which are blue and green respectively.

I'm not too worried about the lack of a scale for the x axis, because it's not too difficult to mentally break up a year into months. However, it might be possible to use vertical white lines to mark off months, or, if that was too noticeable, quarters. Somewhere, however, either in the text or on the graph itself, there ought to be a clear indication of what the time period is.

I am not at all keen on abbreviations. No, that puts it too weakly: I absolutely detest avoidable abbreviations, especially if they aren't guessable. I can guess what AMZN and MSFT are, and maybe AA, but most of the others suggest nothing at all. With slightly smaller type (and mixed upper- and lower-case) one could use much more obvious labels: "Amazon" takes barely more space than "AMZN", and even though "Microsoft" is appreciably longer than "MSFT" there would be room for it.

In my field (biochemistry) I argue about this all the time with people who try to insist that (for example) "everybody knows" that LADH is liver alcohol dehydrogenase and NADH is reduced nicotinamide adenine dinucleotide. The problem, however, is that not everyone who reads any given text is expert enough to know what "everybody knows".

-- Athel Cornish-Bowden (email)


"Daticons" instead of "sparklines" or "datawords"?

I would like to suggest another possible name: daticons. (I’m pronoucing the ‘i’ as in if—I’ll leave it up to you to decide how the ‘a’ in dat should sound.)

By combining data and icon, the name communicates the idea of packaging information in a small graphic. It avoids the linear bias of sparklines (which makes me think of an entire line of text, not just a single word). It also dodges the possible confusion with Microsoft products that might accompany wordgraphs.

As a bonus, it appears to be a novel word, at least on the web. When I googled daticons, there were only six hits, and they were all in Italian. That leaves you free to define the word without worrying about competing meanings that might confuse your audience.

One possible fly in the ointment: datacons (with an ‘a’ instead of an ‘i’) generates a lot of hits on google, including a company by that name.

-- Hilary Mark Nelson (email)


No way

con has too many meanings, some unfortunate.

-- Edward Tufte


Tonight my friend Philip Greenspun and I discussed sprites after dinner during dessert, 2 homemade hot fudge sundaes, and we don't think sparklines are sprites. Weren't sprites a hardware feature of old graphics cards intended to support moving elements in video games?

-- Edward Tufte


Example of stock sparklines shown...

I just noticed a sparkline in use!

http://finance.yahoo.com/q/cq?d=v1&s=C+AIG+GE+VIAb+PFE

There are sparklines for each of the stocks quoted.

-- Corey Newport (email)


...and critiqued

It's a shame about the black border in the Yahoo example above...

-- Tchad (email)


It is good to see some consequences, the use of sparklines in Yahoo financial presentations.

The little boxes, however, look exactly like the bad designs shown at the end of the chapter on page 18! (Note the red X on page 18.)

Just make the boxes a light blue to indicate that they are clickable (blue signals such elsewhere on the screen). Why should celebrating "interactivity" corrupt and dominate content? Thoughtful design will allow both the content and the linking bureaucracies to express themselves appropriately, which is to maximize content and minimize linking bureaucracies.

-- Edward Tufte


Banking to 45 degree slope in sparklines

The suggestion concerning scaling the representations to have approximately a 45 degree angle of change as a cue to the velocity of change suggests two ideas:

First, that is the point at which the sine function is at its greatest rate of change, providing some small justification for that suggestion; the eye is more able to detect the pattern of change, because the relative amount of change is greatest at that point.

Second, sparklines seem to have characteristics of both one and two dimensional shapes. Although fractals are no longer in vogue, applying those ideas might yield useful techniques. Thus, choosing a fractional dimension too small, that is, too close to 1, might result in an display similar to the poor baseball W/L sparkline, while a dimension too large could result in the poor sunspot example. This might help the representation of outliers as well.

-- Joe Gawron (email)


Sparklines in text

I thought I would also post a use of actual sparklines. I found them useful in presenting data from cognitive modeling exercises. The following is an example of how I used several sparklines to describe working memory usage against capacity for an Air Traffic Manager implementing an air traffic restriction known as Miles-in-Trial (MIT). This initiative increases the minimum separation between aircraft.

-- Estes


Sparklines as a Windows TrueType Font

Dear Prof. Tufte,

we implemented both Barsparks and dichotomous Sparks as a Windows TrueType Font (TTF). Typing 61023647679 gives you Sparkfont: Bars, and +/++-+++-++++//+ produces Sparkfont: Dichotomous. A TTF can be created easily, e. g. using graphical software like CorelDraw, and it can be printed even in very small sizes.

Our font uses eleven characters ("." and the numbers 0 - 9) which differentiates in about .5 mm steps when using a 12 pt font size. For dichotomous Sparks we use "+" for upward whiskers (wins, in the baseball example), "-" for downward whiskers (losses) and "/" for ties.

Download the font from http://www.bissantz.de/sparklines

characterrepresents ... of the corresponding value
990 ... 100 %
880 ... < 90 %
770 ... < 80 %
660 ... < 70 %
550 ... < 60 %
440 ... < 50 %
330 ... < 40 %
220 ... < 30 %
110 ... < 20 %
0>0 ... < 10 %
. and ,0/no value

Preview: Screenshot of Bissantz Sparkfont in MS Word
The above text in a Word document using our Sparkfont

Kind regards - Nicolas Bissantz

-- Nicolas Bissantz (email)


Nicolas, Great idea. One thing, to expand on Niels' comment, is that the bar spark currently only allows for positive values. However, there are many instances where negative values are required and sometimes a mixture of positive and negative. In effect then, this would require three sets - all positive, all negative and a mixture. Is this relatively easy to do? I would disagree a little with Niels though, in that as this font is designed to be used just within text as one is writing, having accuracy to four significant digits would seem unnecessary, as this isn't what is designed to be shown with a bar spark.

-- Will Oswald (email)


Sacrifice a significant digit and make the first one + or -: ctrl-+001, ctrl-+002, etc and ctrl--001, ctrl--002.... To use the full ascender and descender height of the line you would have to set the horizontal axis at something above the normal writing plane, sort of your x-height for the font. If the eye can only extract two significant digits, then use use another ctrl character on format. Use b for bar, p for point: ctrl-b+01, ctrl-b+02; ctrl-p-01, ctrl-p-02....

-- Niels Olson (email)


2004 Baltimore Orioles Run Differential Sparkline

Here's my shot at David Rosen's suggestion. Below is a run differential sparkline for the Baltimore Orioles 2004 season (data courtesy of ESPN.com).

Same conventions apply, but instead of adding the thin line along the middle to indicate home games, I added a gray shaded area that signifies winning/losing within 5 runs (an arbitrary number), and homestands. The little star indicates the All-Star Break, which for the Orioles occurred after 85 games.

Suggestions/critiques welcome. —tec

(Note: The image is zoomed in at 400% to compensate for the low resolution of computer screens... which should come as no surprise to loyal readers of this forum!)

-- Thomas E. Cason (email)


MS Office add-in to create sparklines from Windows TrueType Fonts (TTF)

Following our previous posting about our first prototype of a TrueType Font which can be used to enter bar-style Sparklines in e. g. Word documents, we received quite some positive feedback (thanks everyone!) and decided to carry on this idea.

Firstly, we refined the original font and created 100 characters so we can now differentiate positive values in steps of 1 %. Note that the difference is hard to tell on the screen, but printouts are razor-sharp.

Secondly, we made up four additional fonts which have their zero line not on the bottom, but somewhere in the middle or on top of the characters. This allows for positive and negative values. Multiple fonts are needed to reflect different ratios between the largest positive and the largest negative number. This way we can make sparks like with all negative values, sparks with high negative and relatively low positive values , sparks whose (absolute) negative and positive values are similar and sparks with small negative and big positive values .

Thirdly, we included the dichotomous sparks for indicating wins, losses and ties, for example in soccer, tennis or baseballs matches.

And finally, we tried to construct lines from specifically crafted characters that represent line segments. From the data set we want to visualize, we derive a grid of, say, 20 groups. Each data point in the set is assigned to one of the 20 groups, and each group is graphically represented as a dot. It is then possible to draw all the connections between any two points. These line segments can be combined and result in a line-style Sparkline, with or without the points.

Since we now employ several hundred characters from our "Sparkfonts", we programmed "SparkMaker", a small add-in for Microsoft Office products. This tool is used to enter the data. It will calculate which fonts and which characters have to be used to get the matching Sparkline, and it will insert the ready-formatted Sparkline into your Word, Excel or PowerPoint document.

To evaluate, you can download the SparkMaker tool and the fonts from our web site:
http://www.bissantz.de/sparklines


Screenshot of SparkMaker in MS Word 2003

Kind regards - Nicolas Bissantz

-- Nicolas Bissantz (email)


Sparklines in Formula 1 racing

This is very nice. I can't remember how I wound up reaching it, but I'm glad I did! Thanks, and I'm looking forward to the new book.

It gave me the idea to try something I wanted to see. In Formula 1 racing it is always said that your biggest rival is your teammate (because he's the only one with the same car). Sometimes they show stats in tables so that you can see teammates compared, but I don't remember seeing a graph. So I tried to come up with something to see what could be seen. My first try is the following. This shows the results for four pairs of teammates in the 1996 season:

The drivers' names are on the left. The gray bars are drawn to the side of the driver that qualified ahead of his teammate and they are all proportional to the difference in time using the same scale. I think I was lucky in that, because probably there are times when the result would be way out of proportion, and I don't know what to do to handle that. Maybe just adjust everything to a maximum like 1 or 2 seconds?

The vertical lines on each side show when the driver finished and was officially classified; the longer the line, the higher they finished. If there is no line then the driver did not finish. Since teammates often finish very close to each other it was necessary to add color (green) to the line for the highest-finishing driver; otherwise it might not be easy to tell who finished ahead of whom. I sort of like having the color only when both finished, for some reason.

To show points scored in each race, I added horizontal red bars at the end of each line. The width is proportional to the number of points scored. When you get a win, the bar is the full width of the race in the graph, so win streaks show up as solid bars (see Hill at the start of the season). The end of the graph shows the season total of points for each driver.

So, these little graphs give

  • Who qualified ahead and by relatively how much in each race.
  • Finishes and non-finishes in each race.
  • Who finished ahead in each race, if both finished.
  • Generally how many points earned in each race.
  • Roughly how high up the driver(s) finished in each race.
  • Wins and win streaks.
  • Total season points.

I was originally thinking about setting up a whole career in a line. I do like the results so far, and I wonder if there are ways to improve them. If I can get more data (I only have one old Autocourse book for 1996) then I could show a whole career across one screen. I was thinking that the driver in question would be on top, and a colored line down the center of the x axis could match up with a key to his teammates. Each color would show a different teammate (and maybe team) for a certain time period.

-- Christopher B Hamlin (email)


Sparkline vs. Bar Chart

An interesting comparison of a sparkline and a traditional bar chart at

http://intepid.com/2004-12-06/23.32/

-- Edward Tufte


SparkTicker: an interactive ticker with sparklines for business data

Reflecting on how to increase information density on computer screens, we've been investigating the combination of a moving ticker with sparklines. In our implementation, data can come from Excel, OLAP cubes, relational databases or realtime from web sources. The example shows Dow Jones quotes from 2005-02-16 to 2005-04-15.

SparkTicker
SparkTicker

In the desktop version, we have made the ticker interactive, allowing users to access more detailed data through semantic zooming. Three zoom sizes award more screen real estate with more information (iMail = incoming emails).

Sparklines in three zoomsizes

A magnifying glass eases micro reading whenever necessary. Values are abbreviated following a set of rules which eliminate superfluous details.

Magnifying glass for sparklines

For business data we have introduced new sparkline types: The magnitude of deviations is shown as colored boxes on top or below the bars Deviation Spark. Gaps differentiate this type from stacked bars. In this other example Share Spark, shares are represented by partially filled bars, whose overall height show the referred totals. Double bars show comparisons, e. g. to previous year's values Comparison Spark.

Sparkline on a cell phoneDue to differing communication standards, another challenging issue for sparklines are cell phones. In order to get some feedback, we send current results of German premier league soccer every Sunday to the phones of a few dozen sports fanatics.

If somebody wants to test the Sparkticker or the cell phone sparklines, please give us a note or refer to http://www.bissantz.de/sparklines.

-- Nicolas Bissantz (email)


Javascript sparkline generator

I've generated a javascript library for generating sparklines using SVG, a open vector format supported by the W3C. See Javascript SVG Sparklines

-- Jesse Andrews (email)


Sparkline-like city horizons

The remarkable Jason Kottke has pointed out this sweet sparkline-like image by Jeff Gray:

http://www.flickr.com/photos/jeffgray/15536148/

-- Edward Tufte


The author of the short animation can be found at http://www.hellofranck.com/

There is little information about the author but he (or she) is either danish or norwegian

-- Andrew Nicholls (email)


Sparklines for financial data

Here is my interpretation of sparklines in a product I am working on -

I finally settled on vertical bars as the indicator of highs and lows because it is difficult to get a dot to stand out at normal screen resolutions and if you make the dots too big they drown out the sparkline. It also highlights stocks that have multiple highs and lows (eg ARG and RIO) By placing the open and close prices aligned with the ends of the sparkline eliminated the need for other coloured dots and also gets around the problem of what happens when the high/low is also the open/close.

The data are Australian Stock Exchange stocks for the last twelve months.

-- Andrew Nicholls (email)


Sparklines continue to gain notoriety. See the recent article at xml.com. The link to the technorati site is interesting as well.

-- Simon Shutter (email)


TiddlyWiki sparklines

TiddlyWiki in it's latest version has a sparklines functionality: http://www.tiddlywiki.com/#Sparklines . What is TiddlyWiki ? "an experimental MicroContent WikiWikiWeb built by JeremyRuston. It's written in HTML, CSS and JavaScript to run on any modern browser without needing any ServerSide logic. It allows anyone to create personal SelfContained hypertext documents that can be posted to any web server, sent by email or kept on a USB thumb drive to make a WikiOnAStick."

-- Christian Hauck (email)


Importance flags in sparklines

In the opening example to the sparkline chapter, a gray band is used to signal normal limits; thus when the sparkline peaks above or below the horizon of the gray band the glucose is critically elevated or critically reduced. Yet the sparkline remains clearly visible within the gray field.

This technique can be generalized in terms of "importance flags". Thus when something interesting happens in part of a sparkline, the area of interest can be indicated by a yellow or red field or by a change in the color of the sparkline. Similarly, normal or routine readings can be indicated by a light green field over the sparkline or by making the sparkline segment itself green.

In using importance flags, the color coding should be modest, just strong enough to send the editorial or interpretative signal without masking or detracting from the usual reading of unflagged sparklines. The idea is that the sparkline should sit optically on top of the importance flags, or at least be clearly or even decisively visible through the flagging. We don't want to turn sparklines into vulgar stoplight charts (with their vivid red-yellow-green attitude).

The design theory for making signal flags is found in Envisioning Information, chapter 3 on layering and separation, and in Visual Explanations, chapter 4 on the smallest effective difference.

Implementations anyone?

-- Edward Tufte


Combining sparklines with quartile plots

First or all, thanks to Tchad for the suggestion on where to post the images. I wanted to get some feedback on an idea for combining the ideas of a quartile plot (distribution in the same chart across multiple instruments) with sparklines. In financial markets, for example, the yield curve is observed as the maturity on the x-axis versus the interest rate on the y-axis. A quartile plot will show some information but frequently, one needs to be able also to put the information in an historical context.

The most obvious way in which to do this is by instead replacing the quartile plot with a sparkline. This preserves the relative interest rate at each maturity point while also giving more historical context. This can be shown either with or without the min max, as in the two examples below.

Anyone have any comments and any suggestions for improvements (and apologies for the poor resolution of the images)? As always, this has been done in Excel and is easy to implement.

-- Will Oswald (email)


The aspect ratio of these displays should be adjusted so that the absolute average of the slopes up and down is 45 degrees. That is the time-series should look lumpy, rather than spiky. See the material on aspect ratios near the end of the chapter posted above.

-- Edward Tufte


Thoughts on bivariate time-series: We often plot parallel time series (in Will's case above do we have essentially 5 pairs?), with time on the x-axis and response on the y-axis. Why not plot, as Will mentioned earlier, interest rate against yield for all the time points? Then the interest-rate/yield relationship can be shown to shift as a function of time. One of ET's books (I forget which one --- my copies have yet to be unpacked after the move) shows a number of plots of, I think, inflation and unemployment rate and how that relationship changes over time.

For Will's data, I envision 5 small multiples that show paths through the rate-by-yield space over time. The current point can be highlighted, the minima and maxima can be shown and annotated on the axes, and temporal proximity to the present can be shown via shading (more recent data are more pronounced, older data are faded). "Same time last year" and "last month" or whenever, can be shown by a special symbol, perhaps an "M" for month or a "1" or "2" or whatever for 1 year ago and 2 years ago and so on.

If time IS the fundamental causal variable, then I'm not sure the dashed lines connecting the starting and ending points really add anything, except that the start points are growing faster (left to right) than are the endpoints, as shown by the diverging lines, although I'm not sure that comparison is of any value. I guess I like the min and max values but not the connecting lines.

Although my training is in time series, I always find the traditional time series plots academically unfulfilling, since, following the "the data display is the model" idea, they imply that the only thing driving the variability is time. They seem more like reports of what has happened than tools for understanding the sources of variability in the data. I find it more enlightening to plot y against x and let time snake the path around the x,y plane.

Let us all be cautious that the sparkline concept ("intense, simple, word-like graphics") doesn't get morphed into just "tiny time series plots". It seems to me that the goal, with all our displays, ought to be getting as much data in front of the viewers' eyes as is feasible and to facilitate the comparison(s) of interest. Whether the plot is a time series or empirical cumulative distribution function or scatter-plot or whatever, taking advantage of high-resolution display media and small pictures right in the text is in the best interest of large rates of information transfer. Galileo's drawings of the shape of Saturn are certainly not time series.

Perhaps this is an open call for more "intense, simple, word-like graphics" that are NOT time series. <sound of the gauntlet dropping>

-- Rafe Donahue (email)


Is this an improvement? The data being shown is South African interest rates, which have had periods where they have exhibited very significant spikes.

The problem with determining the average slope is that, in many instances, the data does not change significantly from one day to the next but there are occasional spikes, so the average slope can still be 45 degrees.

-- Will Oswald (email)


In the context of interest rate markets, the connect-the-dot lines are very important, as this determines the interest rate one earns for investing for different periods of time. For example, investing over a 3Y period earns 7.55% per year but investing for 5Y earns 7.88%. The underlying tenor (1 to 5Y) does not vary but the amount being earned on each and the relationship between them does change. One of the most frequent questions asked within financial markets is how has each individual rate changed over time and how has the relationship between these rates changed over time. This is frequently plotted as a bivariate relationship, showing the yield on what instrument versus the yield differential between that instrument and another point on the curve. However, this makes it virtually impossible to discriminate sufficiently both between many points of the curve and also variability through time. Small multiples could be used but this would need to be more than 5 small multiples (showing every combination would generate 10 charts). This also would miss valuable information contained in the current overall yield curve shape, which must be plotted as tenor versus interest rate.

My overall intention though was to extend on the usual quartile plot (min, 25%, median, 75%, max) across multiple instruments which actually contains relatively little information (not withstanding the cleaner version on page 125 of VDQI), while also giving information about the current yield curve shape. A potential addition could also be to highlight a particular intermediate yield curve shape, as chosen by the user, in order to illustrate how the curve shape has changed.

-- Will Oswald (email)


Will,

Regarding the aspect ratio and average slope issues: it seems to me that the problem is that you have two trends that compete in trying to bank the data to 45 degrees. There is a low frequency baseline and there are higher frequency movements on top of that. This is similar to the monthly CO2 measurements from the Mauna Loa observatory discussed in William Cleveland's Visualizing Data. ET seems to want the high frequency component banked to 45 while the plot that I see seems to emphasize the baseline trend (roughly).

To offset this effect, you might try to fit the data to a linear baseline, subtract that, then bank the data, and, finally, add the baseline back in. The more sophisticated solution, given again by Cleveland, is to fit the data with lowess, smoothing over a large number of data points (alpha ~ 1, lambda=1); subtract this trend, bank the data, and add the smooth trend back in (or plot the baseline and high frequency separately, but I don't think this will work for your application).

Whether to bank the baseline trend or the high frequency ``spikes'' is a matter of judgement. As always the proper visualization technique is very contextual to the data and cognitive task at hand. So, I thnk ET's advice "lumpy not spiky" is a bit glib. For the sunspot data, yes. But the Mauna Loa CO2 data teaches another lesson -- different trends in the data can compete for the optimal aspect ratio leaving both suboptimal.

So I will end my answer where I probably should have started it, with a question. Which component of the data do you want to emphasize, the high frequency component, the baseline trend, or both? To emphasize the baseline, fit the data to a smooth trend, bank that, and add the high frequency component back. To emphasize the high frequency component, bank it, not the baseline, after smoothing, and again merge the results. Finally, to emphasize both, bank each and plot them separately. IMHO.

-- Sean Garrett-Roe (email)


Try the aspect-ratio fix.

For sparklines, the idea is to maintain the wordlike quality: the resolution of words, and the ability to fit into sentences as wordlike elements, into tables as table entries, into spreadsheets as cell entries.

-- Edward Tufte


Sparkline-like graphics for NASA Ozone Hole Watch

We're almost ready to publish a new NASA site detailing the progress of the Antarctic Ozone Hole:

ozonewatch.gsfc.nasa.gov

Sparklines (well, sparkline inspired-graphs, they're larger than words) show year-to- date maximum size, minimum ozone values, and temperature; in context with (smoothed) historical minimums and maximums. Red dots (maximum signal flags) indicate maximum ozone loss (largest area or lowest total ozone) for the year. Mini bar graphs show the changes since satellite measurements began in 1979. Small multiples make an appearance with globes depicting ozone over the past week (unfortunately the scientists involved were unwilling to change the color scale).

The data is processed in IDL, rendered at high resolution (10 times screen size) and resampled to remove aliasing.

-- Robert Simmon (email)


Web sparkline generator

I've been experimenting with generating sparklines for the web, and have a client-side solution (images are completely generated in the web browser rather than the server) in proof-of-concept stage. See it at my blog

Here's an example of an image it generates. This is encoded as a data: URL, so it won't appear if you're using Internet Explorer.

I would be interested some guidance: should I antialias the sparkline, or leave it jaggy? The one above is antialiased, which blurs the data a bit. But at this size, the antialias blur seems no worse than the pixelization artifacts that antialising obscures...

-- David Flanagan (email)


Fractal/sparkline analogy?

Sparklines resemble fractals, in the sense that the form and visual texture of sparklines remain the same as the resolution scale changes. This is seen in the zoom-sketch of the data (63 months, 12 months) for euro exchange rates in the second table and, particularly, in the illustration about half-way down page 8 in the essay at the top of the thread.

The resolution of time-fractals of sparklines can exist in the data-base underlying the sparkline, as viewers zoom through years, months, days, hours, minutes, seconds, and so on. For data analysis, contextual zooms are preferred, as shown in the zoom on page 8. Contextual zooms enforce the micro-macro comparisons resulting from sparkline scale changes, and avoid the where-am-I-now effect of uncontextual zooms that erase the the previous scale version of the sparkline, as too often seen in scale changes when moving in and out of aerial photographs. In this scale shift, note the change in aspect ratio, a matter worth thinking about since the aspect ratio should be data-driven to some extent:

Contextual zooming might be reported as in the big euro conversion table on page 8: a sequence of sparkline table entries at various time-scales.

I hope a Kindly Contributor with a high-resolution database (years, months, week, days, hours, seconds . . .) can construct a good example moving through many orders of magnitude, perhaps following the architecture of the page 8 sketch. There is something of a Powers-of-Ten metaphor here as well, although the fractal metaphor still holds as each new image in the sequence remains a sparkline. This requires a big database underlying the time-series as required by the changing resolutions.

Perhaps the fractal metaphor can mobilize some of the many elegant computer programs for displaying fractals, but now using great piles of empirical data rather than geometric modeling as the basis for depicting and driving images based on scale changes. Such evidence-based fractals would greatly extend the power of sparklines.

Regardless of the metaphor, contextual scale zooms are exactly what sparklines are good at: displaying intense amounts of data, now in-depth, not just as one fixed time-scale sitting there in still flatland. Of course, some dynamics can be added to each sparkline at each resolution as new data flows in, possibily in real-time.

-- Edward Tufte


Are sparklines nouns, verbs, equations?

John Morse (this forum, July 7, 2004), wrote his concerns about placing sparklines in text. Indeed, this seems to be something worthwhile ponder (e.g., is a sparkline a noun or a verb?).

It seems odd to me that sparklines have not yet been compared to equations in this forum. Equations have a very high information density, and they occur both within text and as separate, often numbered, items. Once this connection is made, the grammar for sparklines becomes a bit more clear.

For example, I might talk about a how increasing a factor increases a metric of the system I am studying, *sparkline showing increase*, which is contrasted with the reduction of that factor, *sparkline showing decrease*. If the sparklines show timeseries, I will immediately see if the response of the system is liner, exponential, or step-like. Clearly, if the response were governed by different equations, I could equally well put the equations in place of the sparklines.

Sparklines could also be placed within the text as numbered equations are. This way, they could also be referred to later in the text as numbers. This would create an intermediate object between sparklines placed in the text, and a separate table or figure.

-- Rob Hetland (email)


SAS macro for sparklines

Hello to Professor Tufte and All, I have been following Professor Tufte's work since he first came to my attention about a year ago. I really like the simplicity and power of sparklines. Since I am a statistician, I use SAS in my daily work. So, I thought it would be useful to find a way to make sparklines in SAS from a SAS data set since there are many other statisticians out there using SAS. The more formats that the creation of sparklines are offered in, the more accepted they will become.

I have put together a SAS macro for PC SAS that allows the user to create sparklines by using a SAS data set with the data points arranged in one of the columns. The macro allows the user to select the trend or bar type of sparkline. Although I have been programming in SAS for over 8 years, I am not an expert in SAS/GRAPH, so any recommendations for improvements to the macro would be appreciated. Currently the user is restricted to 11 characters for the descriptive word that appears to the right of the sparkline. The output appears in the SAS graph output Window. My recommendation is to right-click on the output, choose File>Export As Image... and save the output as an image. I have been having good luck with PNG files. You will notice that the font appears rather large, as does the red dot representing the current value, but this is necessary so that when the file is reduced and put into a document, it looks right. Unfortunately there is one additional manual step: you need to open the PNG (or other picture format) file and cut out just the narrow sparkline portion to insert in a document.

Examples and the SAS code can be found at http://home.mchsi.com/~marchendel/sparklines.html.

-- Marc Hendel (email)


Biblical Sparklines

The next version of the Logos Bible Software app uses sparklines to show the relative density of a root word across the biblical books. Students of the Bible are interested in which biblical authors use which words with what frequency; displaying this information via sparklines makes it digestable at a glance.

We've also made it possible to interact with the graph by hovering the mouse pointer or clicking, which keeps the graph very clean and simple.

I just posted details about the Lemma Density Graph to the Logos Blog.

-- Daniel Foster (email)


This is very good.

Might the bars be slightly thinner to pick up more data? Can this method be generalized to other concordances and to dictionaries?

-- Edward Tufte


Thanks! I was delighted to receive a personal response. To continue the conversation a little, this is the response of Eli Evans, one of our "Information Architects" who helped design the Lemma Density Graph...

He asks if the bars could be thinner. They could, but it's a usability issue. When I was doing the mockup for this I found that if the bars got much thinner than they are right now, there was a real difficulty in getting the mouse pointer over the bar you wanted. In my experience, people aren't accurate with a mouse to within more than about 4 pixels. Besides, that's just about how fat the little finger is on the end of the hyperlink hand pointer! BTW, yes, this display can be adapted to just about any corpus.

When working with the graph I would have to agree that the thickness of the bars is about the practical minimum. The user has to be able to pause the pointer over the desired bar for the tooltip pop-up to appear.

One nice touch that didn't get demonstrated in the previous screenshot is a yellow highlight that follows the mouse pointer and helps indicate which bar it's over.

-- Daniel Foster (email)


Use a broader yellow cursor-location-indicator show up centered over a narrower whisker of data. Or use a triangle pointer to the narrowed whisker. Or have the whisker light up when it is cursored over. Or use a lens cursor. Or 10 other possibilities. Also you are giving up resolution for interaction, often a poor tradeoff showing statistical graphics on the computer. The resolution of computer screens for sparklines is already compromised compared to paper, so don't give into mouse factors usability, but instead design your way out of the problem.

For lots of practical examples along with the theory, see chapters 2 and 3 of Envisioning Information.

Designers tend to reduce content resolution, particularly the resolution of statistical graphics. For evidence and the reasons why, see chapters 3 and 5 of The Visual Display of Quantitative Information.

Those who care about content should insist on high-resolution design solutions. The attitude of the content people toward design should be "Don't tell me why you can't do something; instead figure out a design solution that is worthy of the content and the analytical issues in reasoning about the content."

-- Edward Tufte


Daniel,

regarding ET's advise to ". . . just have a broader yellow cursor-location-indicator show up centered over a narrower whisker of data . . . ." See the Flickr Organizr for an example of graphic web content made larger on mouse-over.

-- Niels Olson (email)


Sparklines in text: cozy example

little vignette concerning the distribution of student ages in the piano class is here.

-- rafe donahue (email)


EEGs from the Hive Mind - Google Zeitgeist 2005

http://www.google.com/press/zeitgeist2005/worldaffairs.html

Nice abstract of the vast database they must have built up to track what folk are interested in. Small multiple graphs, quite good design, showing daily(?) search frequencies for specific terms over the calendar year ("Tsunami" goes back to December 2004).

Weekly cycle is clearly visible, plus super-spikes e.g. "London" on 7 July and again on the 21st - the days of the bombings. Unfortunately y axis not labelled but some graphs show multiple series allowing comparison e.g. the public's volatile preferences for Britney, Shakira and Mariah.

Also interesting to compare shapes e.g. natural disasters seem to have a sharp attack and a long decay but celebrities have narrow symmetrical spikes.

-- Brian Davies (email)


Excellent sparkline-like graphics from Robert Sedgewick, Algorithms in C (1998)

Sparklines and sparkline-like graphs can also move within complex multivariate spaces, as in these 9-step sequential results (reading down the columns) in merge-sorting 5 different types of input files. Four variables and 18,000 numbers are depicted in these small multiples.

Here are the results of 7 sequential passes to sort a 200 element file in bottom-up merge sort:

These merge-sort images above are a bit large in order to accommodate the resolution of a computer screen. But this material can achieve sparkline-resolutions when printed out on paper.

-- Edward Tufte


Red/green distinctions in data displays

It was Nick Van Valkenburgh who referred to red-green colour blindness (on 6th March 2005). This is almost an insoluble problem once one decides to use colour at all, because people who can see red without difficulty tend to find it an excellent colour for having anything stand out from the rest, and such people are not only the large majority (much more than 90% I suspect: see below) but they also find it hard to imagine the difficulties that those in the minority have. One thing to remember is that in many contexts grey-scales work much better than colour-coding anyway, as our brains have built-in ways of ranking shades of grey that they don't have for different colours. (ET discusses this in one of his books: I forget which one, but it's at home, so I can't check.) Unfortunately I doubt if shades of grey are sufficient to make distinctions in anything as small as a sparkline, but one can experiment.

The figure of 10% of males (not of people, for which the proportion is very unlikely to be more than 5%) is often quoted, but I believe it is misleading. There are many people (myself, for example) who would fail a test of red-green discrimination if they were applying for training to be fighter pilots, but that is a very stringent criterion and excludes a lot of people who by no means regard themselves as colour-blind for everyday activities, and who have no difficulty in seeing a red dot among a group of black ones. In any case, even if red-green colour blindness is the commonest form it is not the only one, and making things better for the red-green colour-blind may make them worse for others.

As an anecdotal piece of evidence, about 25 years ago I was at a meeting where one participant, fully red-green colour-blind himself, complained at the use of red in early computer graphics for making things stand out. He asserted that about 10% of males were colour-blind, but although there were around 60 people present (mostly male) he was the only one who had any problems.

Note that I am not saying that the problems are not real, or that we should make no effort to prevent them from arising, only that I believe that in practice they affect a lot fewer than 10% of people. Even if they only affect 1% of people we should take them seriously. As the user of a minority operating system (Macintosh), and user of a browser (iCab) that is used by a small minority of that minority, I am quite familiar with web sites that announce that they do not "support" the browser that I choose to use. No matter how small the minority affected adversely by a design decision we should always do our best to cater for it.

-- Athel Cornish-Bowden (email)


Red/green and other special interests

I liked ET's answer to the colorblindness issue at the end of the Skeptics Society lecture (and I seem to recall this from the one-day course): yielding design to one special interest group opens the designer to demands from every special interest group, of which he estimated there are about 20. Better to design well.

Personally, I'm left-handed. Driving, cameras, guns (I'm in the military, this is a serious problem), sissors, "ergonomic" mice, dining with someone else next to me (elbows), assymetrically bevelled knives (mainly found in kitchens), rulers, watches, hemostats (and I'm in medical school: watch out!), and many other medical instruments, but most of all, writing.

I'd like the English-speaking world to redesign the language to be read bottom-to-top, right-to-left, because sometimes my pinkie and the side of my palm pick up so much ink while writing that some of the letters, sometimes whole words become illegible (like when I'm taking notes in a one-day course with 300 other people). This happens more when it's warm (like in a full lecture hall) because of perspiration and the ink staying either soft or wet a bit longer, and I'm quite sure about ten percent of people are lefties (estimates range between 2 to 30 percent for either lefty or ambidexterous). So, alternatively, could we just move the planet a bit further from the sun? Or at least reverse global warming?

-- Niels Olson (email)


Excellent research on data displays, including sparklines

Arrays of sparklines allow simultaneous multiple comparisons and clustering of sparklines (and their accompanying nouns) into groups, as in the mutual fund example in my essay. Here is a way to do such analysis more systematically,

http://www.cs.ucr.edu/~eamonn/SIGKDD_2004_vistree.pdf

a paper by Jessica Lin, Eamonn J. Keogh, Stefano Lonardi, "Visualizing and discovering non- trivial patterns in large time series databases," Information Visualization 4(2): 61-82 (2005)

-- Edward Tufte


ET brief history of sparklines

I gave a talk at Google last December and emphasized sparklines by giving out a 4- page technical report on sparklines at the beginning of the talk and then asking everyone to read it. After that, I worked my way through the report. My goal was to alert them to the idea of sparklines and then that they would envision all the wonderful possibilities (especially given their excellent sense of analytical design). I gave somewhat similar talks at Genentech and JPL on that trip.

Yahoo uses sparklines for some financial data. The Google financial graphics are competent but utterly conventional. (Maybe someone can post a sample page and also post a redesign combining tables and sparklines, thereby breaking free of standalone graphics). A model for that might be the exchange-rate example in the draft chapter posted at the beginning of this thread.

One problem is that, at leading edge of really high-resolution sparklines, we need paper's resolution. Computer screens are OK but they don't operate at the intense resolutions needed by sparklines at their best. Computer displays operate at about 10%-15% of the resolution of paper, a performance level that doesn't matter that much for routine analysis but does matter for serious, high-resolution visual data analysis.

I had hoped that the New York Times in their revisions of the mutual fund and stock market tables would take advantage of paper's resolution and build in the daily sparkline histories for a year of each of the 800 or so mutual funds on a single page of newspaper. (I sent an early draft of the sparklines material to the paper's design director a couple of years ago.) The idea is to exploit paper's comparative advantage, high resolution, over the computer screen. That might be one way for newspapers to survive, for a while, internet news. On a Times mutual-fund tables page, for example, sparklines would put 400,000 additional prices and changes in prices on each printed page of the market table, and make those tables just sparkle. Readers would soon discover that there are not 800 different funds on that page but probably only about 25 or 43 or something like that, since many funds share roughly identical day-to-day price shifts for a full year--as we saw in the top 10 mutual funds example in the Beautiful Evidence chapter draft on sparklines presented at the beginning of the thread. Mutual fund comparisons are more complicated than that, but the daily year-long comparative price paths are a good start.

My first sparkline sketches were made some 15 years ago when I reviewed an HP medical interface for monitoring hospital patients (which involved, I recall, a Unix box for every ICU patient, or maybe a Unix box on a cart wheeled around the hospital). The idea was to put sparklines on the margin of a big spreadsheet recording all patient data (event by time), thereby summarizing the time-series history of each event category. My conclusion was that the medical staff would rarely look at the original spreadsheet and would instead just look down the column of sparklines showing the events time-series. And then the original medical event spreadsheet could then be down-screen if a user wanted details.

-- Edward Tufte


Web monitoring with sparklines

A neat little example of sparklines at this blog:

http://since1968.com/article/130/sparks-updated-to-show-stats

-- Edward Tufte


Sub-pixel resolution for sparklines?

David Flanagan asks above whether it's best to use anti-aliasing or not, when implementing a sparkline for display on monitors, and Professor Tufte frequently points out that monitors have poor resolution compared to printers.

This prompts me to ask, has anyone implemented sparklines for display on monitors that use so-called sub-pixel resolution techniques? This is the practice of improving the appearance of fine lines or edges by taking advantage of the fact that a colour "pixel" on a monitor is really three physically-separated elements, each a different colour. Microsoft has used this technology in its ClearType fonts, but I haven't heard of it being used for graphical display purposes.

-- Derek Cotter (email)


Sparkline-like historic beauties

Here are a variety of sparkline-like drawings, some of them leftovers from my Beautiful Evidence files (that didn't make it into the published book).



(From Sotheby's, Livres et Manuscrits, Paris, 30 May 2006), 86-88.

Below, a double-page spread dropped from a nearly final draft of Beautiful Evidence:

-- Edward Tufte


Sparkline-like elements from a 13th-century bible manuscript

Decorative tendrils running around this page from a 13th-century manuscript bible hint of sparklines.

From Sotheby's London, Western Manuscripts and Miniatures, 6 July 2006, 33.

-- Edward Tufte


Sparkline in InDesign

For those who use InDesign, once installed on a Mac, the SparkFonts from Bissantz appear in InDesign's font menu and individual characters can be selected via the Glyph window. It may not as easy to use as Bissantz's Word tool, but it will work for occasional use until someone creates a Sparkline tool specifically for InDesign.

--Mike Perry, Inkling Books, Seattle

-- Mike Perry (email)


New York Times sports sparkline

The New York Times sports section on June 23, 2006 displayed a sparkline-like graph showing the outcomes of the last 218 basketball games of the New York Knicks. As our scale of measurement shows, the graph is 12 in (30 cm); a real sparkline would be a little over 2 in (5 cm).

The graph is nicely integrated with surrounding text, numbers, and images. The whiskers showing wins are too light compared to the whiskers showing losses. The win-whisker blue-tint is also used as a background tint immediately above, an unnecessary congruence. Wins might be shown in red not pale blue. The instructions for reading the sparkline "Below, each tick mark represents a victory or loss..." are not needed especially since the two rows of ticks are labelled "victories" and "losses". (Why not "wins" rather the "victories"? Perhaps because "wins" is both a verb and a noun.) Those labels are not needed; every reader of the sports page will know what the whiskers mean. After all the reader is expected to understand these fancy words in the reports accompanying the graph:    sycophantic         perpetuity         passive-aggressive         tenure         enigma         pariah         dysfunctional

Both the column and the news story psychologize about the personalities of those in the team bureaucracy rather than the performances of basketball players and their competition, both of which might have something to do with the team performance. Of course not every column or news story need fully account for all the sources of variance, but these stories seem a bit one-sided in their mode of analysis.

The graphic reporter is not credited for her or his good work, although the columnist, reporter, and photographer are. Publicly acknowledged creatorship signals responsibility for work and also often improves the quality of work.

-- Edward Tufte


More on NYT sports sparkline

The enormously talented and productive Jonathan Corum, who took my course in analytical design at Yale, and who founded

http://www.style.org/

http://www.13pt.com/

and is now a graphics editor at The New York Times, writes in about what turns out to be his basketball sparkline:

"Hello Professor Tufte, I can take credit (as well as any blame) for the Times graphic.

I'm not sure that the whisker lines without labels would have been legible to all readers (an early draft without labels at far left was not immediately recognized as showing wins and losses by two in-house readers, prompting the more prominent labels in the final version). But I do agree that the 'Below, each tick mark ...' instructions are redundant. They were only included because they were unobtrusive, and in case any skeptical readers went looking for clarification.

The word 'victories' instead of 'wins' is Times style, for the reason you mention, and I didn't add my name to the graphic in part because the data it is based on was readily available, and in part because the overall presentation seemed simple enough to not merit a credit."

-- Edward Tufte


Voting records

Sparkline implementation of Voting Records:

The usual method of detailing voting records is massive text tables consisting of "Y N" votes. I've never been able to read these.

Is it possible to view voting records visually in a graphic literally word-size? Here are a few attempts:

http://autosocratic.blogspot.com/2006/07/sparkline-implementation-of-voting.html

The tragedy of the Washington Post site, which purports to list and summarize the results of rational deliberation in a country founded on reason, can be found at the bottom of this page. Look at the available summaries. ASTROLOGICAL?

http://projects.washingtonpost.com/congress/109/senate/2/votes/190/

-- Mike Round (email)


The problem with congressional votes is that their content and relevance needs to be at least briefly described with some text accompanying the vote. The Washington Post bill numbers and vote descriptions are mysterious except to insiders; and sparkline histories also don't catch content and relevance. Perhaps a better way would be to identify the 20 most important votes in a session and then talk about the voting distributions.

There are all sorts of vote ratings made by various political groups that serve better than the WP list and sparklines.

I always enjoy seeing sparklines but this application should have more text describing each vote, or perhaps different binary categories.

The WP breakdown by astrological sign shows what randomness can produce in the way of pseudo relationships, and so in its somewhat silly and prankish way shows what vote distributions look like under the null hypothesis. That might calm down the rage to conclude when studying other cross-tabs of votes.

There is a substantial literature in political science using multi-dimensional scaling to coax some more complex and richer meanings out of voting records (House, Senate, Supreme Court) compared to univariate marches through the votes. Although even here remains a problem of separating out the key votes from the many trivial votes taken in the House. There are probably ways to derive importance weights for votes. And also various consent rules are used to mask votes; for example, there was no vote by name on the House "pizza rule" on few years ago, where lobbyists could supply pizza to members of Congress on the floor, or something like that.

-- Edward Tufte


Stacked sparklines from Science magazine

An excellent use of graphics, including a 3D stack of sparklines:

Source: Thomas Taubner, Dmitriy Korobkin, Yaroslav Urzhumov, Gennady Shvets, Rainer Hillenbrand, "Near-Field Microscopy Through a SiC Superlens," Science, 313 (15 September 2006), p. 1595.

-- Edward Tufte


Executive dashboard uses sparklines

One of the winners of the "Business Intelligence Network 2006 Data Visualization Competition" is very well done and uses sparklines:

http://tinyurl.com/keqjw (from dashboardspy.wordpress.com)

- Dave

Ask ET thread on executive dashboards: http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000bx

-- David Person (email)


Sparklines in perspective

An interesting possibility for stacked sparkline architectures with information on the apparent surface beneath each sparkline. There's the usual problem, however, that the horizons toward the front may mask the horizons and surface toward the rear in real data:

-- Edward Tufte


Sparklines for monitoring search

Dear Edward, here is a paper that uses sparklines:

http://www.cond.org/www520-adar.pdf

"Why We Search: Visualizing and Predicting User Behavior" Eytan Adar, Daniel Weld, Brian Bershad, and Steven Gribble, to appear at WWW'07

Best wishes, eamonn

-- Eamonn Keogh (email)


Response to Sparklines: theory and practice

Dear Edward, There is a very interesting project at UCLA that uses Sparklines (http://sensorbase.org/)

Best wishes, eamonn

-- Eamonn Keogh (email)


It looks very good. Should have been done this way years ago.

-- Edward Tufte


Sparkline aspect ratio

In Beautiful Evidence, I verbally implemented ("make sparklines lumpy, not spikey and not flat") Bill Cleveland's brilliant analytical method of choosing aspect ratios banking to 45° (William S. Cleveland, Visualizing Data, 1993).

A recent paper by Jeffrey Heer and Maneesh Agrawala, "Multi-Scale Banking to 45°," IEEE Transactions on Visualization and Computer Graphics, 12 (September/ October 2006) provides a way to generate banked sparklines by inputting the data set and the typeface (which provides the vertical dimension if the sparkline is to fit a typographic line, as is usually the case).

The link to Heer and Agrawala is here.

The general lesson of the paper is to look at multiple views of the same data—because different views answer different questions.

-- Edward Tufte


Response to Sparklines: theory and practice

Google have incorporated sparklines into their new release of their Analytics (web site statistics) software.

Have a look here: http://analytics.blogspot.com/2007/05/new-version-of-google-analytics.html

Shame about the pie chart though.

-- Ben Bodien (email)


Response to Sparklines: theory and practice

Google Experimental Labs is now offering a timeline view that uses sparklines -- see http://www.google.com/experimental/

-- David Mackinder (email)


Response to Sparklines: theory and practice

Not a sparkline per say, but a word-size graphic: the Summize folks offer a more data-rich alternative to 5-star ratings. [via]

-- Bil Kleb (email)


Standardization

Sparklines make it easy to compare multiple time series. As always, scaling is crucial: It can ruin or raise beautiful evidence. The following sparklines depict stock quotes of selected DowJones companies for 2007-01-03 through 2007-06-15.

   

The graph on the left scales from min to max for each quote, misleading the eye to believe that the series could be compared visually. However, without processing the min and max values mentally one cannot. The graph on the right side provides a "fair" scale as it scales from 0 to the max of all quotes, yet it is useless because most of the evidence is gone.

Very helpful, but rarely used in everyday practice is standardization, which is very intuitively understood. The graph shows the variance from an identical initial investment of 100 USD for each quote, in other words, your gains and losses.

-- Nicolas Bissantz (email)


Google graphics

Google has released a fairly simple API to produce line plots, scatter plots, bar graphs, Venn diagrams and pie charts. Data and presentation information are encoded into the URL for an image. While there are plenty of opportunities for chartjunk and poor displays, it seems possible to make decent plots. Here is a sparkline created with the API . See Jonathan Corum's Google Charting Tool for a simple way to create the charts.

-- Michael Galloy (email)


OS monitoring with sparklines

MenuMeters is a MacOS X utility by Alex Harper which can make sparklines in your menubar. It's a good example of using sparklines to present data in a text-sized space. Here is a screenshot of my menubar; the sparklines are for network traffic (inbound up, outbound down), CPU utilization (user top, system below), and memory utilization (active top, unpaged bottom), respectively. Each is updated periodically; each is a menu with much more detailed information.

-- Garth A. Dickie (email)


Baseball sparklines

Source: New York Times, December 15, 2007, p. D1

-- Edward Tufte


Financial sparklines

I maintain a site that keeps track of changes to the Dollars Traded Index and recently added sparklines to all of the daily posts that highlight companies that had above normal volume of dollars traded on the NYSE/Nasdaq. I used the Google Charts API to render the graphs, which made my job much easier. The sparklines add context to understand why a company is on a given report and if a spike in dollars traded is on the first day of some breaking news, coming down from a previous peak, or enjoying a longer term trend. It also gives the user the ability to visually filter for the kind of trends they like to follow the most. I believe it has made the previously text-only data tables a lot more usable.


Adds/Drops for Thursday, December 27, 2007


Also at the bottom of each table I link to a post to further explain the sparklines in more detail:
Sparklines

Eric Wikman

-- Eric Wikman (email)


Google's financial sparklines

Google's redesign of sparklines fails to capture the intensity and capacity of real sparklines. Also, sparklines should usually have some scaling (as in most examples in Beautiful Evidence) and should be deeply integrated into tables, text, or graphics. Here are model examples (Beautiful Evidence, pp. 50, 51):

-- Edward Tufte


EveryBlock sparklines

Good sparklines tracking building permits by neighborhood over time here.

-- Edward Tufte


Sparklines useful for USGS streamflows

Sparklines could help protect life and property if they were used to present the USGS online data for streamflows. The current presentation is dismal. For example, find a gauge for a river near you on the USGS’ page of Daily Streamflow Conditions. Click through to the individual page for that gauge, and generally you will see this information (some pages show more data; others, less):

  • a plot of streamflows (or “discharge”) recorded over the last 7 days (you can extend the range to as much as the last 31 days, but that does not change the main point of this argument)
  • a table showing this summary information for the current date:
    • the lowest flow on record
    • the 20th-percentile flow
    • mean flow
    • median flow
    • most recent instantaneous flow recorded (today)
    • the 80th-percentile flow
    • the highest flow on record
  • a plot of gauge heights recorded over the last 7 days
  • a table of summary information, similar to that described above for streamflow, for gauge heights on the current date

What's missing? Perspective. For example:

  • If the stream is near flood stage, the corresponding value will appear on the respective plots, but otherwise there is usually no indication of how far above or below flood stage today’s flow is.
  • There’s no information for the flood of record or for any other historic benchmarks not recorded on the currrent date. A rancher can tell whether the stream is high for today, but not whether it’s even close to the level it reached when it drowned his livestock 30 months ago.
  • Realistic ranges of values are often absent. The highest and lowest values shown on each plot depend on the values recorded over the last 7 days. If there has been little change, the full vertical range of values displayed may represent only an inch of difference in gauge height, for example. But the height of the display is the same, regardless of whether that range is 0.01 foot or 100 feet. So trivial changes are exaggerated, and historic changes are minimized.
  • You can see how gauge height varied with streamflow over the last 7 days, but not how it will respond to values outside that range: Will the additional 3000 cfs coming downstream raise this stream an inch or 12 feet when it gets to this gauge?
  • For that matter, the wealth of information available about seasonal behavior of this stream is absent. When is it typically low? And how low is that, typically?

A spark chart would show all of the above and more. It would be particularly useful when flooding occurs outside of the typical flood season—for example, when heavy rains fall in usually bone-dry July, how does the flooding produced compare to the typical spring floods? Will it merely call for a change in plans for the weekend, or will it pose a great danger to lives and property? In fact, it was just such an event a little over five years ago that led me to propose to the local USGS office that they use spark charts to display this information.

So far, no response.

-- Cliff Tyllick (email)


Bivariate financial performance matrix

In looking at financial time series, one of the challenges is to be able to analyse a very large number of bivariate relationships. Some of this can be achieved by statistical measures but visualisation of the relationships typically has a significantly positive impact. In the attached image, I've attempted to do this (with inspiration attributable to Cleveland) by plotting these bivariate relationships in a matrix. As this analysis is time series analysis, and given that the relationships are symmetrical, I have split the two halves of the matrix into the top-right showing the bivariate x-y plot (the different format datapoints are to highlight different periods of time, with more recent data darker and the latest datapoint shown as red with a callout), and the bottom left showing the time series of the difference between the two series (for those who are interested, the series being plotted are of credit default swap indices, ranked from lowest to highest average spread down the rows with the exception of the two emerging market indices in the top-left - I work in Emerging Markets). The diagonal then shows the time series of each individual index. I would be curious to know if anyone has any feedback or suggestions on how this could be improved.


-- Will Oswald (email)


Will Oswald's Cross-Credit Historical Relationships matrix is wonderful. Always a fan of these "you are here" plots, I love the black dots against the grey past-values distribution and the red current value. We can see the current data in relation to the past. Beautiful layering.

Perhaps what is most instructive is how the simple times series don't tell the whole story as they are only marginal distribution summaries; Will has shown us the joint distirbution, which, as is typical, tells a richer story.

Compare the data for the third and fourth entries (NA.IG and NA.IG.HVOL) to the data for the sixth and seventh entries (NA.HY B and NA.HY). Looking just at the time series, the third and fourth entries look mildly similar: flat, then big bump, then rise-to-peak, then fall. The difference plot shows that the differences go flat, then attenuated bump, then rising bumps. The joint distribution shows a really tight relationship, as evidenced by the points so close to the line.

Now look at the sixth and seventh. The time series look very similar: small rise then fall, then bump, then bigger rise then fall. The difference plot isn't particularly special but the scatter plot of the joint distribution shows that the recent data are completely different from what has happened in the past: all but one of the black dots is completely removed from the other points!

Well done, Will.

Rafe

-- rafe donahue (email)


Response to Sparklines: theory and practice

Google Finance recently made over their stock pages and there appear to be sparkline-like objects.

-- Dan Nolen (email)


Response to Sparklines: theory and practice

Here is an Excel PM talking about Sparklines in Excel http://blogs.msdn.com/excel/archive/2009/07/17/sparklines-in-excel.aspx

-- Brian Kennemer (email)


Response to Sparklines: theory and practice

Reporting in from The Northern League ... a lead change for the first time all year: http://www.rationalsys.com/aplayattheplate.html

-- Michael Round (email)


Google's sparklines implementation

Google Analytics features sparkline graphics in portions of its reports:

The amount of data included in the sparklines is dependent on the date range selected for the report. The implementation here generally conforms to your recommendations, as there are no unnecessary borders, and the graphics are presented in a comparative format.

-- Daniel Thornton (email)


Phish Statistics Visualized: Summer Tour 2009

Hey there -

I recently went public with my first blog post featuring sparklines, using them to represent live performance data for the band Phish.

Here's a link to the post...

http://jamtopia.com/blog/phish-statistics-visualized-summer-tour-2009/

... which features two sparkline exhibits based on the band's 2009 Summer Tour.

The first exhibit looks at some of the most played songs from the tour while the second exhibit explores the shortest and longest sets, based on number of songs played.

I hope you get a kick out of this most frivolous use of an otherwise important technique. They were a little painful to put together but quite rewarding in what they revealed.

Take care,

Todd Levy

http://jamtopia.com

-- Todd Levy (email)


Response to Sparklines: theory and practice

Flickr has been using a single sparkline on its user accounts "recent activity" page to give a glance at the user's site traffic:

flickrsparkline

-- Greg La Vardera (email)


Response to Sparklines: theory and practice

We put easy-to-use sparklines on the iphone in a new app called TraxStocks. These can do some of what is requested above. A posting in a different thread on this site got us some helpful feedback a few months ago.

Link to TraxStocks at the appstore

The things that make this app different than many of the other stock apps out there are

1) Sparklines

2) Allowing comparisons. You can drag the top sparkline around the screen over any other sparkline. OR, you can put several items together a single graph if you turn your iphone or ipod touch on its side. The images I've attached show only two stocks, but you can have up to 10 on the graphs in landscape mode, and there's no limit to the number of sparklines in the portrait mode.

3) Elimination of chart junk. Almost all all "non-data ink" has been erased. There are a few exceptions that seemed to provide a needed visual boundaries.

4) Swiping through time

5) The ability to look broadly at trends, and immediately get specific data for specific dates by just touching the screen at that spot. A bubble pops up showing the date and value.

We welcome more feedback -- especially from readers here. These displays could be used for nearly any data over time, but we started with financial data. I look forward to hearing your thoughts. Thanks.

Aurora




-- Aurora Matzkin (email)


Response to Sparklines: theory and practice

Many people find the TraxStocks displays shown above fairly intuitive on the device. In my previous posting I failed to include a link to the "key" for the iphone sparklines shown in the images.

link to explanation

This link is also directly accessible from the app by touching the "i".

-- Aurora Matzkin (email)


Twitter Boxplots and Line graphs

I've got one to add to this list - more sparklines for Twitter

The two examples I used in the post are demonstrated in this snippet of text:
Perth 30/06/10: Cool (4.1┣▇▇|▇━━┫17.7), max at 2pm, cooling to around 13??C after 3pm, steady afterwards. (⣤⣤⣀⎸⣀⣀⣀⎸⣀⣀⡤⎸ 0292;⠚⠛⎸⠛⠛⠙⎸⠒⠒⠒⎸⠒ ;⠲⠶⎸⠶⠶⠶)

The boxplot approximates the range of each of the quartiles and the line graph relies on people perceiving two vertical dots as representing a number somewhere between them both.

They aren't the best graphs, but for limited, text-based communication I think they do quite well.

-- Samuel Spencer (email)


Response to Sparklines: theory and practice

In Excel the option under the charts tab for sparklines include three types of graphics, lines, bars,and win/loss. Colors and size can be edited. The resulting sparkline can be resized and embedded in Word documents and tables, etc. although the graphics are a bit cumbersome to move to a format like eps. I also embedded text (Jan on one end and Dec on the other) into the sparklines I used in a recent report for the State. The sparklines in the report disappeared when moving between platforms and a coworker's computer and when converting to PDF. I finally got them to work properly but it required a bit of fiddling.

Deltagraph 6 on the Mac was much easier for exporting the resulting graphic and provided better looking output and transportability.

The LaTeX package mentioned above somewhere works well on my Mac also.

Hopes this helps.

-- Jay Lee (email)


Wayback Machine sparklines drive the interface

One of the best sparkline applications ever:

http://newsbreaks.infotoday.com/NewsBreaks/Internet-Archive-Releases-New-Version-of-The-Wayback-Machine-73492.asp

-- Edward Tufte


Response to Sparklines: theory and practice

Is it just me, or would it be nice to see the ubiquitous ratings just replaced by rate-ograms?

Amazon currently reports that Bill Clinton's My Life is rated (704 customer reviews), Sean Hannity's Conservative Victory is rated (291 customer reviews) and Edward Tufte's Envisioning Information is rated (61 customer reviews). It takes a mouse hover on the stars to display a horizontal histogram of ratings.

But for the same screen real estate, it's far easier to notice that the 701 reviewers who rated My Life as and the 291 who rated Conservative Victory as , are more polarized in their opinions than the 61 who rated Tufte's Envisioning Information as

(Rate-ograms generated via Google charts.)

-- kb (email)


Response to Sparkline theory and practice

Sparklines used on Twitter by Wall Street Journal, May 6 2011, to share unemployment statistics using Unicode graphics symbols.

▇▆▆▇▇▇▇▅▂▁▁▂ Last 12 months of the U.S. unemployment rate, which rose to 9% in April. More data: http://on.wsj.com/jkZPs9

More examples on http://kottke.org/11/05/twitter- sparklines

-- Craig Pickering (email)


Response to Sparkline theory and practice

Sparklines have become a topic of interest using Unicode on Twitter. See

Pro: http://kottke.org/11/05/twitter-sparklines

Con: http://thanland.com/notes/regarding-those-sparktweets/

It would be interesting to have Mr Tufte add his voice as to their usefulness. My take is that they provide a visual component to the best of the mediums ability compared to bare numbers, so in that they are useful to display trends.

ET comments:

"Sparktweets" on Twitter as happily described by Jason Kottke at http://kottke.org/11/05/twitter-sparklines

Skepticism about sparktweets from Than Tibbets at http://thanland.com/notes/regarding-those-sparktweets/

Than Tibbets rightly criticizes the Wall Street Journal sparktweets, but perhaps some sparktweets can be rescued.

My view: if you're doing Twitter, then sparktweets is about all you can do in regard to data graphics. So now and then a sparktweet will be better than nothing, but that's all it's better than (which is a short summary of Twitter in general, although is it amazing what now and then can be done in one 140-character sentence). Sparktweets are awfully low resolution and easily prone to data distortion. The solution: every sparktweet should be accompanied by the beginning and the ending number in the time sequence (which burns up 6 to 8 characters toward the 140 maximum, but with a great increase in data-presentation integrity). Sparktweets don't measure up to real sparklines, however.

A few of the examples shown by Jason Kottke have decent resolution. For example, this clever baseball win/loss summary by Stu Spivack (which alas has to fold the last 7 games onto the third and fourth lines):











-- AJ (email)


Response to Sparkline theory and practice

I just noticed sparklines being used by Quantcast to illustrate web traffic; as seen here on drudgereport.com:

-- Tait (email)


Response to Sparkline theory and practice

One of the convenient things about the Twitter-style sparklines is that as Unicode text, they work everywhere text does. So you can write a command-line generator for them: github.com/holman/spark
And then you can pipe in data from the rest of the command-line ecosystem. I like the earthquake example myself:

 curl http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt --silent | 
  sed '1d' |
  cut -d, -f9 |
  spark
▅▆▂▃▂▂▂▅▂▂▅▇▂▂▂▃▆▆▆▅▃▂▂▂▁▂▂▆▁▃▂▂▂▂▃▂▆▂▂▂▁▂▂▃▂▂▃▂▂▃▂▂▁▂▂▅▂▂▆▆▅▃▆
More useful, graphing Beijing air quality:
curl -s https://twitter.com/statuses/user_timeline/15527964.rss | 
    grep /description | 
    perl -nle "print \$1 if /PM2.5;[^;]+; (\d+)/" | spark
▆▆▇█▇▇▆▆▃▆▁▁▃▄▄▄▃▆

-- gwern (email)


Response to Sparkline theory and practice

See http://ssrn.com/abstract=2141475 for a paper testing the ability of students to use sparklines to detect patterns and anomalies in financial report data. The examples integrate semimonthly sparklines into conventional income statements, thus providing 25 times the original number of data points, albeit at low resolution. The students were able to use the sparklines to answer fairly complex questions, with no prior training in sparklines. The paper will be published in the February issue of International Journal of Accounting Information Systems.

-- Daniel Tinnkelman (email)


Response to Sparkline theory and practice

Mashable posts have a "velocity graph" that shows how often said article is shared on different social networking websites.

-- Francisco Lobos Gonzalez (email)


Axes in sparklines

Almost every sparkline I've seen has omitted the x-axis, and for the good reason that the lower limit is rarely zero. However for one case I'm dealing with (fraud statistics), an important fact to illustrate is how close to zero the fraud level gets. So what I ended up with was something like:

Counterfeit fraud Counterfeit (??42.1m)

I also included a y-axis, to allow comparison to data where there are missing elements, e.g.:

Telephone banking fraud Telephone banking (??39.6m)

The horizontal scale of each sparkline is the same, but the vertical scale is from zero to the maximum value of the data. I would have preferred to use the same vertical scale, but due to one value being about ten times as much as others, it would result in most other graphs dragging along the x-axis.

The grey rectangle on the left indicates a period of time which is of interest (the deployment of a new anti-fraud mechanism), matching the full size chart, which can be seen in context in the blog post where I used these sparklines.

I've tried to make the axes as unobtrusive as possible, and I do think they add important information for this data set, but I'd appreciate other opinions on this matter.

-- Steven Murdoch (email)


The New York Times graphics team has (again) used sparklines effectively in a couple of recent graphics. There may be more, but I noticed these two.

The first is part of the explanatory text for a terrific graphic by Mike Bostock, Shan Carter, and Kevin Quealy that shows the history of college football conference alignments. The rest of the graphic is so compelling and engrossing that the sparkline may be easy to miss. (http://www.nytimes.com/newsgraphics/2013/11/30/football-conferences/)

The second is part of the home page for The Upshot. The header includes a small section that shows, with both text and a sparkline, which party is projected to win the Senate according to the Upshot's forecasting model. This nice touch is also, apparently, the work of Mike Bostock and Shan Carter. (http://www.nytimes.com/upshot/)

In both cases, the sparklines are used beautifully as ET originally conceived them: "a small intense, simple, word-sized graphic with typographic resolution."

-- Kyle Peterson (email)




Threads relevant to sparklines:
Narrative sparklines should replace one-at-time instantaneous performance readings.
Open-source and proprietary computer codes for sparklines are nowwidely available. This thread reviews a few of the many possibilities.

Sports data (along with financial and medical data) are an obvious and natural application of sparklines.
An early effort to set sparkline code standards, an effort which was soon overwhelmed by all the different codings.