# Visualize time-series data

I have a lot of time-series data. I would like to visualize this data, so that I could spot patterns like the following:

"About five days after event X, event Y is very likely to happen"

or

"A short burst in the frequency of event Z, makes it likely that also event Y will happen with an extra high magnitude"

I specifically do not want to describe what my data is about, as I am looking for a general solution to a general question.

Edit: The simplified table structure is like the following:

``````thetime datetime
eventid int
magnitude double
intensity double
``````
-
Sounds more like a need for a statistic if there is a lot of data. – JeffO Mar 16 '11 at 12:57
@Jeff O. The advantage of statistics is when I know what I am looking for, I can get an accurate statistic. Visualizing is superiour when I need to spot a pattern. Especially the second example cannot easily be spotted using statistics, unless you know what you are looking for. – David Mar 16 '11 at 13:08

## 7 Answers

Try using a spiral heat map to visualise your data - these are excellent at helping you to spot temporal patterns. Your time dimension becomes a spiral, one rotation per year or month, and your other variables shown as a heat map.

TDWI has an interview with Biz2 founder Andrew Cardno where he talks about this approach.

Disclosure: Several years ago, I used to work for one of Andrew's earlier businesses.

-
This certainly looks impressive, and I have inquired about the cost of this. Thanks! – David Mar 21 '11 at 9:19

It's really hard to tell if we don't know what the data is. Like are you trying to compare 10 types of events? A hundred? Thousands? And how many data poitns per event? Thousands? Millions? This would determine what kind of visualization you can do.

If you don't have a huge number of event types, I would try something like small multiples or a faceted line chart. Since you have both magnitude and intensity, you could map the magnitude to the y-dimension and then map intensity to the size of a the point that is on the chart.

Horizon charts are also something that might be worth looking at: https://square.github.io/cubism/

Another approach might be similar what Stamen did to visualize NYSE data a while ago: http://content.stamen.com/visualizing_a_day_of_financial_transactions_on_nasdaq

-

Statistics. Time series correlation detection and forecasting is why we invented statistics. You should read about Covariance and Correlation, and Autocorrelation. You might be particularly interested in Correlograms and Covariance Mapping.

Visual patterns are neat, but it's easy for the eye to believe it sees patterns where there are none, or more likely to miss a pattern that would be easily detected with some simple stats analysis. In fact, patterns that would otherwise be lost in noise or hidden in complex phase relationships can be extracted and enhanced and made visible using statistical methods.

-

Google finance chart approach could work too - just plot magnitude and intensity as two separate lines. If there is a correlation between the two measurements, you will see them go up and down at the same time. If two measurements are negatively correlated (you can test this hypothesis statistically), you can plot f(x) of one measurement and -g(x) of another. Simpler charts get the point across to a wider audience:)

-

Sounds like a job for motion charts. You should watch Hans Rosling's TED talk. It's amazing.

(Image from iwaterpolo on Wikipedia.)

Google has an implementation that you can try out.

-

I think this will work best using graphs. The multidimension aspect could be handled drawing just dots (or circles). If you then use the following :

• X is time
• Y is magnitude
• each event gets its own color
• and each dot is larger based on intensity

I think visual patterns hopefully could emerge.

Hope this helps.

-

I like the google finance charts, I think it's a great solution, especially how they connected it to the large overview chart at the bottom:

And make sure to explore the little interactions inside - for example, how on mouseover both graphs show an indication at once (instead of drawing a vertical guide connecting them).

-
I agree that graphs can be used, but my data is multidimensional so I do not think it would be easy to map to graphs. I have updated my question with the data structure. – David Mar 16 '11 at 15:12
@David In that case, I think you could use the same technique, and use line width to show intensity. It's basically the same principle as suggested by @Nathanvda, but with a chart it's easier to see patterns than with a static collection of bubbles. – Vitaly Mijiritsky Mar 16 '11 at 19:16
Indeed, line width is very similar to what i proposed, and maybe even clearer. Normally I would presume if the chart-data is dense, using the bubbles you would get close to the same effect. If it is not, using the lines will be much clearer. – nathanvda Mar 18 '11 at 14:53