Time Series

Lines are the best choice for presenting a time series. In this case, time is the independent variable (either continuous or interval) and may be evenly or unevenly distributed.

Use lines to plot time series

Take the simple example of body temperature measurement of a beaver obtained using telemetry. Temperature is plotted against time, and a third, categorical, variable is plotted on top of the time series to indicate when the animal was active. Summary statistics for inactive and active periods are presented directly on the plot as horizontal lines and actual values.

A time series of temperature measured during the course of a day for a single beaver. The active state of the beaver is represented by the shaded area.

Match the scale to the time series

Figure @ref(fig:irrigation-dot-plot) shows another example of a dot plot. There are also three variables plotted: The total irrigation areas (thousands of hectares) for four regions at four different time points are depicted.

1

  • 1 See: this article for this example and the Food and Agriculture Organization of the United Nations here for the raw data.

  • Placing area, as the continuous variable, on the x-axis is permissible, but in this case it is unintuitive. In addition, there is over-plotting since there are only three data points visible for South America.

    In the second plot, placing time on the x-axis draws our attention to the fact that we are actually dealing with an un-even time series. Therefore, the question arises as to what the focus of the plot is. For example, is it important to show that Europe quickly surpassed North America by 1990, or to show that Africa is consistently very low? There is also an over-plotting problem since there are only three points visible for South America in 2000. In addition, the even spacing of each time point is inaccurate since the time-series in not evenly spaced. The solution will be to connect the dots and use an appropriate scale (see page @ref(fig:irrigation-good)).

    Earlier we presented an example of an uneven time series presented on an evenly spaced x-axis (see page @ref(fig:irrigation-dot-plot)). Fig @ref(fig:irrigation-good) shows a corrected line plot of the irrigation data.

    Normalize data to communicate, not misrepresent, your data

    Note that normalizing our data can have a dramatic affect on how it is perceived. In the first (non-normalized) plot in figure @ref(fig:irrigation-good), gestalt principles dictate that there are two groups of interest. 2North America and Europe are separate from South America and Africa. In the second plot (area as a percent of 1980) the first group consists of Europe, South America and Africa. North America appears to be an outlier compared to the original plot and Africa holds the highest position in 2007. In the last plot (absolute change over 1980) Europe is the clear forerunner.

  • 2 We could refer to the second and third plots in figure @ref(fig:irrigation-good) as deviation plots. A deviation plot shows how specific values differ from some reference point. The reference line must always be present.

  • Irrigation area by year sorted according to country. The same data is presented in its original form and with two different normalisations.

    Irrigation area by year sorted according to country. The same data is presented in its original form and with two different normalisations.

    Irrigation area by year sorted according to country. The same data is presented in its original form and with two different normalisations.

    Encode lines using colour when possible

    In line plots with many overlapping series, it can be difficult to distinguish individual trends. Series can be encoded using line type (dashes), weight (thickness) and colour. The most salient choice is colour, when available, since it allows the easiest way of distinguishing between each series. Compare the two plots, below, depicting the global capture of seven different Salmon species from 1950 unto 2010. Theabundance of line types makes it difficult to distinguish individual species.

    A time series of global Salmon capture. Left: Different line types are not easily distinguishable. Right: Colour is more suitable encoding option for the groups in this case.

    A time series of global Salmon capture. Left: Different line types are not easily distinguishable. Right: Colour is more suitable encoding option for the groups in this case.