Choosing your visualization

Visualization is about democratizing the data and making it accessible to the people who need to know.

Today, there are many hot trends in both consumer and enterprise technology that increase accessibility by being highly visual. Think of the popularity of iPads, Surfaces, eReaders, and large screens. Everyone wants their data in the best resolution possible, with crisp graphics and colors.

Executives are engaging with the charm of visualization and putting it firmly onto enterprise business intelligence roadmaps. According to a survey by Howard Dresner, the extensive use of color, size, shape, and motion were more appealing than other buzzwords such as Big Data and the cloud. A study by Dresner Advisory Services found that advanced visualization and dashboards ranked high in terms of importance.

Why is visualization so useful? It's more than pretty pictures. Data visualization helps us to understand meaning in data via a communication medium that we are "geared" towards every day—our vision. Through discrimination and effectiveness of data visualizations, we reach insights and decisions. Technology allows us to create magic with our data, which engages us towards better decision making.

Given its power, how do we choose which is the right visualization? Throughout this book, we will talk about different visualization choices as we proceed. Because we are looking at dashboarding, we will look at dashboarding features such as KPIs.

In this recipe, we will look at different considerations when choosing your visualization. We will look at some of the default settings of Tableau and how they are affected by color blindness. We will also look at sparklines, which aim to provide as much context in as small a space as possible. This will be very useful in creating dashboards.

Getting ready

For the exercises in this chapter, take a copy of the Chapter 4 workbook and name it Chapter 5. This workbook already has the data for the exercises in this chapter, so we do not need to make any changes to the data. We will delete all of the sheets except the KPI by Q sheet. The following is an example of how the workbook will look:

Getting ready

How to do it...

  1. To start, let's rename the worksheet to KPI Summary by right-clicking on the tab at the bottom of the worksheet and selecting Rename Sheet.
  2. Drag SalesTerritoryCountry to the Rows shelf.
  3. Drag Difference between Actual and Target to the canvas area.
  4. The boxes will appear colored, but you won't see any text. Drag Difference between Actual and Target to the Label button.
  5. Drag SalesTerritoryCountry to the Label button.
  6. Click on the Label button and then click on the button with ellipses next to Text.
  7. In the Edit Label textbox, use the Insert drop-down box to choose the field names that should be displayed. This will read as follows:
    <SalesTerritoryCountry> <AGG(Difference between Actual and Target)>
  8. Click on OK.
  9. Let's duplicate the worksheet by right-clicking on the tab at the bottom and selecting Rename Sheet.
  10. Rename the duplicated worksheet to KPI by Q.
  11. Drag Year(FullDateAlternateKey) to the Columns worksheet.
  12. We will start by creating a very simple KPI at first using the KPI by Q worksheet. To do this, we will create a new calculated field by going to the Analysis menu item and selecting the Create Calculated Field… option.
  13. In the Calculated Field textbox, enter the following formula which you can see here:
    IF [Difference between Actual and Target] > 0 THEN "Above"
    ELSEIF [Difference between Actual and Target] <= 0 THEN "Below"
    ELSE "Not Known"
    END
  14. The following screenshot shows you an example:
    How to do it...
  15. Once you've created your calculation and returned to the main Tableau canvas, you'll see that there are five buttons in the Marks shelf. We can add a sixth button, Shape. To do that, go to the drop-down list below Marks and select Shape. You can see an example in the following screenshot:
    How to do it...
  16. When you select Shape, you can see that we now have a sixth button called Shape. Your screen should now show the Shape button, as you can see in the following screenshot:
    How to do it...
  17. You can then click on the Shape button to edit the shape's style and appearance. Drag the Difference between Actual and Target calculation onto the Shape button.
  18. When you click on the Shape button, you get a dialog box that offers you a number of options. Let's choose the Edit Shape option, which brings up the following dialog box:
    How to do it...
  19. Here, we have selected the default KPI palette. A more traditional KPI selection selects the green tick for the Above option, which identifies the metrics that exceed the KPI success criteria. It follows that the Below option is indicated by a red cross. Finally, the Not Known criteria identifies the areas where there is no value present; in other words, it is a NULL value.
  20. Remove the color marks from the Marks shelf. At this point, you will probably have AGG(Difference between Actual and Target) as a color mark, but this will prevent the KPI shape from working properly.
  21. Remove the Label marks from the Marks shelf.
  22. Drag Action(SalesTerritoryCountry) from the Sets pane in the Data sidebar to the Filters shelf. On the downward arrow at the right-hand side of the Action(SalesTerritoryCountry) pill, select Show In/Out of Set.
  23. On the dialog box, select In and then select OK.
  24. Once you have selected this option, click on OK. Once you have done this, the visualization will appear as in the following screenshot:
    How to do it...
  25. Although we have created a KPI image, we would like to change it in order to cater to people who have color blindness. How can we show a KPI so that color blindness is taken into account?
  26. Let's take a look and see what Tableau does when we try to create a sparkline. To do this, duplicate the existing visualization so that we have a "point in time" of our work to date.
  27. Make sure that the SalesTerritoryCountry attribute is in the Rows shelf. Then, drag the Difference Between Actual and Target calculation to the Rows shelf.
  28. Select a line graph visualization from the Show Me panel. Make sure that the SalesTerritoryCountry attribute is in the Rows shelf.
  29. Drag the Difference Between Actual and Target calculation to the Color button.
  30. The Tableau visualization appears as follows:
    How to do it...
  31. This still leaves us with the problem of showing data that isn't there—in other words, the NULL data. While we are building up to a sparkline, it can look misleading because the data looks as if it starts from 0 and curves upwards; in fact, there isn't any data there for the highlighted marks, which you can see in the following screenshot. We can opt to Hide the Not Known data.
    How to do it...
  32. First things first, however, let's fix the colors so that they are more appealing. To do this, click on the AGG (Difference between Actual and Target) metric and select the Edit Colors… option, as shown in the following screenshot:
    How to do it...
  33. Since we have hidden the Not Known data, we only have the Above and Below data to worry about. For now, let's choose blue for the Above value and gray for the Below value. You can see a sample selection in the following screenshot:
    How to do it...
  34. Now let's see how the completed visualization looks once we have resized it, as shown in the following screenshot:
    How to do it...

To summarize, in this recipe, we have started to look at some dashboard visualizations. We will progress to look at others throughout the rest of the chapter.

How it works...

In this recipe, we have looked at some of the default settings in Tableau for creating KPIs along with some options for configuring them. It is clear that we can drastically change the appearance of the visualization by simply making a few changes to the default settings.

When creating data visualizations, it is vital to remember the audience. This may seem a simple, obvious statement. However, how many charts have you seen that mix red and green together? A lot, probably! In this recipe, we looked at alternatives to using red and green to convey a message. Here, we have made a color choice based on the business question. We went from a straight red-and-green visualization to one which used blue to represent the data which was the focus of the business question. There are a few issues with our initial KPI though. First, a NULL value is represented by an icon when there is no data. It would be better to simply not show anything at all; this would reduce unnecessary "ink" on the page and would require less effort to assimilate.

Another issue is that the image shows red and green on the same visualization, which isn't good for color-blind viewers. Although additional information is provided by the shape of the indicator, it's probably best to simply avoid it if possible. At that point, we could have created only a simple, red KPI to denote the data points where the target was not met and then moved on to a different topic.

Instead, we then changed from using a shape to represent the data to a sparkline. Sparklines were devised by Edward Tufte in order to express a "small, intense, simple, word-sized graphic" to represent data. Sparklines are supposed to be able to be embedded into sentences. They are used to express data in a very compressed, at-a-glance way, which means that they are perfect for dashboards.

There's more...

Red and green KPIs are popular, but they are not always the best solution. Sparklines can give us more context by providing more information over time, but this can be misleading in certain cases. In the next recipe, we will look at ways in which we can improve the sparkline to manage this scenario.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset