Sep
2
2018

WorkoutWednesday S02 E35 – 2×2 Quadrant chart

Do you enjoy working with Tableau? Are you looking for an additional challenge? Workout Wednesday might be what you need. WorkoutWednesday a set of weekly challenges from  see url Andy Kriebel and  http://lakesiderestaurantcumberland.com/order Emma Whyte (for 2017) and  buy accutane cheap Rody Zakovich and  Luke Stanke. (For 2018) designed to test your knowledge of Tableau and help you improvise your development skills. The idea is to replicate the challenge that they pose as closely as possible. When you think you have it, leave a comment with a link to your visualization and post a pic on Twitter for others to enjoy.

2017 WorkoutWednesday Challenge: Link

2018 WorkoutWednesday Challenge: Link

Challenge

This week WorkoutWednesday by Zen Master Neil Richards.  A great way to end an awesome month facilitated by so many members of the Workout Wednesday community.  

This week’s workout is about recreating a small multiple version of a 2×2 quadrant chart. There may be limited uses for such a chart but Tableau community is a great fan of small multiple charts for visual horizon scanning to compare and contrast patterns in data over dimensions. Since the superstore dataset has 49 states included (no Alaska or Hawaii, but District of Columbia is included), we have a perfect dataset for a 7×7 grid.

One aspect of data visualization we all have been discovering over the years is that when we talk about data visualization we often think that the choice of which graphical representation to use is the most important one to make. However, deciding what to visualize is often equally, if not more, important, than deciding how to visualize it. The goal of this visualization was to engage readers in finding and telling their own stories in the data. Special thanks to Neil Richards for this wonderful creation.

Step 1:

As per the requirement, we need to create a view where we can compare the profit across 4 categories. In addition to that, we should also split out phones vs. other techs while writing a calculation. There are “N” Number of ways you can achieve the same. I tried three ways and thought of sharing with you all.

Connect to the Sample – Superstore data source which you downloaded from Data.world Website.

a) Creating a calculated field by using the “Contains” Function.

b) Creating a calculated Field by using simple IF ElSE condition.

C) You can also Group the Subcategories into 4 Categories.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 2:

Next step is to find the correct order of the 4 categories. You can open Niel’s Workbook and check the order.

 

 

 

 

 

 

 

 

 

 

 

 

Now we need 4 Coordinates to plot these categories. In coordinate geometry, we use two coordinate axes (the X-axis and Y-axis) to identify the location of any point.

We can assign coordinates to any point in a plane by using two number lines that intersect each other at right angles. These two number lines, each of which is called an axis (plural: axes), then divide the plane into four sections, called quadrants. Commonly, the x-axis is the horizontal line and the y-axis is the vertical line.

Let’s Plot  X and Y axis for all our Categories.

In my workbook, I created my 4 categories by using the Sub-Categories so I will assign X and Y Coordinates to my subcategories. Please refer to the below image. You can simply get the X and Y coordinates by using Vlookup.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Once our excel sheet is ready, we can join it with superstore dataset. Please refer the below image.

 

 

Step 3:

Another very critical point which we should check before deriving the X and Y coordinates is a special condition for Profit ratio. We have to ensure that negative profit ratio is expressed as zero. This can easily be achieved by using the below-mentioned calculation.

 

 

 

 

 

 

Now let’s create X and Y coordinates for our categories. We can call our “X” as Width and “Y” as Height.

 

 

 

 

 

 

 

 

 

 

 

 

Step 4:

Our next step is to create a calculated Field which highlights the category with the highest profit and Color for the highlight should match the state’s region.

 

 

 

 

 

 

 

Let’s Validate, whether our calculation is working as expected or not? The below image is showing the Boolean part of the calculation.

 

 

 

 

 

 

 

 

 

 

 

 

Step 5:

For Creating the small multiples 2*2 Quadrant chart for superstore Profit by category, we need to create the column and row dividers.

Column Divider
(index()-1)%(round(sqrt(size())))

Row Divider
int( (index()-1)/(round(sqrt(size()))))

Step 6:

a) From the Measures area of the Data pane, drag Row Divider to Rows and Column Divider to Columns. Convert these two fields into Discrete.

b) Again from the Measures area of the Data pane, drag Height to Rows and Width to Columns.

c) From the Dimensions area of the Data pane, drag State and New Categories to detail Shelf.

d) Compute Row Divider and Column Divider along the “State” and “New categories”.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

e) Remove the Gridlines along with the column and row borders respectively. If you did everything right, your dashboard will look like the below image.

 

 

 

 

 

 

 

 

 

 

The next step is to change the Shape of the marks from “filled Circle” to “Bar”.For filling the width of the bar, we can place  “Something” with negative values on the Size Mark and set it to Fixed. Increased width will change the shape of thin bar to the Square shape.

 

 

 

 

 

 

 

 

 

 

 

 

Step 7:

Drag “Max Profit Ratio” from Dimension Pane to Color Shelf and compute along New categories for each State.

Assign desired color for each region and Gray Color for “NULL” value.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 8:

a) Now our next task is to create a text Label for the highest profit category which is highlighted in colour.

 

 

 

 

 

 

b)Uncheck the header for Row and Column Divider.

c) Add an ad-hoc Calculation “AVG(-0.6)” to Rows Shelf and then Create a Dual axis. Synchronize the two axes so that the numeric scale matches between them.

d) Add “State” to the text label and create a meaningful tooltip. Now, your worksheet should look like the below image.

 

 

 

 

 

 

 

 

 

 

 

Step 9:

The last step is to create a custom legend for the upper right with a larger version of the overall chart. This is the simple part of this challenge.

a) Duplicate the existing sheet and Rename the sheet as “Legend”

b) Add “State” to the filter shelf and uncheck all states except “New York”.

Your legend will look like the below image.

 

 

 

 

 

 

 

 

 

 

Step 10:

Time has come to put everything into the dashboard and arrange it beautifully by adding some meaningful information. Your Final Dashboard should look like the below Image. Hope you enjoy this tutorial.

Related Posts

About the Author: Rajeev Pandey

I am a multidisciplinary designer working in data visualization, interaction design and innovation. Expertise in developing Tableau, Web focus based visualization and reporting applications. I have a passion for analyzing, dissecting, and manipulating data sets as well as, building beautiful dashboard. Naturally talented in communicating between technology and business needs. Diverse and experienced in plenty of different domains .I am quick learner who can absorb new ideas and can communicate clearly and effectively.I love creativity and enjoy experimenting with various technologies.

Leave a comment

You must be logged into post a comment.