Skip to content
Home » Logarithmic scale in cumul.io visualizations

Logarithmic scale in cumul.io visualizations

In times of covid-19, logarithmic scale is everywhere. A phenomenon such as an epidemic grows exponentially. If we want to visualize an exponentially growing phenomenon, a logarithmic scale is often a good idea. In this blog post I explain how you can do it in cumul.io.

Google Trends data on the search term “logarithmic”

To be blunt, there’s no way you can transform an axis to have a logarithmic scale instead of a linear scale (17 may 2020). But there is, however, a simple solution. We can preprocess our data in cumul.io by adding a new column through a formula that log-transforms our data.

In this example I use the US counties covid dataset from Kaggle. You can upload the dataset through a CSV, Google Drive, or whatever floats your boat.

Through the datasets section of the tool, we can explore the dataset and add the column by clicking on the “add formula” button. If you select the Mathematical function category, you’ll be able to choose Logarithm. Drag and drop it to the formula area.

LOG() takes two arguments: (1) the column you want to take the logarithm of and (2) the base. Try to give your new column an appropriate name.

You can now create a line chart and use logCases as the measure. In the example below, I also added a filter to only include 7 states that have been struck pretty hard by the virus.

As a final note, I could not find a way to change the values on the Y-axis. So the number displayed is simply the log-transformed value — not the original value.

Say thanks, ask questions or give feedback

Technologies get updated, syntax changes and honestly… I make mistakes too. If something is incorrect, incomplete or doesn’t work, let me know in the comments below and help thousands of visitors.

2 thoughts on “Logarithmic scale in cumul.io visualizations”

Leave a Reply

Your email address will not be published. Required fields are marked *