Data Visualisations- Part IV

Photo by Jan Huber on Unsplash

I like elegance. I like art nouveau; a stretched line or curve. These things are very much in the foreground of my work

-H. R. Giger

Introduction

In the fourth article on our current visualisation series, we familiarise the audience with two kinds of plots viz: bar-line graphs and line graphs with different scales on y-axis. We will continue to use Covid-19 datasets for discussing the different chart types.

Line graphs with the dual y-axis

The graph below shows the total number of new cases due to COVID-19 in Ireland for May, 2021. The dataset used for this graph is referenced from here. The same also depicts the number of daily new deaths for the same period. The primary y-axis represents the daily new cases whereas the secondary y-axis represents daily new deaths.

Shaded line graph

The graph below shows the deviation of the 14 day incidence rate of Tullamore Lea-7 illustrated with dashed lines with respect to the 14 -day incidence rate for Ireland as illustrated in the shaded portion.

Shaded line graph for comparative analysis between incidence rate of Tullamore LEA and Ireland

Combination chart with lines and columns

Sometimes we may need to have both bars and lines on the same chart. Usually when we combine both bar and line type, we have a y-axis with two different scales, basically these different scales are used to illustrate the effect of a phenomenon like time course for plasma concentration of an injected drug etc.

The data for the third graph is collected from here and can be found in our repository. The grey bar graph shows the cumulative sum of confirmed cases till that date.

Combination graph to compare the trend of change in number of daily cases against number of daily vaccines administered

The blue bar represents the vaccines administered on that day. The black line graph is the trend that shows the increase or decrease in the number of cases. When we want to visualise the change in rate of some attribute, a log is suitable over linear scale. The linear scale plots the absolute numbers while the log scale plots the rates of change. There is another scale called symlog, similar to log. The main difference between log and symlog is log allows only positive values while symlog allows negative values as well.

Takeaways

Combination charts are useful to highlight differences between two or more sets of data. We can have columns, lines on the same chart to display different types of data in different ways so that key differences or impacts are easily observable. When we use dual y-axis we use the primary variable on the left side and secondary variable on the right side. Use them when you want to establish relationships between two variables. The entire code for the above article can be found here.

Do you have any questions?

Kindly ask your questions via email or comments and we will be happy to answer :)

--

--

Insights on Modern Computation
Perspectives on data science

A Communal initiative by Meghana Kshirsagar (BDS| Lero| UL, Ireland), Gauri Vaidya (Intern|BDS). Each concept is followed with sample datasets and Python codes.