Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Points of view

Temporal data

Use inherent properties of time to create effective visualizations.

Time plays a central role in most studies of living things. When presenting and exploring temporal data, scientists can employ the unique properties of time to design compelling visualizations. Time is unidirectional, provides a natural order for events and has an inherent semantic structure. Temporal data are often cyclic and exhibit repeating patterns. The visualization challenge is that time, unlike spatial dimensions, cannot be directly perceived by humans.

In general, there are three common approaches for visualizing temporal data: time is encoded using position, brightness or saturation, and/or animation. Position, which is a very effective visual variable, should be considered first. Examples are line charts and bar charts, in which time is mapped to the horizontal axis. The bar chart in Figure 1a shows the confirmed influenza cases from the World Health Organization FluNet database (http://who.int/flunet) for the United States between 2010 and 2014. Although a recurring seasonal pattern with a peak in the winter months is clearly visible, it is hard to judge the shift in the influenza season onset across different years. When dealing with recurring patterns, take into account the cyclicity inherent in the data by breaking the time dimension into corresponding intervals and aligning these intervals to emphasize the recurring pattern. To show aligned data, consider a layered or grouped bar chart1 or a superimposed line chart, which support simultaneous comparison of peak location and peak height (Fig. 1b). Because of the cyclic nature of the data, the horizontal axis can be shifted to emphasize the recurring pattern. If the cycle length is changing over time, break the data into intervals of variable length and normalize them to a uniform cycle length to emphasize the recurring pattern, or leave the intervals unchanged to illustrate the difference in cycle lengths.

Figure 1: Alternative representations of confirmed cases of influenza types A and B.
figure1

(a) Bar chart plotting confirmed cases in the United States from week 1in 2010 to week 50 in 2014. (b) Superimposed line chart showing the data from a as individual curves. The position of week 1 on the horizontal axis was chosen to emphasize the annual peak. Start and end point of the time series are indicated by filled and hollow circles, respectively. (c) Radar chart showing the data from a as a single continuous curve. (d) Sparklines depicting the overall influenza patterns of different countries for the years 2012 and 2013.

A common alternative to line charts and bar charts for cyclic data with recurring patterns are radar charts that use polar coordinates to project the data onto a circular plane (Fig. 1c). Radar charts are often applied because of their visual appeal and have the advantage that they produce a continuous curve over all cycles while also supporting the comparison of patterns across multiple cycles. However, as plots that use radial layouts are harder to interpret owing to distortion, choose linear layouts unless there is a compelling reason to show a continuous curve for aligned cyclic patterns.

Sparklines2 are another technique to show temporal data in a highly condensed form that still allows pattern comparison (Fig. 1d). Because they are designed to show qualitative aspects of the data, sparklines do not require scales or axes, which enables effective visualization of large numbers of measurements over time that can be integrated into tables or directly into the text. Note that journals might have style constraints that prevent such applications of sparklines.

If all spatial dimensions are mapped to other variables, such as in a scatter plot, time can be represented for a selection of the items as traces that show the location over time by plotting all time points for the selected items and connecting them with lines in their temporal order (e.g., the “Trails” feature of GapMinder, http://www.gapminder.org/world). These traces can be enhanced by additionally encoding time in the brightness or saturation of the data points to emphasize the temporal order. Traces are an efficient visualization of trends, but identifying the position of items in their respective traces at a given time point is difficult.

Animation maps time to time and is an alternative approach if visual variables such as position and saturation or brightness are already in use. Animation is an encoding that is intuitively understood, but it limits our ability to detect recurring patterns and compare across multiple time points. As it is expected that interactive plots will become more prevalent in scientific publications, the use of animation to convey temporal patterns must be carefully judged against alternatives such as small multiples3.

References

  1. 1

    Streit, M. & Gehlenborg, N. Nat. Methods 11, 117 (2014).

    CAS  Article  Google Scholar 

  2. 2

    Tufte, E.R. Beautiful Evidence (Graphics Press, 2006).

    Google Scholar 

  3. 3

    Gehlenborg, N. & Wong, B. Nat. Methods 9, 315 (2012).

    CAS  Article  Google Scholar 

Download references

Author information

Affiliations

Authors

Ethics declarations

Competing interests

The authors declare no competing financial interests.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Streit, M., Gehlenborg, N. Temporal data. Nat Methods 12, 97 (2015). https://doi.org/10.1038/nmeth.3262

Download citation

Further reading

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing