Book Image

Tableau Cookbook - Recipes for Data Visualization

By : Shweta Sankhe-Savale
Book Image

Tableau Cookbook - Recipes for Data Visualization

By: Shweta Sankhe-Savale

Overview of this book

Data is everywhere and everything is data! Visualization of data allows us to bring out the underlying trends and patterns inherent in the data and gain insights that enable faster and smarter decision making. Tableau is one of the fastest growing and industry leading Business Intelligence platforms that empowers business users to easily visualize their data and discover insights at the speed of thought. Tableau is a self-service BI platform designed to make data visualization and analysis as intuitive as possible. Creating visualizations with simple drag-and-drop, you can be up and running on Tableau in no time. Starting from the fundamentals such as getting familiarized with Tableau Desktop, connecting to common data sources and building standard charts; you will walk through the nitty gritty of Tableau such as creating dynamic analytics with parameters, blended data sources, and advanced calculations. You will also learn to group members into higher levels, sort the data in a specific order & filter out the unnecessary information. You will then create calculations in Tableau & understand the flexibility & power they have and go on to building story-boards and share your insights with others. Whether you are just getting started or whether you need a quick reference on a “how-to” question, This book is the perfect companion for you
Table of Contents (18 chapters)
Tableau Cookbook – Recipes for Data Visualization
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Preface

Tableau is a suite of business analytics and data visualization tools that allows people to explore and analyze data quickly and easily with simple drag-and-drop operations.

Tableau software Inc. (http://www.tableau.com/) was founded in 2003 by Chris Stolte, Christian Chabot, and Pat Hanrahan. What began as a research project in Stanford University between 1999 and 2002 soon changed the way people see and interact with their data. Through the development of a database visualization language called VizQL (Visual Query Language), which is a combination of a structured query language for databases and a descriptive language for rendering graphics, Tableau was able to give great power to the end users and allowed them to visualize and interact with their data with simple drag-and-drop operations.

Giving people the ability to analyze their data and interact with it at the speed of thought, Tableau software empowered end users to ask questions on the fly by using their self-service analysis products suite.

The Tableau product suite – differences between the products

Before we actually get started on any visualization, it would be useful to understand the overall range and purpose of the various products offered by Tableau.

The overall suite of products can be broadly bifurcated into two categories; the ones built for creation of dashboards and visualizations and those built for collaboration, sharing, and management of these dashboards and visualizations.

Tableau Desktop

Tableau Desktop is the primary tool most of us will spend most of our time on. It is where we actually create the visualizations, analytics, and dashboards. It is the tool in which all our development will be done.

Tableau Desktop comes in two editions; the Desktop Professional edition which most of us will typically use, and the Desktop Personal edition, which is typically used by people with limited data connectivity needs. To explain this just a bit further, the Desktop Professional edition is a full feature version that can connect to a wide range of data sources, including flat files as well as large database formats (which we will cover in more detail a bit later). Correspondingly the Desktop Personal edition is a limited version in the sense that it can connect only to flat file formats as a data source (Excel, Access, Statistical files, and so on) and does not give the option to connect to any database formats. However, in terms of all other features, the Desktop Professional and the Desktop Personal editions are essentially identical.

Tableau Public

Tableau Public is a free edition that is very similar to Desktop Personal in most ways. It has virtually the full range of features available in the Desktop editions and connects only to flat file formats and not database formats, but with one key distinction. The Tableau Public edition is meant for anyone wanting to post their dashboards and visualizations on the Web, typically for bloggers, journalists, researchers, and the like dealing with public or open data. Hence, the Tableau Public edition does not allow you to save your work offline to your laptop, but publishes your visualizations directly to the Web, on your Tableau Public account on the Tableau public cloud server. The Tableau Public edition is a great tool for anyone wanting to build great visualizations for public consumption, but is not recommended for anyone working with confidential data.

Tableau Server

Tableau Server is an on-premise hosted browser and mobile-based collaboration platform used to publish dashboards created in Tableau Desktop and share them throughout your organization. It allows you to share, to some extent edit, and publish dashboards within your organization while managing access rights and making your visualizations accessible securely over the Web. It also allows you to maintain live data connectivity to backend data sources, which in turn allows users to view up-to-date dashboards online from anywhere. The Tableau Server also allows you to view your dashboards on a mobile tablet through an app available on iOS as well as Android.

Tableau Online

Tableau Online is a cloud hosted version or SaaS version of Tableau Server. It brings Server's capabilities on the cloud without the infrastructure cost.

Tableau Reader

Tableau Reader is a free desktop application that you can use to open, view, and interact with dashboards and visualizations built in Tableau Desktop. Since the dashboards built in Tableau Desktop can package the data within the workbook itself when you save it, Tableau Reader allows you to filter, drill down, view the details of the data, and interact with the dashboards to the full extent of what the author has intended. That said, it being a reader, you cannot make any changes or edit the dashboard in any way beyond what has already been built in by the author.

With this brief introduction to Tableau's suite of products, you will notice that the entire process of creating a dashboard or visualization is done within Tableau Desktop, and thereby this is the product we will be focusing on for the purposes of this book.

In this book, we will go through a bunch of recipes and create a Tableau workbook. The idea is that we follow the recipes and create them from scratch; however, a final copy of the Tableau workbook has been uploaded on the following link.

https://1drv.ms/u/s!Av5QCoyLTBpnhlRBwZcWGGJKpasC.

What this book covers

Chapter 1, Keep Calm and Say Hello to Tableau, covers the fundamentals of Tableau. We learn how to connect to data, get acquainted with the Tableau workspace and terminologies, and finally see how to save the workbook as a Tableau workbook.

Chapter 2, Ready to Build Some Charts? Show Me!, focuses on the data visualization part. We learn to create some basic charts such as text table, highlight table, heat map, bar chart, stacked bar, pie chart, line chart, area chart, tree map, packed bubble chart, and word cloud.

Chapter 3, Hungry for More Charts? Dig In!, focuses on the advanced chart types in Tableau. We learn how to create charts to compare multiple measures by creating a blended axes chart, dual axes chart, combination chart, scatter plot, and so on. We will also understand how we can create a Gantt chart, build maps and use background images.

Chapter 4, Slice and Dice – Grouping, Sorting, and Filtering Data, teaches you how to do various analyses on the data such as grouping members into higher levels, sorting, filtering unnecessary information, and creating custom hierarchies.

Chapter 5, Adding Flavor – Create Calculated Fields, looks at various calculations in Tableau. The idea is that not every single field will come from the database, and hence one needs to create some calculations in the tool. We will look at creating custom calculations, level-of-detail calculations, and the use of table calculations and parameters.

Chapter 6, Serve It on a Dashboard!, is about building one holistic view for end users and giving them a consolidated snapshot of the business. We will look at building dashboards, the use of actions to link multiple sheets on the dashboard, the use of images on the dashboard, formatting dashboards, and using cross-data-source filters.

Chapter 7, The Right MIX – Blending Multiple Data Sources, walks us through the options of connecting to data from multiple data sources. We will look at concepts such as data blending, multiple table joins, cross-database joins, unions, custom SQL, and working with Tableau extracts.

Chapter 8, Garnish with Reference Lines, Trends, Forecasting, and Clustering, focuses on some specific analytics in terms of computing and understanding trends in the data. We do a forecast by using the in-built forecasting model and lastly understand the use of reference lines as benchmark. We will look at topics like trend lines, forecast, reference lines, bullet charts and clustering.

Chapter 9, Bon Appétit! Tell a Story and Share It with Others, covers the storytelling feature in Tableau. We also look at the various ways in which one can save and share their work with others.

Chapter 10, Formatting in Tableau for Desserts, focuses on the various formatting options in Tableau.

What you need for this book

You'll need any one of the following for the book:

Tableau Desktop Professional version 10.1 or higher

Tableau Desktop Personal version 10.1 or higher

Tableau Public version 10.1 or higher

Please note that it is ideal if you use Tableau Desktop Professional. However, in case you are using Tableau Desktop Personal or Tableau Public, then some of the functionalities mentioned in the book may change.

Who this book is for

This book is for anyone who wishes to use Tableau. It will be of use to both beginners who want to learn Tableau from scratch and to more seasoned users who simply want a quick reference guide. This book is a ready reckoner guide for you. The book will be such that both new and existing Tableau users who don't know or can't recall how to perform different Tableau tasks can use it and be benefited from it.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it…, How it works…, There's more…, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:

# cp //src/asterisk-addons/configs/cdr_mysql.conf.sample
     /etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

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 , 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.

Customer support

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.

Downloading the example code

You can download the example code files for all Packt books you have purchased 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:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Tableau-Cookbook-Recipes-for-Data-Visualization. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

If you are using Tableau Public, you'll need to locate the workbooks that have been published to Tableau Public. These may be found at the following link: http://goo.gl/wJzfDO.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/TableauCookbookRecipesforDataVisualization_ColorImages.pdf.

Errata

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

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 with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.