• Franco Arda

How to reveal trends with a logarithmic scale?

With data on different magnitudes, it can be hard to reveal trends on a regular scale, but we might reveal relationships if we use a logarithmic scale (typically with a base number of 10).

Here, I displayed the GDP per capita vs. life expectancy. On the left, with a regular scale and on the right with a logarithmic scale.

I used the famous GAPMINDER dataset which I downloaded from R.

With the x-axis on a logarithmic scale, we can see much clearer the relationship between GDP per capita and life expectancy.

In Tableau, we can add the logarithmic scale on the axis (in this case, the x-axis). In Tableau, the default base number is 10. In R, we can use with ggplot2 "scale_x_log10()"

In Business Data Science, it's quite rare in my experience to come across datasets on different orders of magnitude, but if we do, a logarithmic transformation might be the difference between uncovering a relationship and not.



Franco Arda, Frankfurt am Main (Germany)                                                                                                                 franco.arda@hotmail.com