Logarithmic scales are useful for visualizing data when the difference between measures is comparatively large. In such scenarios, it’s a good idea to convert the measures to log10 to bring the data into similar range for better interpretation and visualization; let’s look at an easy way to do so.
For example, in looking at the dataset for World Life Expectancy, the values for GDP per Capita vary from 8 to 38,000,000. If we want to compare the GDP per Capita of USA with that of three Asian countries (China, India and Malaysia), the bar graph will show bars with very significant vertical difference. However, if we use log10 scale, we will get a clearer visualization.
In this exercise you will learn how to:
- Create a bar chart visual on the World Life Expectancy Dataset
- Apply Filters to select specific countries
- Apply log10 scale to the data.
Prerequisites
You’ll need access to the World Life Expectancy dataset, and you must be able to:
- Create a Bar Chart visual
- Apply required necessary filters to the visual.
To create a Bar Chart visual with required necessary Filters:
- On the main navigation bar, click Apps;
the Apps view appears.
- Above the left navigation bar, click New Visual.
- The Select a Dataset window appears.
- In the Select a Dataset window, choose
World Life Expectancy
. - An Untitled visual screen appears, in the default tab view of your Arcadia workspace.
Note that the shelves of you’ll use to define the visual (Dimensions, Measures, and Filters) are currently empty.
- At the top right of the screen, click Visuals.
- In the Visuals pop-up, find and click the Bars icon, as shown in the mouseover hint above.
- Note that the shelves of the visual changed. They are now X, Y, Colors, Tooltips, and Filters).
- Populate the shelves from the available fields (Dimensions and Measures) shown in the left navigation menu.
- Under Dimensions, select
country
and drag and drop it on the X shelf. - Under Measures, select
gdp_per_capita
and drag and drop it on the Y shelf - Under Dimensions, select country and drag-n-drop it on the over Filters shelf on the main part of the screen. Drop to add it to the shelf.
- On the Filters shelf, on
country
field, click the down arrow icon; select Pick values from a list, and then select four countries—China, India, Malaysia and United States.
- Under Dimensions, select
- Click Refresh Visual.
To select log10
representation:
- Click Settings at the top right of the screen. The Settings modal appears.
- Click Axes in the Settings window. The Axes Scale options appear.
- On the Axes Scale options list, select
log10
.
- Click Apply
The bar graph in the main part of the screen now shows the measures at the scale oflog10
.Graph with original values
Graph with values measured at
log10
scale