Skip to content

Best Ways to Visualize Time Series Data

    time series is a data collection ordered in time sequentially. So, the type or the domain of data is irrelevant for the name of this series. However, if you are working with time-related data, there are several options to visualize it. In this post, we will be talking about the most common use cases of time series.

    Timeline Visualization

    Timelines become popular for the last couple of years. Their design is mostly clear and easy to understand. The reason is they represent a small amount of data. In other words, they are magnificent if you are using them for last 5-10 items in your set. Or maybe, if you are working on streaming data, it is better to show aggregated information extracted from it. 

    timeline image

    As you can see above image indicates only 4 data points. It is a fancy design, but I think it is not useful for 100 data points. In timelines, I believe most designs force you to read all the timeline items to get the information. Maybe it is the nature of the timeline but I do not think they are useful as other methods.

    Chart Visualization

    The most common time series data visualization is using charts, especially in between web developers. The reason is most chart libraries are capable of showing a large amount of data with magnificent interactivity. For example, the Highcharts library uses 500k data points in its line chart demo.

    highcharts drawing 500k points

    Of course, this much data is not readable. But such visuals are important to see the trends in the time series. Since this data is showing hourly data for the last 60 years, let’s check the data with some zoom; last 1 year and 1 month respectively.

    highcharts drawing zoom 1 highcharts drawing zoom 2

     

    To clarify, here is the sample from Google Trends. The below image shows the trend comparison between Data Visualization and Data Science. As you can see there is consistent growth in the data science line where the data visualization line shows a slight change.

    google trends yearly

    On the other hand, if you look closer, let say for the last 3 months; you would have seen a different trend. This time, there is no growth. Moreover, you may conclude with a decreasing trend.

    google trends monthly

    As we mentioned in our post that domain knowledge is the key to visualization. In this example, line charts provide us valuable clue both for long and short term investments. And as you see, line charts are better for visualizing time series if you need deeper information.

    Time Series Visualization with Histograms

    From my point of view, histograms are bar charts that show an aggregated summary of data for specific ranges or intervals. Sometimes they are confused with line charts. The difference is histograms do not show a relation between two points.

    Below histogram shows page views per minute on Google Analytics. If this were created as a line chart, there would be some slopes between minutes which would be wrong. Because missing points should remain 0 (zero) due to visitor behaviors.

    histogram page views per minute

    Why do we use histograms in time series?

    If you are using streaming data for visualization, there would be lots of data sources with a huge amount of data. As a human being, it is impossible to analyze this data without any aggregation or summarization. Think about the above page views histogram and let’s say your streaming data is flowing like 1 data point per second. So first, you have to identify view logs and then you have to calculate their sum. Furthermore, it is better if you draw a chart for views per hour. Now you have an update to launch which requires a system restart and you do not want to disturb your users’ experiences. The best way is to pick a time interval with the lowest active user count. So, instead of checking line chart visualization of time series, the below histogram is much better for picking the right time.

    histogram page views per hour

     

    There are lots of other ways to visualize time series according to your needs. Mostly, they are combinations of the above visual types. In order to gain more from your data, you have to know what you need first. Streaming data always provides more if you learn how to filter it. Usually, you have to collect(cache) the latest part of the data to run some filters. Doing it right, results with fancy visuals. Don’t hesitate to use these charts, play with your data for more.