What is the Tableau box and whisker plot?
Tableau box and whisker plot, also known as box plot, is a data visualization tool for displaying the data distribution along an axis. The boxes in the Tableau box and whisker plot indicate the middle 50% of the data, i.e., the middle two quartiles of the distribution of values. The box plot also includes whiskers, which are configured lines for displaying all the data points that fall within 1.5 times the IQR (Interquartile range). It means that all the data points fall within 1.5 times the width of the adjoining box or the maximum extent of the data.
A typical Tableau box and whisker plot is shown below. If you notice, it contains a box plot along with whiskers.
Table of contents
Key Takeaways
- Tableau box and whisker plot display the data distribution along an axis.
- These charts contain box plots that indicate the middle 50% of the data and whiskers, which are configured lines for displaying all the data points falling within 1.5 times the IQR (Interquartile range).
- Tableau provides box and whisker plot chart type under Show me in the toolbar.
- Consider the pros and cons of the Tableau box and Whisker plot chart before you recommend using them for your data visualization.
- You may refer to the Tableau community or documentation to get information about the Tableau box and whisker plot explained.
How to read a box plot?
A box plot contains the below information.
- The bottom line represents the 1st quartile, i.e., 25% of the total data values fall below this point.
- The top line represents the 3rd quartile, i.e., 75% of the total data values fall below this point.
- The median line represents the 2nd quartile, i.e., 50% of the total data values fall below this point.
- Whiskers represent the configured line for displaying all the data points falling within 1.5 times the IQR.
- Outliers represent the data values that fall beyond the whiskers.
- The box represents the IQR ranging from the 1st quartile to thew 3rd quartile.
How to create a box and whisker plot in Tableau?
To create a box and whisker plot in Tableau, follow the instructions outlined below:
Step 1: Connect with your dataset using the File – Open functionality in Tableau and click on the New Worksheet icon to open a new worksheet.
Step 2: Drag Dimensions (Category and Region) and Measure (Quantity) to Columns and Rows section, respectively.
Step 3: In the toolbar, click on Show Me and choose box-and-whisker plot chart type.
You will see the box plot in Tableau.
Step 4: Drag Region from the Marks card back to Columns to the right of Segment.
Step 5: Click on Analysis – Aggregate Measures.
Now, You can view a range of marks, one for each record in your dataset, instead of a single mark for each column in the view.
Step 6: Click on the Swap Rows and Columns icon to swap the axes.
It will change the flow from left to right, as shown below.
Step 7: Right-click on the Quantity axis i.e. the bottom axis and select the Edit Reference Line option from the context menu.
Step 8: On the Edit Reference Line, Band, or Box window, click on Box Plot and choose the color under the Fill section.
Now, your Tableau Box and whisker plot is ready for viewing.
Note: If you notice Tableau box and whisker plot jitter, you may consider adjusting the size of the data points as a workaround as Tableau doesn’t provide any in-built option to deal with this issue.
Examples
In this section, we will go through different examples demonstrating the Tableau Box and whisker plot.
Example #1
In this example, we will create a Tableau box and whisker plot using the Global Data Science Salaries dataset. The Global Data Science Salaries dataset contains the salary details of data scientists globally across different employment types, job designations, experience categories, and company sizes.
To create a Tableau box and whisker chart, follow the instructions below:
Step 1: Navigate to the Data Source tab. Click on File 🡪 Open. Select the dataset from your system using the File Navigator to import the Global Data Science Salaries dataset into Tableau.
Step 2: Click on the New Worksheet icon and navigate to a new worksheet.
Step 3: In the new worksheet, drag Salary in USD (Measure) and Employment Type and Experience Category (Dimensions) to the Columns and Rows section, respectively. Tableau will create a horizontal chart, as shown below.
Step 4: Click on Show Me in the toolbar and choose box-and-whisker plot chart type.
Tableau will display a box plot based on the selected dataset as shown below.
Step 5: Click on the Swap Rows and Columns icon to swap the axes.
Now, your box plot flows from left to right.
Step 6: Right-click on the bottom axis (Salary in USD) and choose the Edit Reference Line option.
Step 7: In the Edit Reference Line, Band, or Box dialog box, choose a color theme from the Fill drop-down list.
Now you can see the Tableau box and whisker plot in the view.
As you can see, the salary is highest for FTEs in EX and SE experience levels, whereas it’s lowest for PTEs in EN and MI categories.
Example #2
In this example, we will demonstrate creating another Tableau box and whisker plot using the Puma Sales Database dataset. The Puma Sales Database dataset contains the Sales details across different Puma stores, online, and outlets across different US cities, along with unit economics.
To create a Tableau box and whisker plot, follow the step-by-step instructions below:
Step 1: Connect to the Puma Sales Database dataset using the File – Open feature in Tableau. Once the file is successfully imported, you shall be able to view it in the Data Source tab.
Step 2: In a new worksheet, drag Operating Margin (Measure) to Columns and Product and Region (Dimensions) to the Rows section.
Step 3: Click Show Me in the toolbar, then select the box-and-whisker plot chart type.
A box plot will be displayed in the view.
Step 4: Drag Region from the Marks card back to Columns to the right of Segment.
The horizontal lines you see here are the flattened box plots that are based on a single mark in the view.
Step 5: Navigate to the Analysis – Aggregate Measures to remove the aggregation.
Now, instead of a single mark for each column in the view, you will notice a range of marks, one for each row in your data source.
Step 6: Now click on the Swap icon to swap rows and columns.
The box plot is now changed to horizontal, i.e., from left to right.
Step 7: Right-click the bottom axis, i.e., Operating Margin, and select Edit Reference Line.
Step 8: In the Edit Reference Line, Band, or Box dialog box, choose a color from the available list of colors in the Fill drop-down list.
Now, you can view the Tableau box and whisker plot shown below.
As you can see, majority of the regions have an Operating margin falling between 35% and 40%. Women’s Apparel product in the South region has the highest Operating margin whereas the same in the West has the lowest Operating margin.
Example #3
In this example, we will create a Tableau box and whisker plot using the Overall skill performance dataset. The Overall skill performance contains the data comprising the Gender, Category, Parent Education level, and marks scored by the different categories of students in various skills.
To create a Tableau box and whisker chart, follow the steps outlined below:
Step 1: Connect to the Overall skill performance dataset in Tableau using the File Navigator.
Step 2: In the new worksheet, right-click on the Data pane and select Create Calculated Field.
Step 3: In the Calculated Field window, specify the logic for the measure. Click on OK.
Total Score = [Reading Score]+[Speaking Score]+[Writing Score]
You can view the newly created calculated field in the Data pane.
Step 4: Drag the Total Score (Measure) to the Columns and Category and Gender (Dimensions) to the Rows section.
Step 5: Click Show Me in the toolbar, then select the box-and-whisker plot chart type.
It will create a box and whisker plot, as shown below.
Step 6: Drag Category from the Marks card back to Columns, to the right of Gender.
Step 7: Navigate to Analysis – Aggregate Measures.
Now, you will see a range of marks in the view.
Step 8: Now, click on the Swap button to swap the axes.
It will create a horizontal box and whisker plot in the view.
Step 9: Right-click on the bottom axis and select the Edit Reference Line.
Step 10: Choose a color from the Fill drop-down.
Step 11: Drag the Gender dimension and place it next to the Category.
Now you can see the Tableau box and whisker chart is ready for visualization. Type E category students have performed better than other categories.
Important Things to Note
- Tableau box and whisker plots are practical tools for viewing a data distribution but may not be ideal for detailed information.
- This plot contains statistical information and requires a thorough understanding of these concepts, such as quartile, median, etc, for accurate interpretation
- Any outliers in the plot may require additional analysis to understand the data distribution
- Consider using the Tableau box and whisker plot tooltip to the box plot to provide meaningful insights on the chart.
- If your Tableau box and whisker plot not working, ensure the data is appropriately handled especially the null or missing values, and refer to the Tableau documentation for any assistance.
Frequently Asked Questions (FAQs)
To analyze multiple groups or categories using Box and Whisker plots in Tableau, follow the instructions below:
• Drag the categorical attribute to the Columns and Measure to the Rows section.
• Select the Box and Whisker plot chart type from Show Me in the toolbar.
To add additional layers or data to a Box and Whisker plot in Tableau:
• Drag additional attributes to the Columns section next to the existing Dimension or categorical attribute.
• Customize the chart by adding the color codes and adjusting the size.
Yes, you can apply data drill down by selecting the plot and choosing options such as View Data or Explain Data. Similarly, to apply the filter, drag the attribute on which you want to apply a filter to the Filters shelf.
Yes, you can create animated Box and Whisker plots in Tableau. To apply animation, navigate to Format – Animations and Specify the details in the Animations pane.
You can handle skewed or asymmetric distributions in a Box and Whisker plot by following the options below:
• Consider applying data transformation or statistical methods to data normalization
• Adjust the reference line or whiskers.
• Handle the data quality issues.
Recommended Articles
This has been a guide to What Is Tableau box and whisker plot. Here we explain how to create and read the box & whisker plot graph with examples and points to remember. You can learn more from the following articles –
Leave a Reply