Interacting with your first data visualization

In this recipe, we will learn about interacting with your first visualization and look at different visualizations that are available to you in Tableau. The Show Me panel provides you with a range of options to create data visualizations. Some of these can be adapted so that they pack a lot of information into a very small space, which is ideal for dashboarding. In this recipe, we will look at creating a bullet chart, which has been designed to retain a balance between packing the maximum amount of information into the minimum amount of space while also retaining clarity.

The bullet chart was devised by a data visualization expert and thought leader, Stephen Few. It is designed to replace charts and graphs that show a lot of ink or take up a lot of space on the page but do not show a lot of data. The bullet graph is effective because it takes up little space and allows the viewer to see whether the actual data is comparable to the target by reading from left to right along the bar. Playing with the colors on the bullet chart is a useful way to understand this useful chart better.

We are using a very simple dataset as a starting point, and we will move towards more complexity in terms of data and visualizations for dashboarding as we proceed throughout the book.

Getting ready

Before we open Tableau, let's download the data from a Google Docs spreadsheet provided by the Guardian Datastore, which is provided by The Guardian newspaper that is published in the UK. You can visit the following link:

http://bit.ly/TableauCh1TargetData.

You may need a Google account to open the spreadsheet. Once you have opened the spreadsheet, you copy the data that you see highlighted in the following screenshot:

Getting ready

Select the table of data as in the preceding screenshot, copy it using Ctrl + C, and then paste it into Tableau. This will import the copied data into the model contained in the Tableau worksheet. Alternatively, you could download the Google spreadsheet as an Excel spreadsheet by navigating to File | Download as | Microsoft Excel (.xlsx). Since we will be changing the original visualization in the Chapter 1 workbook, it is good practice to take a copy of your current visualization and work on the copy. When you work in Tableau, it is very easy to keep clicking around and changing visualizations. However, if you want to roll back to an earlier point, you might find that you've easily clicked away quite far from your preferred point.

In this example, we will work on a copy of the Chapter 1 workbook so we can compare our progress from start to finish quite easily. We will use data from the Guardian Datastore which shows whether countries are on target to meet their environmental targets according to the Kyoto agreement. This is a good preliminary example of dashboard data, because we are displaying the actual versus target data, and this is a common dashboarding scenario.

How to do it...

  1. Once the data is copied into Tableau, the workbook will appear as follows:
    How to do it...
  2. If the years appear as dimensions, then drag them to the Measures pane on the left-hand side.
  3. Our starting point is a table. In our duplicate sheet, go to the Show Me panel at the right-hand side. Select the horizontal bars option. You can see a sample of the Show Me panel in the next screenshot:
    How to do it...
  4. Once you have selected the horizontal bars option, your screen will look like the following screenshot:
    How to do it...
  5. We are interested in the target data. To show the scenario of comparing actual data with target data, remove all of the green pills from the Columns shelf, except SUM(2010) and SUM(2020 Target).
  6. Once these columns have been removed, the Show Me panel will show more options. We will choose the bullet graphs option, which is highlighted with a blue box in the following screenshot:
    How to do it...
  7. Once the bullet graphs option has been clicked on, look for the small icon that looks like a horizontal bar chart on the taskbar. You will find it below the menu items. When you wave the mouse over it, you will see that it is a tooltip that says Sort Country Descending by 2012. It is circled in the following screenshot:
    How to do it...
  8. The result can be seen in the next screenshot, which shows rows of bullet charts:
    How to do it...
  9. This is still a lot of data to show on a dashboard and still be sure that the data consumer is able to remember and understand it quickly. The idea is that the thick horizontal line displays the actual data and the vertical line on each row displays the target. We can resize it so that the rows are smaller in height. To do this, you can resize by grabbing the bottom of the white canvas and pulling it upwards. This will make the data visualization smaller.
  10. We could filter this further in order to show the top five countries who have the greatest share of renewable energy sources in 2010. To do this, drag the Country dimension from the left-hand side of the Tableau workbook to the Filter panel located just above the Marks panel. The following wizard will appear:
    How to do it...
  11. Select the Top tab and select the By Field radio button.
  12. Then, put the number 5 into the textbox and select the 2010 column from the drop-down list.
  13. Click on OK to clear the Filter wizard.
  14. Then, right-click on Country in the visualization and select the option Hide Field Labels for Rows, as shown in the following screenshot. This will remove unnecessary ink from the screen, which means that there are fewer unnecessary items to distract the viewer.
    How to do it...
  15. Once this is done, resize the visualization so that it is only a few inches in length. To do this, go to the right-hand side of the visualization and drag the end along to the desired size. The data visualization now looks like the following screenshot:
    How to do it...

How it works…

Copying and pasting the data into Tableau is a great way of importing data quickly. Note, however, that this data is static and will not change with any changes in the data source.

There's more…

Removing unnecessary ink from the screen is a useful way of cutting down the items displayed on the dashboard. In this example, the label was redundant and its removal made the graphic neater.

If you require more information on the bullet chart, please visit the following link:

http://bit.ly/BulletGraphbyStephenFew

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

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