70,79 €
Illustrate your data in a more interactive way by implementing data visualization principles and creating visual stories using Tableau
Data scientists who have just started using Tableau and want to build on the skills using practical examples. Familiarity with previous versions of Tableau will be helpful, but not necessary.
With increasing interest for data visualization in the media, businesses are looking to create effective dashboards that engage as well as communicate the truth of data. Tableau makes data accessible to everyone, and is a great way of sharing enterprise dashboards across the business. Tableau is a revolutionary toolkit that lets you simply and effectively create high-quality data visualizations.
This course starts with making you familiar with its features and enable you to develop and enhance your dashboard skills, starting with an overview of what dashboard is, followed by how you can collect data using various mathematical formulas. Next, you'll learn to filter and group data, as well as how to use various functions to present the data in an appealing and accurate way.
In the first module, you will learn how to use the key advanced string functions to play with data and images. You will be walked through the various features of Tableau including dual axes, scatterplot matrices, heat maps, and sizing.In the second module, you'll start with getting your data into Tableau, move onto generating progressively complex graphics, and end with the finishing touches and packaging your work for distribution. This module is filled with practical examples to help you create filled maps, use custom markers, add slider selectors, and create dashboards. You will learn how to manipulate data in various ways by applying various filters, logic, and calculating various aggregate measures. Finally, in the third module, you learn about Tableau Public using which allows readers to explore data associations in multiple-sourced public data, and uses state-of-the-art dashboard and chart graphics to immerse the users in an interactive experience. In this module, the readers can quickly gain confidence in understanding and expanding their visualization, creation knowledge, and quickly create interesting, interactive data visualizations to bring a richness and vibrancy to complex articles.
The course provides a great overview for beginner to intermediate Tableau users, and covers the creation of data visualizations of varying complexities.
The approach will be a combined perspective, wherein we start by performing some basic recipes and move on to some advanced ones. Finally, we perform some advanced analytics and create appealing and insightful data stories using Tableau Public in a step-by-step manner.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 638
Veröffentlichungsjahr: 2016
Illustrate your data in a more interactive way by implementing data visualization principles and creating visual stories using Tableau
A course in three modules
BIRMINGHAM - MUMBAI
Copyright © 2016 Packt Publishing
All rights reserved. No part of this course may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this course to ensure the accuracy of the information presented. However, the information contained in this course is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this course.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this course by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Published on: August 2016
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN: 978-1-78712-419-6
www.packtpub.com
Authors
Jen Stirrup
Ashutosh Nandeshwar
Ashley Ohmann
Matt Floyd
Reviewers
Shweta Savale
Darwin Witt
Victor Blær
Mohanganeesh Dorairaj
Joshua N. Milligan
Content Development Editor
Abhishek Jadhav
Graphics
Kirk D'Phena
Production Coordinator
Shantanu N. Zagade
With increasing interest for data visualization across the media, businesses are looking to design constructive dashboards that captivate the interest as well as liaise data. Tableau makes data available to everyone, and is a great way of dispensing enterprise dashboards across the business. Tableau is an extensive toolkit that lets you create high quality data visualizations effectively.
Module 1, Tableau Dashboard, introduces you to the theory and practice of delivering dashboards using Tableau through a step-by-step process of creating the building blocks of a dashboard. We then proceed towards the designing principles of putting the dashboard items together. You will learn how to summarize data as a way of conveying key messages on your dashboard along with the introduction to calculations. This module will facilitate structured investigation of data using guided analysis in Tableau. We will also focus on the graphical presentation of data using sparklines, KPIs, maps, and so on. Towards the end of the module, we will look at theming and adding more details to the dashboard by providing examples of more advanced features of Tableau.
Module 2, Data Visualization with Tableau, acquaints you with Tableau's user interface and creates perspicacious visualizations. In this module we start off by connecting various data sources, including text, Excel, as well as data sources on a Server. We move on further to create univariate, bivariate, and multivariate charts. This module will also help you create maps by setting geographic variables, placing markers, and overlaying demographic data. We will create new fields using predefined functions, calculate percentages, apply the if-then logic, discretize and aggregate data, manipulate text, and so on. You will be able to modify visualizations by adding information, changing the default marker size and shape settings. Finally, we not only learn to export images and data from the workbook and share them on the Web, but we also explore some of the advanced features of Tableau, such as customizing marker shapes, adding various selectors, and creating animated visualizations.
Module 3, Creating data stories with Tableau Public, provides guidelines on how to pursue an enthralling, rich story with data that will enlighten others. By the end of this module, we will create an ideal example of a dashboard that focuses on an issue that impacts everyone. We begin with an overview of the functions of Tableau Public along with its installation. Furthermore, you will be familiarized with various features in Tableau Public, such as cards, shelves, and ShowMe. This module will teach you how to format source data and explain some basic data modeling, such as Dimensions, Measures, and Joins. Topics such as Visualization, Calculation and Dashboard designing, which are studied in the previous modules, will be covered in detail. Finally, the module will explain how to build filters with their use in dashboards and familiarize you with the various methods to embed data visualization in blog posts, websites, and offline documents
You need the following in order to work with Tableau:
Users only need to download the Tableau Public client. The technical specifications for Tableau Public mirror those of Tableau Desktop Personal and are listed on the Tableau website at http://www.tableau.com/products/desktop. According to Tableau system requirements, PC users require the following minimum specifications:
Data scientists who have just started using Tableau and want to build on the skills using practical examples. Familiarity with previous versions of Tableau will be helpful, but not necessary.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
You can download the code files by following these steps:
You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Tableau-Creating-Interactive-Data-Visualizations. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.
Tableau Dashboard
Over 40 recipes for designing professional dashboards by implementing data visualization techniques
In this chapter, we will cover:
This chapter starts with you being a Tableau beginner, then quickly moves you forward to creating your own visualizations and explains how to interact with the Tableau sample dashboards—how to find, open, and interact with them.
We can create visualizations by using Tableau in order to produce meaningful dashboards that communicate clearly. The six recipes in this chapter will explain how we can get up to speed with Tableau very quickly in order to produce dashboards that facilitate and expedite the decision-making process for strategic decision makers and operational team members within your organization.
For this book, we will be using version 8.1 to work with Tableau.
The following definition has been taken from the Intelligent Enterprise magazine's March 2004 issue:
A dashboard is a visual display of the most important information needed to achieve one or more objectives; consolidated and arranged on a single screen so the information can be monitored at a glance.
--Stephen FewFor an enterprise, a dashboard is a visual tool to help team members throughout the ranks of the organization to track, monitor, and analyze the information about the organization in order to make decisions to support its current and future prosperity. In this recipe, we will interact with Tableau's sample dashboards, which are constructed from worksheets. People often learn by example, and this is a straightforward way of inspiring you with dashboard samples while also learning about Tableau.
What do dashboards help you to do?
Dashboards help key team members to gain insights and discern the health of the organization very quickly. Tracking, monitoring, and analyzing the organization's data is an essential part of making accurate decisions.
Tableau provides a number of example dashboards, both online and as part of the Tableau Desktop installation. We will find, open, and interact with sample Tableau dashboards.
We can also use the example dashboards as a basis to make our own dashboards. They can form a source of inspiration to make your own compelling visualizations. For the purpose of this recipe, we will focus on the sample Sales workbook.
A key feature of dashboards is that they are interactive. There are different types of dashboards, and some references are included at the end of this recipe. A key feature of dashboards is their interactivity. Dashboards are not simply a set of reports on a page; they should tell a story about the business when they are put together. They should answer a clear business question. In order to facilitate the decision-making process, interactivity is an important part of assisting the decision-maker to get to the heart of the analysis as quickly as possible.
Fortunately, it is straightforward to interact with a dashboard that has been implemented in Tableau.
We will perform the following steps to see how we can interact with a dashboard:
When you click on the middle item, denoted as % quota descending, you can see that the horizontal bar charts in the main area of the dashboard change very quickly in response to the user interaction. The dashboard now looks quite different from the previous Tableau example, where the bars were sorted by Names. The rapidity of the change means that decision makers can "think as they click" in order to focus on their analysis.
There are a number of different ways in which Tableau can offer useful interactivity for dashboards. For example, we can include sliders, filtering by color, moving from dashboard to dashboard, radio buttons, drop-down lists, and timelines. For example, another interesting feature is that users can enter values into parameters in order to see the impact of their activity. A parameter is a dynamic value that responds to user input. In this example, we use it to filter the data by replacing constant values in calculations. We use the following steps to view the interactivity:
In the previous screenshot, note that the colors of the Estimated Results with These Assumptions bars have changed so that all of them now show red or yellow. The green bars have disappeared. This gives a visual cue that the estimated results have changed considerably for the worse after we made changes to the filter. We can also see this due to the presence of the target line, which shows whether the individual met his/her target or not. The following screenshot depicts this:
Tableau gives you a series of sample dashboards as part of the installation. You can also see more samples online. Some samples are provided by Tableau team members, and you can also visit the Tableau website for samples submitted by keen data visualization fans from around the world. These samples can help to inspire your own work.
In this topic, we compared the changes on a dashboard in order to see how Tableau responded to changes. We noted that the color has changed along with the values. The dashboard provides quick feedback that the values do not change favorably for the new quotes, commissions, and base salary. When decision makers are interacting with dashboards, they are expecting quick-as-a-flash responsiveness from the dashboard, and the sample Tableau dashboards meet this expectation well.
Tableau offers a number of sample dashboards on its website, and it is worthwhile to check the site for ideas and brainstorming for your own dashboards. Please take a look at www.tableausoftware.com for examples. If you are interested in dashboard theory in general, then you can look at the following references:
Dashboards rely on the power of visualization in order to let people see the message of the data to make effective decisions. How can you show the power of a dashboard when compared to a crosstab table?
In this recipe, we will see how a data visualization can have more impact than a straightforward crosstab. We will make a crosstab table in Tableau and then turn it into a data visualization to see the impact in action!
Understanding your data is an essential part of data visualization, regardless of the technology you are using. Tableau can help you to understand your data by automatically distinguishing between measures and dimensions. How do you know which are which? Look at the title of a report or dashboard. For example, if a dashboard is called Sales by Country, then anything that comes after the by word is a dimension and the item being counted is a measure. Dimensions and measures are explained as follows:
In this recipe, we will look at the difference between a plain table and a graphical representation of the data. While tables are data visualizations in themselves, Tableau's power lies in its ability to visualize data graphically and quickly. This recipe will demonstrate the ease of going from a table to a picture of the data. We will create a map, and the color intensity of the map coloring reflects the value.
Let's start by opening up Tableau to get ready for your first visualization.
We will need to get some data. To obtain some sample, download the Unicef Report Card spreadsheet from the following link: http://bit.ly/TableauDashboardChapter11Unicef
It will have the following columns:
The following points describe the different panels in Tableau:
The following steps can be performed to create a quick visualization:
For the purposes of this recipe, we will choose a map visualization.
Using the Afterworksheet, click on the first Measures column called Average ranking position_(for all 6 dimensions) to select it. Right-click on the column and choose Keep Only. This excludes the rest of our measures, retaining only this column. The result can be seen in the following screenshot:When we exclude the other options, the Show Me toolkit changes in response to the amendments that have been made in the data table. Now, the map options are available to us. The Show Me toolkit changes can be seen in the following screenshot:When we select the filled maps option, which is bordered with a heavy line at the top right-hand side row, our screen now changes to look like a filled map, in which each color corresponds to the average rank of each country. An example is shown in the following screenshot:
We have Denmark ranked as 7 and the United Kingdom is ranked at 18. Denmark is considered as having a higher ranking, even though it has a lower number.
The Edit Colors dialog box appears. An example can be found in the next screenshot:
Using the square box, you can change the color. Here, it has been changed to blue. The important item to note here is the Reversed option. This option allows us to reverse the color so that lower numeric values are represented by higher intensities. When we click on Ok, we get the final result as shown in the following screenshot:The Show Me toolkit takes the guesswork out of what data visualization tool to choose by offering you a selection of visualizations that are based on your data types.
The Show Me button helps you to choose which data visualization is most suited to your data. It does this using an in-built, intelligent, knowledge-based system that is part of Tableau. This helps to take the guesswork out of selecting a data visualization, which can often be a contentious issue among data consumers and business intelligence professionals alike.
Data visualization is telling a story; the value is depicted by a corresponding color intensity. This example topic involved ranking data. Therefore, the higher the number, the lower the value actually is. Here, the value refers to the country rank.
How can we make the message clearer to the users? When we visualize the data in a map, we can still use color in order to convey the message. Generally speaking, we assume that the brighter or more intense a color is, then the higher the value. In this case, we need to adapt the visualization so that the color is brighter in accordance with the rank, not the perceived integer.
Color theory is a topic in itself, and you will see practical applications as we proceed throughout this book. For further references, please see the See also section.
In the previous recipe, we inserted data into the Tableau workbook by simply copying and pasting. In the real world, however, we need to be able to connect to different data sources that may contain large amounts of data.
We will now look at connecting to multiple data sources at a time. This is a useful way of enriching our data. We have access to multiple data sources. We can open up Tableau and connect numerous data sources.
First, we will see how we can connect to the Windows Azure Datamarket cloud data source, and then continue to connect to the local Excel file. Windows Azure Marketplace is an online market to buy and sell finished Software as a Service (SaaS) applications and premium data. Some data on Windows Azure Datamarket is free. We will be using one of the free data samples, which will give us a lot of information about individual countries, such as the country code, population, size, and so on. In data warehousing terminology, this data can be considered as a dimension, which is another way of describing data. In this definition, it is a field that can be considered an independent variable, regardless of the datatype. Tableau has a more specific definition of a dimension. Tableau treats any field containing qualitative, categorical information as a dimension, such as a date or a text field.
To connect the online data and local data, we will connect to Windows Azure Datamarket using OData, which is a standardized protocol to provide Create, Read, Update, Delete (CRUD) access to a data source via a website. It is the data API for Microsoft Azure, but other organizations use it as well, such as eBay, SAP, and IBM.
Before you start, you need to create a folder where you can download data to run through the examples. You should pick a folder name that is meaningful for you. Also, be sure to select a location that has plenty of space. In this example, we will use the following location to store data: D:\Data\TableauCookbook. For the example in this chapter, we will create a folder called Chapter 1.
https://datamarket.azure.com/dataset/oh22is/countrycodes#schema
About half way down the page, look for the Sign Up button and click on it.This will take you to a terms and conditions page. After you've read the terms and conditions, and, if you agree with them, tick the box to specify that you agree and click on Sign Up.This will take you to a Thank You page. Look for the EXPLORE THIS DATASET link on this page and click on it, as shown in the following screenshot:When you click on EXPLORE THIS DATASET, you will be able to see the data appear in the browser, which you can slice and dice. Here is an example screenshot:In this example, we will load the data in Tableau rather than in the Data Explorer URL. To do this, we need the primary account key. In Windows Azure Datamarket, this is easy to obtain. From the previous example, we can see a feature called Primary Account Key. If you click on the Show link next to Primary Account Key, then your primary account key will appear.Copy the primary account key to your clipboard by selecting it and pressing the CTRL + C keys. You will need the primary account key to access the data using Tableau.You will also need to get the OData feed for the Country Codes data of the Windows Azure Datamarket Country Codes store. To get the OData feed, you can see it under the sentence URL for current expressed query, and you should copy this information.Before you proceed, you should note the OData URL and the primary account key. Select them and press the CTRL + C keys simultaneously. The following table shows an example of how your data might look:OData URL
https://api.datamarket.azure.com/oh22is/CountryCodes/v1/CountryCodes
Primary account key
Aaa0aaAa0aAa00AAaAAA0aaA0AaaOa0aAaeAaA1AAA
http://data.worldbank.org/indicator/NY.GNP.PCAP.CD?page=1
To do this, open an Internet browser and navigate to the URL. You can see the web page in the following screenshot:You will see a button called DOWNLOAD DATA, which is on the right-hand side.Click on this button and you will be presented with two options: EXCEL and XML. We will download all of the data in Excel format.Before accessing the data source, let's save the file into the directory that you created earlier.Once the file is saved, open it in Excel and take a look. If you don't see any data, don't be alarmed.You will see that there are three sheets and the workbook may open on Sheet 2. This will only provide metadata about the data held in the worksheet, and we need to look at Sheet 1. Then, we'll perform the following steps:
Tableau connects to each data source and talks to it using drivers that are specific to each datatype. For example, Tableau has some connectors to popular programs, such as R, Google Analytics, and Salesforce.
You can find more information about drivers on the Tableau website at the following link:
http://www.tableausoftware.com/support/drivers
Tableau will connect to each data source independently. Even though they are different types of data sources, they appear to look the same in Tableau. From the user perspective, this is very useful since they should not be distracted by the differences in the underlying data source technologies. This means that the user can focus on the data rather than trying to put the data into one data source. Further more, it means that the sources of data can be refreshed easily because the Tableau visualization designer is able to connect directly to the source, which means that the data visualization will always be up to date.
In this recipe, we will look at the components of the Tableau interface and use these features in order to create a simple Tableau visualization. In the previous recipe, we connected to data in Windows Azure Datamarket and a local Excel spreadsheet. We will use these data sources in our example here in order to produce a quick and easy data visualization.
Make sure that you have a copy of the Chapter 1 Tableau data visualization open. You should be able to access both data sources. To do this, click on the Tableau Data connection that you will see in the top left-hand corner of the Tableau interface, as shown in the following screenshot:
You should be able to click on the CountryCodes and the GNI connections alternately, and see the differences in the dimensions and metrics contained in the two data sources.
Once you've sorted the data, it will look neater and easier to understand. We can see this in the following screenshot:
One of Tableau's features is that it works out automatically whether the data is a dimension or a measure. Tableau does this by looking at the datatype in the columns. So, for example, in this case, it has identified text and geographical types as dimensions and integers as measures.
You may be wondering why we have data that has a year for each column rather than a column Year. This is a good question to ask, and we will look at different ways of shaping the data and how that affects the resulting visualization throughout the course of this book.
Tableau has an internal knowledge base that it uses in order to determine the most appropriate visualization for the data that it sees. Initially, in this case, it has suggested a horizontal bar chart in blue. Why is this the case?
We have a horizontal bar chart rather than vertical because we can read more easily along rather than up and down. For people in the West, we tend to read left to right, so we see the country name on the left followed by the bar and the value on the right.
By having horizontal bars, it is easy to see how the bars compare within the chart itself. We have the visual information from the bar itself as well as the metrics labelled at the end of the bar.
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.
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:
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.
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.
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
In the first recipe, we specified communication as one of the key features of a dashboard. We need to be able to share the information to the right audience at the right time, to the right people in the right format.
Tableau offers a number of different ways to share the dashboard in order to help team members throughout the organization to track, monitor, and analyze the metrics about their organization, and we will look at these in the current section.
Given that Tableau offers a number of ways to share a dashboard, what is the best way to do this? The best way to decide which method to use to share your information fundamentally rests on the user requirements. These are listed in the following table:
Objective
Method
For other Tableau users who don't have access to the data
Exporting a Tableau packaged workbook
To view data online and share the data
Sharing your workbook with Tableau Public
For Tableau users who do have access to the data
Sharing your workbook with Tableau Server
In this recipe, we will look at the first two methods of sharing data: exporting a Tableau packaged workbook and sharing your workbook with Tableau Public. When we export a workbook as a packaged workbook, it wraps up the data as part of the Tableau workbook. Why would you want to do this? The following are some reasons:
