Does anyone know of recommendations/references for plotting binary time series data? Or categorical time series data? I'm looking at win/loss records, and it seems like there should be plots that exploit the binary nature beyond just a simple line plot.

Late edit: I'm familiar with Tufte's suggestions, especially those given in the sparklines chapter of Beautiful Evidence (see whuber's answer below). I'm interested in other references, particularly those that provide justification for their recommendations.

Second edit: To clarify some of the questions in the comment... the key issue for me is the binary nature of the series. I'd be interested in references to anything that discusses special issues that come up when plotting binary (or categorical or ordinal variables in general) time series instead of interval/quantitative variables. Highly technical papers are fine, as are nontechnical books aimed at a popular audience. It's really the binary vs. general distinction that I'm interested in, and I don't know of any references beyond those listed in the answers below.

  • $\begingroup$ Would the proportion of $1$s vs. $t$ be useful? $\endgroup$
    – Macro
    Jul 9, 2012 at 14:36
  • $\begingroup$ Possibly, wouldn't that just be a line plot, though? Maybe based on smoothed values. $\endgroup$
    – Gray
    Jul 9, 2012 at 14:58
  • 1
    $\begingroup$ Re the edit: if you want justification, you really had better specify your visualization objectives. Is the audience statistically informed or general? Do you need the graphics to be quantitatively interpreted or just qualitatively? Is speed of human processing important or accuracy or both? What aspects of the time series need to be conveyed? Do you need the raw data to be plotted or are derived series acceptable? Etc, etc. $\endgroup$
    – whuber
    Jul 9, 2012 at 15:00
  • $\begingroup$ I was thinking a line plot of binary data would just be lines jumping between $0$ and $1$ over the interval. Since this is not visually appealing (which I thought was the reason for your question), you could, instead, plot the proportion over time. I'll wait for some more detail (echoing @whuber) to comment further. $\endgroup$
    – Macro
    Jul 9, 2012 at 15:02
  • $\begingroup$ For now, the audience is me. I'm statistically informed and want to see the raw data. The key issue is the binary/categorical nature of the data--I'm not aware of anything that mentions anything one might want to do differently if the data are binary/categorical. I don't think Tufte really discusses this either. If I remember right, he mentions the tick plots in a general discussion of sparklines, but doesn't really discuss them much. $\endgroup$
    – Gray
    Jul 9, 2012 at 15:05

3 Answers 3


Kedem and Fokianos in their book "Regression Models for Time Series Analysis" have a whole chapter (Chapter 2) on binary time series models with many examples of plotted series and periodograms.

In response to whuber's request I am adding some description of the plots in the chapter. page 63 Fig 2.3 This figure is in the section on logistic autoregression. A model for a logistic autoregression with a sinusoidal component is give by the formula Logit(πt(β))= β1 + β2 cos(2πt/12) + β3 Yt-1

They plot Yt with the time series plotted below it where the particular function is

Logit(πt(β))= 0.3 + 0.75 cos(2πt/12) + Yt-1

fig 2.4 page 62 is similar but for a different series

fig 2.5 shows sample autocorrelation for 4 such logistic autoregressions with sinusoidal components.

fig 2.9 page 70 plots level of percipitation at Mount Washington NH over 107 day period with the binary time series Yt (rain yes or no).

fig 2.14 (looking at logistic models for sleep data Yt awake vs asleep) figure provides cumulative periodogram for raw residuals from a model and Pearson residulas from the model.

fig 2.15 shows observed series for logistic model for sleep data with model prediction of the series below it.

  • 1
    $\begingroup$ Because none of that chapter is readily available at your link, Michael, could you provide examples or descriptions of these plots? Because the book focuses on statistical methods, rather than graphical representation, it would also be interesting to know whether the authors offer anything innovative or especially useful concerning the graphical representation of binary time series. $\endgroup$
    – whuber
    Jul 9, 2012 at 14:57
  • $\begingroup$ Cool, I was unaware of that book. I'll try to check out a copy. $\endgroup$
    – Gray
    Jul 9, 2012 at 15:07

As always, it depends on the purpose of the plot: what is it intended to communicate to whom? In any event, cumulative plots tend to be interesting and informative. The NY Times has lately been producing many nice examples. Some examples of similar plots appear on the "Edward Tufte forum". This combination of "sparklines" (cumulative plots without labeled axes), tabular data, and the raw time series provides a lot of information in one place:


Note the subtleties of design, such as positioning the table rows and the righthand plots (just binary time series plots) at heights corresponding to the final standings; and using consistent colors across the sparklines, the table, and the time series plots.

In looking these over, I would be tempted to redesign them slightly: either scale one or both plots by time, rather than game index, to introduce chronological information; or--perhaps better--put gaps between the individual series of games. (Baseball is usually played in series of three or four games between pairs of teams. This structure can be important in understanding the data.) Even better: at the right, color-code each series according to the opposing team (or perhaps just the strength of the opposing team) rather than using monochromatic series.

These recommendations follow principles enunciated by Tufte in his first book on the topic, The Visual Display of Quantitative Information, in which he advocates increasing the data-ink ratio through erasing (here, putting gaps in the data to show the series) and modifying the graphical modes of representation (here, replacing an uninformative single color by changes of color).

  • 2
    $\begingroup$ Very cool, I was going to suggest not an entirely dissimlar type of sparkline. They weren't orignaly meant for time series, but the idea can certainly be applied to it. The seperation plot (Greenhill et al., 2011 - pre-print PDF here) is a visual technique for binary data that can be displayed in a very small space (i.e. sparklines). $\endgroup$
    – Andy W
    Jul 9, 2012 at 14:42
  • $\begingroup$ Thanks for the response; I should have mentioned that I'm familiar with Tufte's work but am looking for something possibly a little more rigorous... i.e. (using the baseball example) does plotting several (approximately) brownian motion processes with drift make sense as a way to compare the drift parameters? Are tick marks the best way to plot a binary variable? I'll edit the original question to try to make that more clear. $\endgroup$
    – Gray
    Jul 9, 2012 at 14:53
  • $\begingroup$ @AndyW, the separation plot looks promising. Thanks! $\endgroup$
    – Gray
    Jul 9, 2012 at 15:33

Just to follow up on this issue, I didn't find any other resources on plotting binary series and wound up going with the original line-plots that I dismissed initially. (The plots of the observed series in the book M. Chernick refers to also plot the original data just as lines, which I discovered after making my choice). Tufte's tick plots require a bit more space to be legible and the benefits of being able to count wins/losses in a row seem small. Accurate counting is difficult, and if the length of the largest winning or losing streak is important it could be presented on it's own, just like he does for the min/max in more traditional sparklines).

Here's the result so far:

MLB season summary through all-star break

The last column gives wins and losses for games played, plus predictions from a fixed effects model for remaining games. The other columns are kind of beside the point, but there's a description available here for anyone interested.

I'm happy to hear other suggestions, but anything extensive might warrant opening another question. And let me know if adding this follow up answer is inappropriate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.