Exploring Time Series Graphically

Antony Unwin1 and Graham Wills2
1	Dept of Computer-Oriented Statistics and Data Analysis,
	University of Augsburg, 86135 Augsburg, Germany
2	Lucent Technologies, Bell Laboratories, Indian Hill, Naperville IL 60566

Introduction
Interactive graphical tools are available in a number of packages (Data Desk, 
JMP, SAS Insight and to a lesser extent LispStat, S+ and others), but none 
provide interactive tools for working with time series.  This is surprising, as 
graphical displays have always been considered important for time series 
analysis.  The natural time ordering of the data makes graphs very informative 
and the lack of independence of the data makes simple summary statistics less 
useful than in other contexts.

Diamond Fast was designed to provide some basic tools for exploring 
multivariate, irregular, short time series where analytic methods could not be 
applied, but it proves to be valuable for working with univariate, regular, long 
series too [Unwin and Wills].  The main idea is to display series in a common 
window, to query them, to move them around, and to compare them.  Its a bit 
like working with icons in a window.  As the package has not been widely 
publicised but is still in use we thought it would be helpful to summarise its 
main features here.

Scaling
Most books on statistical graphics explain at length how scales should be chosen 
and drawn.  There are some specific recommendations for time series in 
Cleveland [1993], where he points out that different aspect ratios may be 
necessary for studying local and global structure.  This is not so relevant for 
interactive graphics where a series can be interactively rescaled both vertically 
and in time and where not only the scales, but also individual points can be 
directly queried.   Figure 1 shows weekly values of the Dow Jones Industrial 
average between 1929 and 1932.  The series has been queried at its maximum 
before the crash.  The same mouse click can call up information on a point, on 
an axis or on the graph itself, depending on where you click.



Figure 1 Querying time series (Dow Jones Industrial Average 1929-1932)

The main method of changing the vertical scaling in Diamond Fast is to grab 
the series graph and pull it upwards to magnify or downwards to shrink.  This 
is very effective as you can see how the series changes and judge the effect you 
want to obtain.  Technically this is achieved by  distorting the current screen 
image and when the mouse button is released an accurate picture of the graph 
is drawn at the new resolution.

Changing time scaling is carried out for all series on the same screen 
simultaneously.  This can be done dramatically by a factor of 10 with a single 
click or more precisely by dragging a scaling bar.  Here are two views of 
monthly Canadian unemployment data.  The graph on the left of Figure 2 
shows all 20 years of the series (240 points) but has been crushed into a very 
short time-scale.  The overall trend and range of seasonality are clearly shown.  
The graph on the right of Figure 2 shows only some of the series, just under 
two years, at a scale 100 times bigger.  The points have been marked to 
emphasise the effect.



Figure 2  Differing time scales (Canadian Unemployment 1956-1975)

Another issue is whether to mark the points at which data are recorded or to 
show a smooth curve or both (as in the graph on the right above).  Obviously, 
any recommendation must depend on the series being plotted.  Dense, regular 
series (e.g. daily currency rates over several years) are better as a smooth curve.  
Irregular short series (e.g. temperature measurements of a patient at various 
times) should be displayed with points (and possibly lines joining them).  In 
Diamond Fast you can switch from one alternative to another with a simple 
menu selection.

Overlaying time series
Many time series have a strong seasonal component and it is necessary to 
incorporate this in a model to interpret short-term changes effectively, for 
instance in interpreting sales data or unemployment data.  In Figure 3 you can 
see the monthly unemployment series for Canada overlaid on itself with a lag 
of one year.  A copy of the series has been made and has then been picked up 
and overlaid on the original series.  Changes in level, changes in seasonality 
and other features are visible in this static display with careful study, but 
interactive exploration (realigning the graphs, rescaling, zooming and 
interrogating, all carried out with direct mouse control) highlights them much 
more effectively.



Figure 3  Overlaying time series (Canadian Unemployment 1956-1975)

Multiple time series
Much of time series literature is concerned with analysis of single series and 
there are many different approaches for modelling the data [see Chatfield 
amongst others].  The literature for multidimensional series is much sparser 
and the models require strong assumptions about relationships between series.  
Some data sets can readily be modelled in this way but many cannot.  Any 
assumption of stable relationships between series over lengthy periods can be 
difficult to justify.  Sales data of sets of products are regularly recorded, but the 
relationships between the products may change over short periods of time due 
to pricing, distribution or advertising campaigns.  Financial series may show 
strong relationships of one kind over one period and different relationships 
over another, groups of short-term and longer-term interest rates series being 
one example.

The tools needed to explore multidimensional series include being able to 
properly align series recorded with different frequencies or over differing time 
series, being able to overlay one series on another to explore lagged effects, 
(similar to what was done in Figure 3 for studying seasonality), and being able 
to commonly scale related series.  It is also important to be able to move around 
and rescale individual series directly on screen.

For instance, in the following example displayed in Figure 4 we have three 
different displays of waterlevels at four French locations, correctly aligned in 
time.  The leftmost figure shows that measurements started and finished at 
different times.  Three of the series all have a step increase at about the same 
time.  Displaying the series by points shows that one (YevreLeCht) has two 
possible outliers and a gap in data recording.  Scaling all series equally to the 
same scale as Engenville (the selected graph) shows that YevreLeCht has a 
smaller range and Cesarville has the largest.  (Querying reveals that Retrevilles 
values are all higher than the others, though this could also have been seen by 
setting a standard origin for all four graphs.)



Figure 4	Viewing multiple time series in various ways (French water levels)
	(a) Default display (b) Showing points (c) Common scaling

In practice it would be unusual to examine these displays in parallel.  It is more 
effective to switch between a number of displays, examining possibly 
interesting features in more detail, choosing appropriate bases for comparions, 
zooming in and out, querying particular features and so on.  Static displays can 
convey some of the results of exploratory analyses but none of the power of the 
process.

Summary
This short note has illustrated some of the features of the software Diamond 
Fast for the interactive graphical analysis of time series data.  Although the 
software is almost ten years old, most of its features are still not available in 
mainstream packages.  Given the wide range of potential applicability of these 
ideas and their obvious value in practice, we can only conclude that this is 
another excellent example of the lack of use of exploratory graphical tools in 
statistics.  Perhaps someone can explain to us why this is so.

Technical details and availability
Diamond Fast runs only on Macintosh computers, but it can run on anything 
from a 10 year-old Mac Plus to a modern Power Mac (on which it will run 
rather faster).  Enquiries about availability should be made to the first author.

References
Chatfield, C. (1995). The Analysis of Time Series: an Introduction (6th ed.). 
London: Chapman and Hall
Cleveland, W. S. (1993). Visualizing Data. Summit, New Jersey, USA: Hobart 
Press
Unwin, A. R., and Wills, G. (1988). Eyeballing Time Series. In  Proceedings of 
the 1988 ASA Statistical Computing Section (pp. 263-268)
