Learning Tableau 2019 - Joshua N. Milligan - E-Book

Learning Tableau 2019 E-Book

Joshua N. Milligan

0,0
36,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Create powerful data visualizations and unlock intelligent business insights with Tableau




Key Features



  • Explore all the latest Tableau 2019 features and redefine business analytics for your organization


  • Create impressive data visualizations and interactive dashboards to get insights from your data


  • Learn effective data storytelling to transform how your business leverages data and makes decisions





Book Description



Tableau is the gold standard of business intelligence and visual analytics tools in every industry. It enables rapid data visualization and interpretation with charts, graphs, dashboards, and much more. Updated with the latest features of Tableau, this book takes you from the foundations of the Tableau 2019 paradigm through to advanced topics.






This third edition of the bestselling guide by Tableau Zen Master, Joshua Milligan, will help you come to grips with updated features, such as set actions and transparent views. Beginning with installation, you'll create your first visualizations with Tableau and then explore practical examples and advanced techniques. You'll create bar charts, tree maps, scatterplots, time series, and a variety of other visualizations. Next, you'll discover techniques to overcome challenges presented by data structure and quality and engage in effective data storytelling and decision making with business critical information. Finally, you'll be introduced to Tableau Prep, and learn how to use it to integrate and shape data for analysis.






By the end of this book, you will be equipped to leverage the powerful features of Tableau 2019 for decision making.





What you will learn



  • Develop stunning visualizations that explain complexity with clarity


  • Explore the exciting new features of Tableau Desktop and Tableau Prep


  • Connect to various data sources to bring all your data together


  • Uncover techniques to prep and structure your data for easy analysis


  • Create and use calculations to solve problems and enrich analytics


  • Master advanced topics such as sets, LOD calcs, and much more


  • Enable smart decisions with clustering, distribution, and forecasting


  • Share your data stories to build a culture of trust and action









Who this book is for



This Tableau book is for anyone who wants to understand data. If you're new to Tableau, don't worry. This book builds on the foundations to help you understand how Tableau really works and then builds on that knowledge with practical examples before moving on to advanced techniques. Working experience with databases will be useful but is not necessary to get the most out of this book.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 459

Veröffentlichungsjahr: 2019

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Learning Tableau 2019Third Edition

 

 

 

 

 

 

Tools for Business Intelligence, data prep, and visual analytics

 

 

 

 

 

 

 

Joshua N. Milligan 

 

 

 

 

 

 

 

 

 

 

 

 

 

BIRMINGHAM - MUMBAI

Learning Tableau 2019 Third Edition

Copyright © 2019 Packt Publishing

All rights reserved. No part of this book 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 book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Commissioning Editor:Vedika NaikAcquisition Editor: Joshua Nadar Content Development Editor: Chris D'cruz Technical Editor: Sagar SawantCopy Editor: Safis EditingProject Coordinator: Hardik Bhinde Proofreader: Safis EditingIndexer: Rekha Nair Graphics: Tom Scaria Production Coordinator: Deepika Naik 

First published: April 2015 Second edition: September 2016Third edition: March 2019

Production reference: 1220319

Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.

ISBN 978-1-78883-952-5

www.packtpub.com

 
mapt.io

Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

Why subscribe?

Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content

Packt.com

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. 

Contributors

About the author

Joshua N. Milligan is a five-time Tableau Zen Master, the highest recognition of excellence from Tableau Software for masters and teachers of Tableau and collaborators within the community. He was one of three Iron Viz Global finalists in 2017. He is passionate in serving others through data visualization and analytics. As a consultant with Teknion Data Solutions since 2004, he has extensive real-world experience across many industries. In addition to authoring every edition of Learning Tableau, he was a technical reviewer for Tableau Data Visualization Cookbook and Creating Data Stories with Tableau Public. He shares Tableau and Tableau Prep tips on VizPainter and his Twitter handle is @VizPainter. He lives with his family in Tulsa.

 

About the reviewers

Dave Dwyer has a BSc in information systems from RIT (Rochester Institute of Technology), an MBA from Drexel University, and is a certified Six Sigma Black Belt and PMP. In his 20+ years as an IT professional, he has worked in a wide range of technical and leadership roles, in companies ranging from start-ups to Fortune 100 enterprises. A chance introduction to reporting and analytics 10 years ago got him hooked and he never left. Dave believes that the data science landscape of analytics, visualization, big data, and machine learning will drive more genuine changes in business over the next 10 years than any other area.

Dmitry Anoshin is an expert in the field of analytics with 10 years of experience. He started using Tableau as a primary BI tool in 2011 in his role as a BI consultant for Teradata. He is certified with both Tableau Desktop and Server. He leads probably the biggest Tableau user community with more than 2,000 active users. This community has 2-3 Tableau talks every month, headed by the top Tableau experts, Tableau Zen Masters, and Viz Champions. In addition, Dmitry has previously written three books with Packt and reviewed a further seven. Finally, he is an active speaker at data conferences and helps to adopt cloud analytics.

Packt is searching for authors like you

If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.

Table of Contents

Title Page

Copyright and Credits

Learning Tableau 2019 Third Edition

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Section 1: Tableau Foundations

Taking Off with Tableau

The cycle of analytics

Connecting to data

Foundations for building visualizations

Measures and dimensions

Discrete and continuous fields

Discrete fields

Continuous fields

Visualizing data

Bar charts

Iterations of bar charts for deeper analysis

Line charts

Iterations of line charts for deeper analysis

Geographic visualizations

Filled maps

Symbol maps

Density maps

Using Show Me

Putting everything together in a dashboard

The Dashboard interface

Building your dashboard

Summary

Working with Data in Tableau

The Tableau paradigm

A simple example

Connecting to data

Connecting to data in a file

Connecting to data on a server

Connecting to data in the cloud

Shortcuts for connecting to data

Managing data source metadata

Working with extracts instead of live connections

Creating extracts

Using extracts

Performance

Portability and security

When to use an extract

Tableau file types

Joins and blends

Joining tables

Cross database joins

Blending data sources

A blending example

Filtering data

Filtering discrete (blue) fields

Filtering continuous (green) fields

Filtering dates

Other filtering options

Summary

Venturing on to Advanced Visualizations

Comparing values

Bar charts

Bar chart variations

Bullet chart – comparing to a goal, target, or threshold

Bar-in-bar chart

Highlighting categories of interest

Visualizing dates and times

Date parts, date values, and exact dates

Variations of date and time visualizations

Gantt Charts

Relating parts of the data to the whole

Stacked bars

Treemaps

Area charts

Pie charts

Visualizing distributions

Circle charts

Jittering

Box and whisker plots

Histograms

Visualizing multiple axes to compare different measures

Scatterplot

Dual axis and combination charts

Summary

Section 2: Leveraging the Full Power of Tableau

Starting an Adventure with Calculations

Introduction to calculations

Creating and editing calculations

Additional functions and operators

Four main types of calculations

Example data

Row-level calculations

Aggregate-level calculations

Why the row-level/aggregate-level difference matters

Level of detail calculations

Level of detail syntax

Level of detail types

FIXED

INCLUDE

EXCLUDE

Level of detail example

Parameters

Creating parameters

Practical examples of calculations and parameters

Fixing data issues

Extending the data

Enhancing user experience, analysis, and visualizations

Ad hoc calculations

Performance considerations

Summary

Diving Deep with Table Calculations

An overview of Table Calculations

Creating and editing Table Calculations

Quick Table Calculations

Relative versus fixed

Scope and direction

Working with scope and direction

Addressing and partitioning

Advanced addressing and partitioning

Custom Table Calculations

Meta table functions

Lookup and previous value

Running functions

Window functions

Rank functions

Script functions

The Total function

Practical examples

Year over Year Growth

Dynamic titles with totals

Late filtering

Data densification

When and where data densification occurs

An example of leveraging data densification

Summary

Making Visualizations That Look Great and Work Well

Visualization considerations

Leveraging formatting in Tableau

Workbook-level formatting

Worksheet-level formatting

Field-level formatting

Custom number formatting

Custom date formatting

Null formatting

Additional formatting options

Adding value to visualizations

Tooltips

Viz in Tooltip

Summary

Telling a Data Story with Dashboards

Key concepts for dashboards

Dashboard definition

Dashboard objectives

Dashboard approaches

Designing dashboards in Tableau

Objects

Tiled versus floating

Manipulating objects on the dashboard

Dashboard example – is least profitable always unprofitable?

Building the views

Creating the dashboard framework

Implementing actions to guide the story

Interlude – context filtering

Designing for different displays and devices

How actions work

Filter actions

Highlight actions

URL actions

Set actions

Sets

A set action example

Dashboard example – regional scorecard

Stories

Summary

Digging Deeper - Trends, Clustering, Distributions, and Forecasting

Trends

Customizing Trend Lines

Trend models

Linear

Logarithmic

Exponential

Power

Polynomial

Analyzing trend models

Exporting statistical model details

Advanced statistics (and more!) with R and Python

Clustering

Distributions

Forecasting

Summary

Section 3: Data Prep and Structuring

Cleaning and Structuring Messy Data

Structuring data for Tableau

Good structure – tall and narrow instead of short and wide

Wide data

Tall data

Wide and tall in Tableau

Good structure – star schemas (Data Mart/Data Warehouse)

Dealing with data structure issues

Restructuring data in Tableau connections

Union files together

Cross database joins

A practical example – filling out missing/sparse dates

Working with different levels of detail

Overview of advanced fixes for data problems

Summary

Introducing Tableau Prep

Getting prepped to explore Tableau Prep

Understanding the Tableau Prep Builder Interface

Flowing with the fundamental paradigm

Connecting to data

Cleaning the data

Union, merging mismatched fields, and removing unnecessary fields

Grouping and cleaning

Calculations and aggregations in Tableau Prep

Filtering in Tableau Prep

Transforming the data for analysis

Options for automating flows

Summary

Section 4: Advanced Techniques and Sharing with Others

Advanced Visualizations, Techniques, Tips, and Tricks

Advanced visualizations

Slope Charts

Lollipop Charts

Waterfall Charts

Step Lines and Jump Lines

Spark Lines

Dumbbell Charts

Unit chart/symbol charts

Marimekko Charts

Sheet swapping and dynamic dashboards

Dynamically showing and hiding other controls

Mapping techniques

Supplementing the standard in geographic data

Manually assigning geographic locations

Creating custom territories

Ad hoc custom territories

Field-defined custom territories

Leveraging spatial objects

Some final map tips

Using background images

Animation

Transparency

Summary

Sharing Your Data Story

Presenting, printing, and exporting

Presenting

Printing

Exporting

Sharing with users of Tableau Desktop or Tableau Reader

Sharing with Tableau Desktop users

Sharing with Tableau Reader users

Sharing with users of Tableau Server, Tableau Online, and Tableau Public

Publishing to Tableau Public

Publishing to Tableau Server and Tableau Online

Interacting with Tableau Server

Additional distribution options using Tableau Server

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

Preface

What is it about Tableau that inspires an ever growing community to hold up signs that read I ♥ Tableau and excitedly share data visualizations on social media? Why do so many organizations turn to Tableau as the gold standard for visual analytics? How can an analytics platform be so fun, engaging, and useful all at once?

Tableau disrupted the paradigm for visually interacting with data. It made it easy and intuitive (and fun!) to be hands-on with the data, to receive instant visual feedback with every action, and to ask questions and uncover insights in a natural flow of thought and interaction. And Tableau continues to expand and evolve in ways that make seeing and understanding data easier and more powerful. New features such as Set Actions, geospatial support, and new statistical models expand the analysis that's possible. Transparency, density maps, new color palettes, and formatting options greatly enhance the visual story you can tell. The introduction of Tableau Prep brings the same intuitive instant feedback to data prep and cleansing that Tableau Desktop brought to data visualization. We'll cover these new features (and more) in the chapters of this book!

We'll look at Tableau through the lens of understanding the underlying paradigm of how and why Tableau works in the context of practical examples. And then we'll build on this solid foundation of understanding so that you will have the requisite tools and skills to tackle even the toughest data challenges!

Who this book is for

This book is for anyone who needs to see and understand their data! From the casual business user to the hardcore data analyst, everyone needs to have the ability to ask and answer questions of data. Having a bit of background with data will definitely help, but you don't need to know scripting, SQL, or database structures. Whether you're new to Tableau or have been using it for months or even years, you'll gain a solid foundation for understanding Tableau and possess the tools and skills to build toward advanced mastery of the tool.

What this book covers

Chapter 1, Taking Off with Tableau, introduces the foundational principles of Tableau. We'll go through a series of examples that will introduce the basics of connecting to data, exploring and analyzing the data visually, and finally putting it all together in a fully interactive dashboard.

Chapter 2, Working with Data in Tableau, focuses on essential concepts of how Tableau works with data. You will look at multiple examples of different connections to different data sources, consider the benefits and potential drawbacks of using data extracts, consider how to manage metadata, dive into details on joins and blends, and finally, take a look at options for filtering data.

Chapter 3, Venturing on to Advanced Visualizations, explores how to create the various types of views and how to extend basic visualizations using a variety of advanced techniques such as simple calculations, jittering, multiple mark types, and dual axis. Along the way, we will also cover some details on how dates work in Tableau.

Chapter 4, Starting an Adventure with Calculations, focuses on laying a foundation and also gives a number of practical examples, by means of which you will understand the key concepts behind how calculations work in Tableau.

Chapter 5, Diving Deep with Table Calculations, explores the final main type of calculations: table calculations. These are some of the most powerful calculations in terms of their ability to solve problems and open up incredible possibilities for in-depth analysis. In practice, they range from very easy to exceptionally complex.

Chapter 6, Making Visualizations that Look Great and Work Well, explains how formatting works in Tableau, giving you the ability to refine the visualizations you created in discovery and analysis into incredibly effective communication of your data story.

Chapter 7, Telling a Data Story with Dashboards, demonstrates how Tableau allows you to bring together related data visualizations in a single dashboard. This dashboard could be a static view of various aspects of the data, or a fully interactive environment, allowing users to dynamically filter, drill down, and interact with the data visualizations. In this chapter, you will take a look at most of these concepts within the context of several in-depth examples, where you will walk through the dashboard design process step by step.

Chapter 8, Digging Deeper – Trends, Clustering, Distributions, and Forecasting, explains how Tableau enables you to quickly enhance your data visualizations with statistical analysis. Built-in features, such as trend models, clustering, distributions, and forecasting, allow you to quickly add value to your visual analysis. You will take a look at these concepts in the context of a few practical examples using some sample datasets. 

Chapter 9, Cleaning and Structuring Messy Data, focuses on a number of principles for structuring data to work well with Tableau, as well as some specific examples of how to address common data issues. 

Chapter 10, Introducing Tableau Prep, works through a practical example as we explore the paradigm of Tableau Prep, enabling the reader to understand the fundamental transformations and see many of the features and functions of Tableau Prep.

Chapter 11, Advanced Visualizations, Techniques, Tips, and Tricks, explains a number of advanced techniques in a practical context. You'll learn things such as creating advanced visualizations, dynamically swapping views on a dashboard, using custom images, and advanced geographic visualizations.

Chapter 12, Sharing Your Data Story, explains how Tableau enables you to share your work using a variety of methods. In this chapter, we'll take a look at the various ways to share visualizations and dashboards, along with what to consider when deciding how you will share them.

To get the most out of this book

This book does not assume any specific database knowledge, but it definitely will help to have some basic familiarity with data itself. We'll cover the foundational principles first, and while it may be tempting to skip the first chapter, please don't! We'll lay a foundation of terminology and the paradigm that will be used throughout the remainder of the book.

You'll be able to follow along with many of the examples in the book using Tableau Desktop and Tableau Prep Builder (in Chapter 10, Introducing Tableau Prep). You may download and install the most recent versions from Tableau using the following links:

Tableau Desktop

https://www.tableau.com/products/desktop/download

Tableau Prep Builder

:

 https://www.tableau.com/products/prep/download

Please speak to a Tableau representative for licensing information. In most cases, you may install a 14-day trial of each product if you do not currently have a license.

Download the example code files

For most chapters, you'll find applicable data files (Excel and text files) and a set of Tableau Workbook files, (.twbx) , or Tableau Flow files, (.tfl) , which you may open in Tableau Desktop or Tableau Prep Builder, respectively. These will follow the convention ChapterNN_Starter and ChapterNN_Complete (where NN is the chapter number). The starter workbooks and flows are intended to allow you to work through the examples in the book on your own, though at times, they will include completed examples for reference. The complete workbooks are entirely finished and are intended to allow you to check your work or see the finished example.

You may download the example files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

Log in or register at

www.packt.com

.

Select the

SUPPORT

tab.

Click on

Code Downloads & Errata

.

Enter the name of the book in the

Search

box and follow the onscreen instructions.

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/Learning-Tableau-2019. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781788839525_ColorImages.pdf.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packt.com.

Section 1: Tableau Foundations

This section lays the foundations for data visualization in Tableau. It provides an overview of the interface and terminology, explains data connections, and covers a wide variety of visualization types.

This section consists of the following chapters:

Chapter 1

,

Taking Off with Tableau

Chapter 2

,

Working with Data in Tableau

Chapter 3

,

Venturing on to Advanced Visualizations

Taking Off with Tableau

When you first encounter a dataset, often the first thing you see is the raw data—numbers, dates, text, field names, and data types. Almost certainly, there are insights and stories that need to be uncovered and told, decisions to make, and actions to take. But how do you find the significance? How do you uncover the meaning and tell the stories that are hidden in the data?

Tableau is an amazing platform for seeing, understanding, and making key decisions based on your data! With it, you will be able to achieve incredible data discovery, data analysis, and data storytelling. You'll accomplish these tasks and goals visually using an interface that is designed for a natural and seamless flow of thought and work.

To leverage the power of Tableau, you don't need to write complex scripts or queries. Instead, you will be interacting with your data in a visual environment where everything that you drag and drop will be translated into the necessary queries for you and then displayed visually. You'll be working in real time, so you will see results immediately, get answers as quickly as you can ask questions, and be able to iterate through potentially dozens of ways to visualize the data to find a key insight or tell a piece of the story.

This chapter introduces the foundational principles of Tableau. We'll go through a series of examples that will introduce the basics of connecting to data, exploring and analyzing the data visually, and finally putting it all together in a fully interactive dashboard. These concepts will be developed far more extensively in subsequent chapters. But don't skip this chapter, as it introduces key terminology and key concepts, including the following:

The cycle of analytics

Connecting to data

Foundations for building visualizations

Creating bar charts

Creating line charts

Creating geographic visualizations

Using Show Me

Bringing everything together via a dashboard

The cycle of analytics

As someone who works with and seeks to understand data, you will find yourself working within the cycle of analytics. This cycle might be illustrated as follows:

Tableau allows you to jump to any step of the cycle, move freely between steps, and iterate through the cycle very rapidly. With Tableau, you have the ability to do the following:

Data

 

discovery

: You can very easily explore a dataset using Tableau and begin to understand what data you have visually.

Data preparation

: Tableau allows you to connect to data from many different sources and, if necessary, create a structure that works best for your analysis. Most of the time, this is as easy as pointing Tableau to a database or opening a file, but Tableau gives you the tools to bring together even complex and messy data from multiple sources.

Data analysis

: Tableau makes it easy to visualize the data, so you can see and understand trends, outliers, and relationships. In addition to this, Tableau has an ever-growing set of analytical functions that allow you dive deep into understanding complex relationships, patterns, and correlations in the data.

Data storytelling

: Tableau allows you to build fully interactive dashboards and stories with your visualizations and insights so that you can share the data story with others.

All of this is done visually. Data visualization is the heart of Tableau. You can iterate through countless ways of visualizing the data to ask and answer questions, raise new questions, and gain new insights. And you'll accomplish this as a flow of thought.

Connecting to data

Tableau connects to data stored in a wide variety of files and databases. This includes flat files, such as Excel documents, spatial files, and text files; relational databases, such as SQL Server and Oracle; cloud-based data sources, such as Google Analytics and Amazon Redshift; and OLAP data sources, such as Microsoft Analysis Services. With very few exceptions, the process of analysis and creating visualizations will be the same, no matter what data source you use.

We'll cover details of connecting to different types of data sources in Chapter 2, Working with Data in Tableau. And we'll cover data spanning a wide variety of industries in other chapters. For now, we'll connect to a text file, specifically, a comma-separated values file (.csv). The data is a variation of the sample that ships with Tableau: Superstore, a fictional retail chain that sells various products to customers across the United States. Please use the supplied data file instead of the Tableau sample data, as the variations will lead to differences in visualizations.

The Chapter 1 workbooks, included with the code files bundle, already have connections to the file, but for this example, we'll walk through the steps of creating a connection in a new workbook:

Open Tableau. You should see the home screen with a list of connection options on the left and, if applicable, thumbnail previews of recently edited workbooks in the center, along with sample workbooks at the bottom.

Under

Connect

and

To a File

, click

Text File

.

In the

Open

dialogue box, navigate to the

\Learning Tableau\Chapter 01

directory and select the

Superstore.csv

file.

You will now see the data connection screen, which allows you to visually create connections to data sources. We'll examine the features of this screen in detail in the

Connecting to data

section of

Chapter 2

Working with Data in Tableau

. For now, Tableau has already added and given a preview of the file for the connection:

For this connection, no other configuration is required, so simply click on the Sheet 1 tab at the bottom to start visualizing the data! You should now see the main work area within Tableau, which looks like this:

We'll refer to elements of the interface throughout the book using specific terminology, so take a moment to familiarize yourself with the terms used for various components numbered in the preceding screenshot:

The

Menu

contains various menu items for performing a wide range of functions.

The

Toolbar

allows for common functions such as undo, redo, save, add a data source, and so on.

The

Side Bar

contains tabs for

Data

and

Analytics

. When the

Data

tab is active, we'll refer to the side bar as the data pane. When the

Analytics

tab is active, we'll refer to the side bar as the analytics pane. We'll go into detail later in this chapter, but for now, note that the data pane shows the data source at the top and contains a list of fields from the data source below, divided into

Dimensions

and

Measures

.

Various shelves such as

Columns

,

Rows

,

Pages

, and

Filters

serve as areas to drag and drop fields from the data pane. The

Marks

card contains additional shelves such as

Color

,

Size

,

Text

,

Detail

, and

Tooltip

. Tableau will visualize data based on the fields you drop on to the shelves.

Data fields in the data pane are available to add to a view. Fields that have been dropped on to a shelf are called in the view or active fields because they play an active role in the way Tableau draws the visualization.

The

c

anvas

or

view

is where Tableau will draw the data visualization. You may also drop fields directly on to the view. You'll find the seamless title at the top of the canvas. By default, it will display the name of the sheet, but it can be edited or even hidden.

Show Me

is a feature that allows you to quickly iterate through various types of visualizations based on data fields of interest. We'll look at

Show Me

toward the end of the chapter.

The tabs at the bottom of the window give you options for editing the data source, as well as navigating between and adding any number of sheets, dashboards, or stories. Many times, any tab (whether it is a sheet, a dashboard, or a story) is referred to generically as a

sheet

.

A Tableau workbook is a collection of data sources, sheets, dashboards, and stories. All of this is saved as a single Tableau workbook file (.twb or .twbx). We'll look at the difference in file types and explore details of what else is saved as part of a workbook in later chapters. A workbook is organized into a collection of tabs of various types:A sheet is a single data visualization, such as a bar chart or a line graph. SinceSheetis also a generic term for any tab, we'll often refer to a sheet as a view because it is a single view of the data.A dashboard is a presentation of any number of related views and other elements (such as text or images) arranged together as a cohesive whole to communicate a message to an audience. Dashboards are often designed to be interactive.A story is a collection of dashboards or single views arranged to communicate a narrative from the data. Stories may also be interactive.

As you work, the status bar will display important information and details about the view, selections, and the user.

Various controls allow you to navigate between sheets, dashboards, and stories, as well as view the tabs with 

Show Filmstrip

or switch to a sheet sorter showing an interactive thumbnail of all sheets in the workbook. Now that you have connected to the data in the text file, we'll explore some examples that lay the foundation for data visualization and then move on to building some foundational visualization types. To prepare for this, please do the following:

From the menu, select

File | 

Exit

.

When prompted to save changes, select

No

.

From the

\learning Tableau\Chapter 01

directory, open the file

Chapter 01 Starter.twbx

. This file contains a connection to the

Superstore

data file and is designed to help you walk through the examples in this chapter.

The files for each chapter include a Starter workbook that allows you to work through the examples given in this book. If at any time, you'd like to see the completed examples, open the Complete workbook for the chapter.

With a connection to the data, you are ready to start visualizing and analyzing the data. As you begin to do so, you will take on the role of an analyst at the retail chain. You'll ask questions of the data, build visualizations to answer those questions, and ultimately design a dashboard to share the results. Let's start by laying some foundations for understanding how Tableau visualizes data.

Foundations for building visualizations

When you first connect to a data source such as the Superstore file, Tableau will display the data connection and the fields in the data pane on the left Side Bar. Fields can be dragged from the data pane onto the canvas area or onto various shelves such as Rows, Columns, Color, or Size. As we'll see, the placement of the fields will result in different encodings of the data based on the type of field.

Measures and dimensions

The fields from the data source are visible in the data pane and are divided into Measures and Dimensions. The difference between measures and dimensions is a fundamental concept to understand when using Tableau:

Measures

 

are values that are aggregated. For example, they are summed, averaged, counted, or have a minimum or a maximum.

Dimensions

 

are values that determine the level of detail at which measures are aggregated. You can think of them as slicing the measures or creating groups into which the measures fit. The combination of dimensions used in the view define the view's basic level of detail.

As an example (which you can view in the Chapter 01 Starter workbook on the Measures and Dimensions sheet), consider a view created using the Regionfields and Sales from the Superstore connection:

The Sales field is used as a measure in this view. Specifically, it is being aggregated as a sum. When you use a field as a measure in the view, the type aggregation (for example, SUM, MIN, MAX, and AVG) will be shown on the active field. Note that in the preceding example, the active field on rows clearly indicates the sum aggregation of Sales: SUM(Sales).

The Region field is a dimension with one of four values for each record of data: Central, East, South, or West. When the field is used as a dimension in the view, it slices the measure. So, instead of an overall sum of sales, the preceding view shows the sum of sales for each region.

Discrete and continuous fields

Another important distinction to make with fields is whether a field is being used as discrete or continuous. Whether a field is discrete or continuous, determines how Tableau visualizes it based on where it is used in the view. Tableau will give a visual indication of the default for a field (the color of the icon in the data pane) and how it is being used in the view (the color of the active field on a shelf). Discrete fields, such as Region in the previous example, are blue. Continuous fields, such as Sales, are green.

In the screenshots in the printed version of this book, you should be able to distinguish a slight difference in shade between the discrete (blue) and the continuous (green) fields, but pay special attention to the interface as you follow along using Tableau. You may also wish to download the color image pack from Packt Publishing, available at: https://www.packtpub.com/sites/default/files/downloads/9781788839525_ColorImages.pdf

Discrete fields

Discrete (blue) fields have values that are shown as distinct and separate from one another. Discrete values can be reordered and still make sense. For example, you could easily rearrange the values of Region to be East, South, West, and Central, instead of the default order in the preceding screenshot.

When a discrete field is used on the Rows or Columns shelves, the field defines headers. Here, the discrete field Region defines column headers:

Here, it defines row headers:

When used for color, a Discrete field defines a discrete color palette in which each color aligns with a distinct value of the field:

Continuous fields

Continuous (green) fields have values that flow from first to last as a continuum. Numeric and date fields are often (though not always) used as continuous fields in the view. The values of these fields have an order that it would make little sense to change.

When used on Rows or Columns, a continuous field defines an axis:

When used for color, a continuous field defines a gradient:

It is very important to note that continuous and discrete are different concepts from Measure and Dimension. While most dimensions are discrete by default, and most measures are continuous by default, it is possible to use any measure as a discrete field and some dimensions as continuous fields in the view.

To change the default of a field, right-click the field in the data pane and select Convert to Discrete or Convert to Continuous. To change how a field is used in the view, right-click the field in the view and select Discrete or Continuous. Alternatively, you can drag and drop the fields betweenDimensionsandMeasuresin the data pane.

In general, you can think of the differences between the types of fields as follows:

Choosing between dimension and measure tells Tableau

how to slice

 or 

aggregate

the data

Choosing between d

iscrete and continuous tells Tableau 

how to display 

the data with a header or an axis and defines individual colors or a gradient.

As you work through the examples in this book, pay attention to the fields you are using to create the visualizations, whether they are dimensions or measures, and whether they are discrete or continuous. Experiment with changing fields in the view from continuous to discrete, and vice versa, to gain an understanding of the differences in the visualization.

Visualizing data

A new connection to a data source is an invitation to explore and discover! At times, you may come to the data with very well-defined questions and a strong sense of what you expect to find. Other times, you will come to the data with general questions and very little idea of what you will find. The visual analytics capabilities of Tableau empower you to rapidly and iteratively explore the data, ask new questions, and make new discoveries.

The following visualization examples cover a few of the most foundational visualization types. As you work through the examples, keep in mind that the goal is not simply to learn how to create a specific chart. Rather, the examples are designed to help you think through the process of asking questions of the data and getting answers through iterations of visualization. Tableau is designed to make that process intuitive, rapid, and transparent.

Something that is far more important than memorizing the steps to create a specific chart type is understanding how and why to use Tableau to create a bar chart, and adjusting your visualization to gain new insights as you ask new questions.

Bar charts

Bar charts visually represent data in a way that makes the comparing of values across different categories easy. The length of the bar is the primary means by which you will visually understand the data. You may also incorporate color, size, stacking, and order to communicate additional attributes and values.

Creating bar charts in Tableau is very easy. Simply drag and drop the measure you want to see onto either the Rows or Columns shelf and the dimension that defines the categories onto the opposing Rows or Columns shelf.

As an analyst for Superstore, you are ready to begin a discovery process focused on sales (especially the dollar value of sales). As you follow the examples, work your way through the sheets in the Chapter 01 Starter workbook. The Chapter 01 Complete workbook contain, the complete examples so you can compare your results at any time:

Click on the the

Sales by Department

tab to view that sheet.

Drag and drop the

Sales

field from

Measures

in the data pane onto the

Columns

shelf. You now have a bar chart with a single bar representing the sum of sales for all the data in the data source.

Drag and drop the

Department

field from

Dimensions

in the data pane to the

Rows

shelf. This slices the data to give you three bars, each having a length that corresponds to the sum of sales for each department:

You now have a horizontal bar chart. This makes comparing the sales between the departments easy. The mark type drop-down menu on the Marks card is set to Automatic and shows an indication that Tableau has determined that bars are the best visualization given the fields you have placed in the view. As a dimension, the Department slices the data. Being discrete, it defines row headers for each department in the data. As a measure, the Sales field is aggregated. Being continuous, it defines an axis. The mark type of bar causes individual bars for each department to be drawn from 0 to the value of the sum of sales for that department.

Typically, Tableau draws a mark (such as a bar, a circle, a square) for every intersection of dimensional values in the view. In this simple case, Tableau is drawing a single bar mark for each dimensional value (Furniture, Office Supplies, and Technology) of Department. The type of mark is indicated and can be changed in the drop-down menu on the Marks card. The number of marks drawn in the view can be observed on the lower-left status bar.

Tableau draws different marks in different ways; for example, bars are drawn from 0 (or the end of the previous bar, if stacked) along the axis. Circles and other shapes are drawn at locations defined by the value(s) of the field defining the axis. Take a moment to experiment with selecting different mark types from the drop-down menu on the Marks card. Having an understanding of how Tableau draws different mark types will help you master the tool.

Iterations of bar charts for deeper analysis

Using the preceding bar chart, you can easily see that the technology department has more total sales than either the furniture or office supplies departments. What if you want to further understand sales amounts for departments across various regions? Follow these two steps:

Navigate to the

Bar Chart (two levels)

sheet, where you will find an initial view identical to the one you created earlier

Drag the

Region

field from

Dimensions

in the data pane to the

Rows

shelf and drop it to the left of the

Department

field already in view

You should now have a view that looks like this:

You still have a horizontal bar chart, but now you've introduced Region as another dimension that changes the level of detail in the view and further slices the aggregate of the sum of sales. By placing Region before Department, you are able to easily compare the sales of each department within a given region.

Now you are starting to make some discoveries. For example: the Technology department has the most sales in every region, except in the East, where Furniture had higher sales. Office Supplies never has the highest sales in any region.

Let's take a look at a different view, using the same fields arranged differently:

Navigate to the

Bar Chart (stacked)

sheet, where you will find a view identical to the original bar chart.

Drag the

Region

field from the

Rows

shelf and drop it on to the

Color

shelf:

Instead of a side-by-side bar chart, you now have a stacked bar chart. Each segment of the bar is color-coded by the Region field. Additionally, a color legend has been added to the workspace. You haven't changed the level of detail in the view, so sales are still summed for every combination of region and department:

The View Level of Detail is a key concept when working with Tableau. In most basic visualizations, the combination of values of all the dimensions in the view defines the lowest level of detail for that view. All measures will be aggregated or sliced by the lowest level of detail. In the case of most simple views, the number of marks (indicated in the lower-left status bar) corresponds to the number of intersections of dimensional values. That is, there will be one mark for each combination of dimension values.

If

Department

 is the only field used as a dimension, you will have a view at the department level of detail, and all measures in the view will be aggregated per department.

If 

Region

 is the only field used as a dimension, you will have a view at the region level of detail, and all measures in the view will be aggregated per region.

If you use both 

Department

 and 

Region

 as dimensions in the view, you will have a view at the level of department and region. All measures will be aggregated per unique combination of department and region, and there will be one mark for each combination of department and region.

Stacked bars can be useful when you want to understand part-to-whole relationships. It is now fairly easy to see what portion of the total sales of each department is made in each region. However, it is very difficult to compare sales for most of the regions across departments. For example, can you easily tell which department had the highest sales in the East region? It is difficult because, with the exception of West, every segment of the bar has a different starting place.

Now take some time to experiment with the bar chart to see what variations you can create:

Navigate to the

Bar Chart (experimentation)

sheet.

Try dragging the 

Region

field from

Color

to the other various shelves on the

Marks

card, such as

Size

,

Label

, and

Detail

. Observe that in each case the bars remain stacked but are redrawn based on the visual encoding defined by the

Region

field.

Use the

Swap

button on the

Toolbar

to swap fields on

Rows

and

Columns

. This allows you to very easily change from a horizontal bar chart to a vertical bar chart (and vice versa):

Drag and drop

Sales

from the

Measures

section of the data pane on top of the

Region

field on the

Marks

card to replace it. Drag the

Sales

field to

Color

if necessary, and notice how the color legend is a gradient for the continuous field.

Experiment further by dragging and dropping other fields onto various shelves. Note the behavior of Tableau for each action you take.

From the

File

menu, select

Save

.

Tableau has an auto-save feature! If your machine crashes, then the next time you open Tableau, you will be prompted to open any previously-open workbooks that had not been saved. You should still develop a habit of saving your work early and often, though, and maintaining appropriate backups.

Line charts

Line charts connect related marks in a visualization to show movement or relationship between those connected marks. The position of the marks and the lines that connect them are the primary means of communicating the data. Additionally, you can use size and color to communicate additional information.

The most common kind of line chart is a Time Series. A time series shows the movement of values over time. Creating one in Tableau requires only a date and a measure.

Continue your analysis of Superstore sales using the Chapter 01 Starter workbook you just saved:

Navigate to the

Sales 

over time

sheet.

Drag the

Sales

field from

Measures

to

Rows

. This gives you a single, vertical bar representing the sum of all sales in the data source.

To turn this into a time series, you must introduce a date. Drag the

Order Date

field from

Dimensions

in the data pane on the left and drop it into 

Columns

. Tableau has a built-in date hierarchy, and the default level of

Year

has given you a line chart connecting four years. Notice that you can clearly see an increase in sales year after year:

Use the drop-down menu on the

YEAR(Order Date)

field on

Columns

(or right-click the field) and switch the date field to use

Quarter

. You may notice that

Quarter

is listed twice in the drop-down menu. We'll explore the various options for date parts, values, and hierarchies in the 

Visualizing Dates and Times

 section of 

Chapter 3

Venturing on to Advanced Visualizations

. For now, select the second option:

Notice that the cyclical pattern is quite evident when looking at sales by quarter:

Iterations of line charts for deeper analysis

Right now, you are looking at the overall sales over time. Let's do some analysis at a slightly deeper level:

Navigate to the

Sales 

over time (overlapping lines)

sheet, where you will find a view identical to the one you just created.

Drag the

Region

field from

Dimensions

to

Color

. Now you have a line per region, with each line a different color, and a legend indicating which color is used for which region. As with the bars, adding a dimension to color splits the marks. However, unlike the bars, where the segments were stacked, the lines are not stacked. Instead, the lines are drawn at the exact value for the sum of sales for each region and quarter. This allows for easy and accurate comparison. It is interesting to note that the cyclical pattern can be observed for each region:

With only four regions, it's fairly easy to keep the lines separate. But what about dimensions that have even more distinct values? The steps are as follows:

Navigate to the

Sales 

over time (multiple rows)

sheet, where you will find a view identical to the one you just created.

Drag the

Category

field from

Dimensions

and drop it directly on top of the

Region

field currently on the

Marks

card. This replaces the

Region

field with

Category

. You now have 17 overlapping lines. Often, you'll want to avoid more than two or three overlapping lines. But you might also consider using color or size to showcase an important line in the context of the others. Also note that clicking an item in the color legend will highlight the associated line in the view. Highlighting is an effective way to pick out a single item and compare it to all the others.

Drag the

Category

field from

Color

on the

Marks

card and drop it into

Rows

. You now have a line chart for each category. Now you have a way of comparing each product over time without an overwhelming overlap, and you can still compare trends and patterns over time. This is the start of a spark-lines visualization that will be developed more fully in the

Advanced Visualizations

section of

Chapter 11

Advanced Visualizations, Techniques, Tips, and Tricks

.

Geographic visualizations

In Tableau, the built-in geographic database recognizes geographic roles for fields, such as Country, State, City, Airport, Congressional District, or Zip Code. Even if your data does not contain latitude and longitude values, you can simply use geographic fields to plot locations on a map. If your data does contain latitude and longitude fields, you may use those instead of the generated values.

Tableau will automatically assign geographic roles to some fields based on a field name and a sampling of values in the data. You can assign or reassign geographic roles to any field by right-clicking the field in the data pane and using the Geographic Role option. This is also a good way to see what built-in geographic roles are available.

Tableau can also read shape files and geometries from some databases. These and other geographic capabilities will be covered in more detail in the Mapping Techniques section of Chapter 11, Advanced Visualizations, Techniques, Tips, and Tricks. In the following examples, we'll consider some of the key concepts of geographic visualizing.

Geographic visualization is incredibly valuable when you need to understand where things happen and whether there are any spatial relationships within the data. Tableau offers three main types of geographic visualization:

Filled maps (simply referred to as

maps

in the Tableau interface)

Symbol maps

Density maps

Filled maps