The quadrant analysis is a tool to drive an innovative way of the decision-making process. It is often referred to as a 2X2 matrix and used in a number of cases especially to analyze a certain industry or category in two numeric scales. In this blog, I will use Tableau to create a quick quadrant analysis of Student’s academic performance data to show a comparison of students’ math and reading performance based on different factors.
To begin with, explore the dataset by using Python to see if there are any missing values.
import pandas as pd
import numpy as npdata = pd.read_csv(r"C:\Users\jeeho\Documents\My Tableau Repository\Datasources\StudentsPerformance.csv")
data.head()
data.info()
The data shows a well-cleaned structure already, and it shows no signs of missing values. It seems not necessary to take a step in the data cleaning process that consumes the most time of data analytics projects.
Tableau has a function to save time and effort for the data cleaning process. Since the dataset is already clean, it does not show any change, but it is better to check the “Use Data Interpreter” to see if there can be any improvement.
After selecting data, you can start playing with the data on sheet 1. I chose Writing Score and Math Score and then changed the measure from Sum to Average.
After setting up the row and column, I respectively dragged and dropped Race/Ethnicity, Gender, and StudentsPerformance.csv to Shape, Detail, and Size.
Now, we create parameters to add reference lines on the axis. Click the small black arrow button next to the funnel icon, and select Create Parameter. (If you want to calculate some ratios for the parameters, you can choose to Create Calculated Field for that.)
When create Parameter window pops up, you can change the name as you want, such as Writing Score Parameter. And change the Current Value to the score you want. For this practice, I changed it to 70. When it is done, let’s create another parameter for Math Score.
After creating parameters, right-click the axis and select Add Reference Line. For each axis, the value needs to be selected as the correct value, respectively.
For the Writing Score axis, at the Add Reference Line, Band, or Box Window, Select Writing Score Parameter for the Value. For the Math Score axis, also select Math Score Parameter for the Value.
After that, there will be two lines on the chart. And now, it is time to create a calculated field for colors. Select Create Calculate Field after clicking the arrow button next to the funnel icon.
At the pop-up window, Write the calculation as below. You can name the calculation as whatever you want. In my case, I named it Quadrant Color.
After Clicking Apply and OK, you should be able to see Quadrant Color on the list of measures. Drag and drop it to the color icon in Marks. Then it shows a colored quadrant chart.
When you hover over the values, it shows that females students in Race/Ethnicity Group E have higher scores overall in both Math and Writing.