top of page
Kush Kulshrestha

Annotated Line Graphs


One of the things that we should remind ourselves more often is to keep it simple.

Its good to experiment with some ideas and try different things, but its almost never the case when a more sophisticated Viz is more desirable than a simpler one though it may be the case that a sophisticated Viz displays more information.

The purpose of a Viz is not just to show information in colorful format but to represent it in a more intuitive sense with least possible cognitive load required to understand it.

Rule of thumb: Simpler the Viz >> Less Cognitive load required to read >> More Intuitive it becomes >> Better it is.

A simple way to represent data involving time as a parameter is line graph. Annotations mean some text for guidance or reminders. Annotated line graphs are simple line graphs that contain some text to explain the trends of events in the Viz so that it becomes easier to understand the data.

Lets see how we can do this,

I downloaded data of total World's approximate GDP value measured every year from the Official Website of World Bank. The goal is to display the effect of some of the major Recessions on GDP growth.

Data consist of Year as a dimension starting from 1960 and the total World GDP value in USD as a measure for every year. I have added an additional column in the data : Recession, by doing some research on some of the major recessions and the Year they got triggered in the market. Null value in this column mean that there was no major recession recorded in that particular year as per my research.


Figure 1: Data from World Bank

Next, in order to make the major Recession years stand out so that those could be focused and compared with cognitive ease, I have created a Calculated Field named Expansion. The value of Expansion field 'Yes' shows the absence of any major Recession across the World (We use the Recession field from the database here. Conversely, if there exist any major recession then the value becomes 'No'. This just plays the role of a flag for a recession event.


Figure 2: Calculated Field Expansion

Now we are ready to plot. Placing the GDP measure on the row shelf and the Year Dimension on column shelf creates a basic line chart as shown on the first half of the image in the Fig 3 below.

This view of data could be made better. Its difficult to identify the year when the GDP was affected and since the graph is a continuous line, its easy to see the general trend but difficult to compare nearby year's values.

It turns out that we are naturally good in comparison when we focus on some distinct finite points in a small area. Lets make use of this fact.

Now we have to do 2 tasks: 1) Add distinct equally spaced points to the Viz. 2) Try to highlight the attention to the region we want user to focus on.

This reduces the work to be done by user to find the relevant places to focus and makes our Viz more intuitive.

We do (1) by adding the GDP to the rows again and selecting circles instead of line from the marks card this time. This creates a new line-like chart following the trail of the line chart but instead of being continuous it is discrete as shown in the lower part of the Fig 3.

In order to draw users attention (2), we add the the 'Expansion' calculated field to the color card for the lower graph. This highlights the Recession and Non Recession years differently. We can fine tune the colors. I have selected red for Recession years and blue (which is common to the line chart) for non Recession years.

After fine tuning the size of the circles and colors from the marks card, right-click the y-axis of the lower chart and select the Dual Axis option. By now, the axis of both the graphs should combine and the circles should be perfectly overlaid on the line. (Synchronize the axis if necessary)


Figure 3: Line graphs

Adding Annotations is now very easy. Just select the text option with Floating settings on the dashboard options after making a dashboard of the current sheet. After adding relevant text, we have a clearer Viz which:

- Directs our attention to the Recession hit years so that user can retrieve maximum info with Cognitive ease.

- Shows the general trend of the GDP Growth,

- Displays text to explain the effects of major Recession events.

- Help us compare the GDP Growth of Recession hit years.

And all this, very beautifully.

Here is the final Tableau version of mine.


Can you think of more improvements in this? I'd be glad to hear.

Let me know :)

Kush


bottom of page