In this recipe, we will look at the use of color to convey a message. Since we are looking at dashboarding, we need to know how to use color effectively to make the most of a small space. Here, we will use a box-and-whisker plot to convey a lot of information about the data in a small space, along with additional information on the figures themselves using color.
For the exercises in this recipe, let's start with a fresh Tableau workbook. There are no other requirements for this recipe.
DimProductCategory.csv
file, which is located in the folder where you downloaded the code samples, and click on the Open button to import it into the Tableau workbook.DimSubProductCategory.csv
file from the Files section on the left-hand side to the white canvas.DimProduct.csv
file from the Files section on the left-hand side to the white canvas.FactInternetSales.csv
file from the Files section on the left-hand side to the white canvas.DimDate
table and Order Date Key for the FactInternetSales
table.Chapter Seven
.Ever played with a Rubik's cube? Color is a vital way of understanding and categorizing what we see. We can't order colors in terms of low to high value, for example, red plus yellow gives blue, since people experience colors differently. However, we can use color to tell a story about the data. We can use color to categorize, order, and display quantity.
In this recipe, we chose color to highlight some elements over others, and we used it to convey a message. Red was used to denote smaller values, and blue was used to denote higher values. Red is often seen as a warning color in the West. We reduced the color intensity in the box-and-whisker plot so that the circles could be seen through them. This allows us to add visualizations on top of one another but not occlude one another. The users can click on the box-and-whisker plot to get more detail about the data.
Data visualization is about displaying high-dimensional data on a low-dimensional canvas. Color can help us to distinguish between the dimensions that you want to display. Bright colors pop at us, and light colors recede into the background. We can use color to focus attention on the most relevant parts of the data visualization. This is very important when we are dealing with Big Data sources. We tend to spot things that stand out.
In Tableau, we can see that there are a number of ways to choose colors. Further, we know that a percentage of the population is color blind, so their color perception is reduced. We can choose colors that feel natural, thereby bringing the dashboard closer to the viewer, and they can understand it better. Fortunately, Tableau often helps you to choose the right type of color for the data.
Color choice depends on the numbers that you are trying to represent. If you are looking at ordering data, you can choose a sequential palette. This is where you choose one color to reflect the metric, but the intensity, brightness, or darkness of the color increases as the value increases. You may want to use a sequential palette to represent age, for example, where lighter values represent younger age groups and darker colors represent older age groups.
Alternatively, if you are looking at distinguishing metrics, you could use a diverging palette. For example, the palette could diverge from red right through the spectrum to white and then on to blue. This palette could be used to represent profit and loss. For example, white could represent zero or thereabouts, red could indicate a loss, and blue could indicate profit.
If you are looking at categorizing data, you could use different colors to represent different dimensional attributes. For example, you could use a different color to represent a different country or a different product group.
Picking color isn't easy. We can't say precisely that this color of blue is twice as blue as another shade of blue. However, Tableau does give you a helping hand.