The Tableau Workshop: A practical guide to the art of data visualization with Tableau
()
About this ebook
Learning Tableau has never been easier, thanks to this practical introduction to storytelling with data. The Tableau Workshop breaks down the analytical process into five steps: data preparation, data exploration, data analysis, interactivity, and distribution of dashboards. Each stage is addressed with a clear walkthrough of the key tools and techniques you'll need, as well as engaging real-world examples, meaningful data, and practical exercises to give you valuable hands-on experience.
As you work through the book, you'll learn Tableau step by step, studying how to clean, shape, and combine data, as well as how to choose the most suitable charts for any given scenario. You'll load data from various sources and formats, perform data engineering to create new data that delivers deeper insights, and create interactive dashboards that engage end-users.
All concepts are introduced with clear, simple explanations and demonstrated through realistic example scenarios. You'll simulate real-world data science projects with use cases such as traffic violations, urban populations, coffee store sales, and air travel delays.
By the end of this Tableau book, you'll have the skills and knowledge to confidently present analytical results and make data-driven decisions.
Read more from Gupta Sumit
Real-Time Big Data Analytics Rating: 5 out of 5 stars5/5Building Web Applications with Python and Neo4j Rating: 0 out of 5 stars0 ratings
Related to The Tableau Workshop
Related ebooks
SQL for Data Analytics: Harness the power of SQL to extract insights from data Rating: 0 out of 5 stars0 ratingsTIBCO Spotfire – A Comprehensive Primer Rating: 0 out of 5 stars0 ratingsExcel Dashboards and Reports Rating: 5 out of 5 stars5/5Data Science for Marketing Analytics.: A practical guide to forming a killer marketing strategy through data analysis with Python Rating: 0 out of 5 stars0 ratingsInteractive Data Visualization with Python: Present your data as an effective and compelling story, 2nd Edition Rating: 0 out of 5 stars0 ratingsThe MySQL Workshop: A practical guide to working with data and managing databases with MySQL Rating: 0 out of 5 stars0 ratingsThe Clojure Workshop: Use functional programming to build data-centric applications with Clojure and ClojureScript Rating: 0 out of 5 stars0 ratingsExcel 2019 Bible Rating: 5 out of 5 stars5/5The Go Workshop: Learn to write clean, efficient code and build high-performance applications with Go Rating: 0 out of 5 stars0 ratingsAdobe Analytics For Dummies Rating: 5 out of 5 stars5/5Hallo Microsoft Excel: Mastering Data Analytics Rating: 0 out of 5 stars0 ratingsThe C++ Workshop: Learn to write clean, maintainable code in C++ and advance your career in software engineering Rating: 0 out of 5 stars0 ratingsTableau Prep Cookbook: Use Tableau Prep to clean, combine, and transform your data for analysis Rating: 0 out of 5 stars0 ratingsData Science Projects with Python.: A case study approach to gaining valuable insights from real data with machine learning Rating: 0 out of 5 stars0 ratingsBalanced Scorecards and Operational Dashboards with Microsoft Excel Rating: 2 out of 5 stars2/5iOS 6 Foundations Rating: 0 out of 5 stars0 ratingsThe C# Workshop.: Kickstart your career as a software developer with C# Rating: 0 out of 5 stars0 ratingsExcel Dashboards and Reports For Dummies Rating: 5 out of 5 stars5/5Excel 2010 Just the Steps For Dummies Rating: 0 out of 5 stars0 ratingsMastering QlikView Rating: 5 out of 5 stars5/5The TypeScript Workshop: A practical guide to confident, effective TypeScript programming Rating: 0 out of 5 stars0 ratingsThe Informed Company: How to Build Modern Agile Data Stacks that Drive Winning Insights Rating: 0 out of 5 stars0 ratingsData Analytics & Visualization All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsThe Ruby Workshop: Develop powerful applications by writing clean, expressive code with Ruby and Ruby on Rails Rating: 0 out of 5 stars0 ratingsThe Data Science Workshop: A New, Interactive Approach to Learning Data Science Rating: 0 out of 5 stars0 ratingsThe SQL Workshop: Learn to create, manipulate and secure data and manage relational databases with SQL Rating: 0 out of 5 stars0 ratings
Data Visualization For You
How to Lie with Maps Rating: 4 out of 5 stars4/5Data Visualization: A Practical Introduction Rating: 5 out of 5 stars5/5Effective Data Storytelling: How to Drive Change with Data, Narrative and Visuals Rating: 4 out of 5 stars4/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5Hands-On Data Analysis with Pandas: Efficiently perform data collection, wrangling, analysis, and visualization using Python Rating: 0 out of 5 stars0 ratingsTeach Yourself VISUALLY Power BI Rating: 0 out of 5 stars0 ratingsLearning pandas - Second Edition Rating: 4 out of 5 stars4/5DAX Patterns: Second Edition Rating: 5 out of 5 stars5/5Mastering Excel: Excel Apps Rating: 3 out of 5 stars3/5Ultimate Azure Data Engineering Rating: 0 out of 5 stars0 ratingsThe Big Book of Dashboards: Visualizing Your Data Using Real-World Business Scenarios Rating: 4 out of 5 stars4/5Simple Data Science (R) Rating: 5 out of 5 stars5/5Data Analytics & Visualization All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsData Structures & Algorithms Interview Questions You'll Most Likely Be Asked Rating: 1 out of 5 stars1/5Learning Tableau 2019 - Third Edition: Tools for Business Intelligence, data prep, and visual analytics, 3rd Edition Rating: 0 out of 5 stars0 ratingsLearning Tableau Rating: 0 out of 5 stars0 ratingsAdvanced Splunk Rating: 5 out of 5 stars5/5How to be Clear and Compelling with Data: Principles, Practice and Getting Beyond the Basics Rating: 0 out of 5 stars0 ratingsTableau 10 Business Intelligence Cookbook Rating: 0 out of 5 stars0 ratingsLearning Tableau 10 - Second Edition Rating: 4 out of 5 stars4/5Fieldwork Handbook: A Practical Guide on the Go Rating: 0 out of 5 stars0 ratingsMastering D3.js Rating: 3 out of 5 stars3/5Splunk Developer's Guide - Second Edition Rating: 0 out of 5 stars0 ratingsHands-On Time Series Analysis with R: Perform time series analysis and forecasting using R Rating: 0 out of 5 stars0 ratingsVisualizing Graph Data Rating: 0 out of 5 stars0 ratings
Reviews for The Tableau Workshop
0 ratings0 reviews
Book preview
The Tableau Workshop - Gupta Sumit
The Tableau Workshop
Copyright © 2022 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 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 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.
Authors: Sumit Gupta, Sylvester Pinto, Shweta Sankhe-Savale, JC Gillet, and Kenneth Michael Cherven
Reviewers: Siddharth Pawar and Murari Ramuka
Development Editor: Aditi Hinge
Acquisitions Editor: Sneha Shinde
Production Editor: Salma Patel
Editorial Board: Megan Carlisle, Heather Gopsill, Bridget Kenningham, Manasa Kumar, Alex Mazonowicz, Monesh Mirpuri, Abhishek Rane, Brendan Rodrigues, Ankita Thakur, Nitesh Thakur, and Jonathan Wray
First published: April 2022
Production reference: 1250422
ISBN: 978-1-80020-765-3
Published by Packt Publishing Ltd.
Livery Place, 35 Livery Street
Birmingham B3 2PB, UK
Table of Contents
Preface
1. Introduction: Visual Analytics with Tableau
Introduction
The Importance of Visual Analytics
The Tableau Product Suite
Introduction to Tableau Desktop
Exercise 1.01: Connecting to a Data Source
Exercise 1.02: Creating a Comparison Chart Using Manual Drag and Drop
Exercise 1.03: Creating a Comparison Chart Using the Automated Show Me Button Method
Data Visualization Using Tableau Desktop
Saving and Sharing Your Work
Exercise 1.04: Saving Your Work as a Static Snapshot-PowerPoint Export
Exercise 1.05: Saving Your Work as a Tableau Interactive File–Tableau Packaged Workbook
Activity 1.01: Identifying and Creating the Appropriate Chart to Find Outliers in Your Data
Summary
2. Data Preparation: Using Tableau Desktop
Introduction
Connecting to a Data Source
Exercise 2.01: Connecting to an Excel File
Connecting to a Server Data Source
Various Joins in Tableau
Different Types of Joins
Exercise 2.02: Creating an Inner Join Dataset
Exercise 2.03: Creating a Left Join Dataset
Exercise 2.04: Creating a Right Join Dataset
Exercise 2.05: Creating a Combined Dataset Using Union
Data Transformation in the Data Pane
Data Interpreter
Renaming the Data Source
Live and Extract Connections
Exercise 2.06: Creating an Extract for Data
Extract Properties
The Data Storage field
The Filters field
The Aggregation Field
The Number of Rows Field
Which Connection Is Better – Live or Extract?
Filters
Exercise 2.07: Adding a Region Filter on the Orders Table
Data Grid Options
Custom SQL
Data Blending
Exercise 2.08: Creating a Data Blend Using the Orders and People Tables
Exercise 2.09: Visualizing Data Created from a Data Blend
Limitations of Data Blending
Activity 2.01: Identifying the Returned Orders
Activity 2.02: Preparing Data for Visualization
Summary
3. Data Preparation: Using Tableau Prep
Introduction
Prep Interface
Adding Data in the Flow
Exercise 3.01: Connecting to an Excel File
Exercise 3.02: Connecting with Multiple Data Sources
Data Source Profile
Exercise 3.03: Data Profile for the Orders_South Dataset
Data Preparation Using Clean, Groups, and Split
Additional Clean Steps
Cleaning Steps at the Column Level
Exercise 3.04: Applying a Filter in a Clean Step
Exercise 3.05: Cleaning a Column in the Workflow
Grouping Values
Exercise 3.06: Grouping Values into a Group
Splitting Values
Exercise 3.07: Splitting Columns
Aggregation, Pivot, Join, and Union
Aggregations
Exercise 3.08: Identifying High-Value Customers Based on Purchases
Pivoting Data
Exercise 3.09: Using a Pivot for Data
Joining and Union of Data
Exercise 3.10: Joining Two Data Sources
Union
Exercise 3.11: Union of Tables
Script Step
Flow and Data Exports
Exercise 3.12: Exporting Data
Activity 3.01: Finding the Month with the Highest Orders
Activity 3.02: Data Transformation
Summary
4. Data Exploration: Comparison and Composition
Introduction
Exploring Comparisons across Dimensional Items
Bar Chart
Exercise 4.01: Creating Bar Charts
Exploring Comparisons over Time
Exercise 4.02: Creating Bar Charts for Data over Time
Line Charts
Difference between Discrete Dates and Continuous Dates
Exercise 4.03: Creating Line Charts over Time
Exploring Comparison across Measures
Exercise 4.04: Creating a Bullet Chart
Bar-in-Bar Charts
Exercise 4.05: Creating a Bar-in-Bar Chart
Exploring Composition Snapshots – Stacked Bar Charts
Exercise 4.06: Creating a Stacked Bar Chart
Exploring Composition Snapshots – Pie Charts
Exercise 4.07: Creating a Pie Chart
Treemaps
Exercise 4.08: Creating Treemaps
Exploring Compositions for Trended Data
Area Charts
Exercise 4.09: Creating an Area Chart
Activity 4.01: Visualizing the Growth of Passenger Cars in Singapore
Summary
5. Data Exploration: Distributions and Relationships
Introduction
Exploring Distribution for a Single Measure
Creating a Histogram
Exercise 5.01: Creating a Histogram
Box and Whisker Plots
Exercise 5.02: Creating a Box and Whisker Plot without the Show Me Panel
Exercise 5.03: Box Plot Using the Show Me Panel
Relationship and Distribution with Multiple Measures
Distribution with Two Measures
Creating a Scatter Plot
Exercise 5.04: Creating a Scatter Plot
Scatter Plots with Trend Lines
Exercise 5.05: Trend Lines with Scatter Plots
Trend Lines and Types
Linear Trend Lines
Polynomial Trend Lines
Polynomial Degree of Freedom
Logarithmic Trend Lines
Exponential Trend Lines
Power Trend Lines
The Reliability of Trend Lines
R-Squared
P-value
Advanced Charts
Quadrant Charts
Reference Lines
Understanding Reference Lines
Exercise 5.06: Creating Quadrant Charts
Combination Charts – Dual axis Charts
Exercise 5.07: Creating Dual axis Charts
Activity 5.01: Creating Scatter Plots
Activity 5.02: Dual axis Chart with Asynchronous Axes
Summary
6. Data Exploration: Exploring Geographical Data
Introduction
Importing Spatial Data
Data File Types
ESRI Shapefiles
GeoJSON Files
KML Files
MapInfo Interchange Format
MapInfo Tables
TopoJSON Files
Downloading the Data Source from GitHub
Exercise 6.01: Downloading the Source Data
Importing Non-Spatial Geographic Data Sources
Exercise 6.02: Importing a Non-Spatial Data Source
Data Relationships
Exercise 6.03: Joining Two Data Sources
Managing Location Data
Assigning Geographic Roles
Editing Locations
Building Custom Geographies
Creating a New Geography Using an Existing Role
Creating a New Geography Using Groups
Exercise 6.04: Building Custom Geographies
Creating Maps in Tableau
Geocoding
Symbol Maps
Adding Data to Symbol Maps
Coloring a Symbol Map
Sizing a Symbol Map
Using Shapes in a Symbol Map
Adding Map Tooltips
Navigating Symbol Maps
Filtering Symbol Maps
Creating Groups and Sets from Symbol Map Data
Exercise 6.05: Building a Symbol Map
Choropleth (Filled) Maps
Coloring a Choropleth Map
Navigating a Choropleth Map
Filtering a Choropleth Map
Exercise 6.06: Building a Choropleth Map
Dual-Axis Maps
Exercise 6.07: Creating a Dual-Axis Map
Map Enhancements
Setting Map Options
Using Existing Layers
Adding Mapbox Background Maps
Exercise 6.08: Adding Mapbox Background Maps
Activity 6.01: Creating a Location Analysis Using Dual Axis and Background Maps
Summary
7. Data Analysis: Creating and Using Calculations
Introduction
Creating and Using Ad hoc / Edit in Shelf Calculations
Exercise 7.01: Creating an Ad Hoc Calculation to Highlight Loss-Making Sub-Categories
Creating and Using Different Types of Calculations
Creating and Using Different Types of Calculations: Numeric Calculations
Exercise 7.02: Creating a Numeric Calculation
Creating and Using Different Types of Calculations: Logic Statements
Exercise 7.03: Creating a Logic Calculation
Creating and Using Different Types of Calculations: String Calculations
Exercise 7.04: Creating a String Calculation
Creating and Using Different Types of Calculations: Date Calculations
Exercise 7.05: Creating a Date Calculation
Handling Null Values while Creating and Using Calculations
Creating Calculations across Data Sources
Activity 7.01: Calculating the Profit Margin
Activity 7.02: Calculating the Percentage Achievement with Respect to Budget Sales
Summary
8. Data Analysis: Creating and Using Table Calculations
Introduction
Quick Table Calculations
Running Total
Exercise 8.01: Creating a Running Total Calculation
Difference
Exercise 8.02: Creating a Difference Calculation
Percent of Total
Exercise 8.03: Creating a Percent of Total Calculation
Percent Difference
Exercise 8.04: Creating a Percent Difference Calculation
Percentile and Rank
Exercise 8.05: Creating Percentile and Rank Calculations
Moving Average
Exercise 8.06: Creating a Moving Average Calculation
Table Calculation Application: Addressing and Partitioning
Table (across)
Exercise 8.07: Creating a Table (across) Calculation
Table (down)
Exercise 8.08: Creating a Table (down) Calculation
Exercise 8.09: Creating Table (across then down) and Table (down then across) Calculations
Exercise 8.10: Creating a Pane (across) Calculation
Exercise 8.11: Pane (down) Calculation
Exercise 8.12: Creating a Pane-Level Calculation
Cell
Creating, Editing, and Removing Table Calculations
Creating a New Table Calculation
Exercise 8.13: Creating a Table Calculation Using the Calculation Editor
Removing a Table Calculation
Activity 8.01: Managing Hospital Bed Allocations
Activity 8.02: Planning for a Healthy Population
Summary
9. Data Analysis: Creating and Using Level of Details (LOD) Calculations
Introduction
Exercise 9.01: Creating a LOD Calculation
Types of LOD Calculations
FIXED
Exercise 9.02: Creating a FIXED LOD Calculation
INCLUDE
Exercise 9.03: Creating an INCLUDE LOD Calculation
EXCLUDE
Exercise 9.04: Creating an EXCLUDE LOD Calculation
Table-Scoped
LOD Calculations: Dimensions or Measures?
Aggregation and LOD Calculations
LOD Calculation Is Higher than the View LOD
LOD Calculation Is Finer than the View LOD
Nested LOD Calculations
Effects of Filters on LOD Calculations
Activity 9.01: Identifying the Top-Performing Sales Executives
Activity 9.02: Performing a Comparative Analysis
Summary
10. Dashboards and Storyboards
Introduction
The Who, What, and Why of the Dashboard
The Who: Audience
The What: Begin with the End in Mind
The Why: The Need for a Dashboard
Designing a Dashboard
The Basic Layout
Display Size
Positioning
Spacing
Colors
Size
Text
Exercise 10.01: Text Formatting – Workbook versus Worksheet
Dashboard Objects
Vertical Objects
Horizontal Objects
Text Objects
Image Objects
Web Page Objects
Blank Objects
Navigation Objects
Extension Object
Using Floating Objects
Exercise 10.02: KPIs and Metrics View
Exercise 10.03: Map and Parameter Worksheet Views
Exercise 10.04: Putting It All Together: Dashboarding
Creating Storyboards
Exercise 10.05: Creating a Simple Storyboard
Activity 10.01: Building a Complete Dashboard
Summary
11. Tableau Interactivity: Part 1
Introduction
Grouping Data
Exercise 11.01: Creating Groups
Hierarchies
Exercise 11.02: Creating Hierarchies
Filters: The Heart and Soul of Tableau
Data Source and Extract Filters
Exercise 11.03: Filtering Data Using Extract/Data Source Filters
Filters Using Views
Exercise 11.04: Creating Filters from the View
Creating Filters Using the Filters Shelf
Dimension Filters Using the Filters Shelf
Exercise 11.05: Dimension Filters Using the Filters Shelf
Measure Filters Using the Filters Shelf
Exercise 11.06: Measuring Filters Using the Filters Shelf
Date Filters Using the Filters Shelf
Exercise 11.07: Creating Date Filters Using the Filters Shelf
Quick Filters
Exercise 11.8: Creating Quick Filters
Applying Filters across Multiple Sheets/Multiple Data Sources or an Entire Data Source
Context Filters
Exercise 11.09: Creating and Using Context Filters
Sets
Static Sets
Exercise 11.10: Creating Static Sets
Dynamic Sets
Exercise 11.11: Creating Dynamic Sets
Adding Members to the Set
Exercise 11.12: Adding Members to the Set
Combined Sets
Exercise 11.13: How to Create Combined Sets
Parameters
Exercise 11.14: Standard Parameters
Dynamic Parameters
Exercise 11.15: Dynamic Parameters
Activity 11.01: Top N Countries Using Parameters, Sets, and Filters
Summary
Preface
About the Book
Learning Tableau has never been easier, thanks to this practical introduction to storytelling with data. The Tableau Workshop breaks down the analytical process into five steps: data preparation, data exploration, data analysis, interactivity, and distribution of dashboards. Each stage is addressed with a clear walk-through of the key tools and techniques you'll need, as well as engaging real-world examples, meaningful data, and practical exercises to give you valuable hands-on experience.
As you work through the book, you'll learn Tableau step by step, studying how to clean, shape, and combine data, as well as how to choose the most suitable charts for any given scenario. You'll load data from various sources and formats, perform data engineering to create new data that delivers deeper insights, and create interactive dashboards that engage end users.
All concepts are introduced with clear, simple explanations and demonstrated through realistic example scenarios. You'll simulate real-world data science projects with use cases such as traffic violations, urban populations, coffee store sales, and air travel delays.
By the end of this Tableau book, you'll have the skills and knowledge to confidently present analytical results and make data-driven decisions.
About the Authors
Sumit Gupta is an analytics professional with more than 7 years' experience spanning across marketing, sales, and product analytics. As a consultant and trainer, he has utilized Tableau to build better data-driven teams for his organization. Sumit specializes in translating vast amounts of data into easy-to-understand dashboards which provide actionable intelligence. He is a Tableau Certified Associate and enjoys training data enthusiasts to become better Tableau developers and certified Tableau associates. This book is one such effort to reach masses.
I would like to thank my family for being incredibly supportive through this book-writing journey, especially my super-mom. Without her, I wouldn’t be where I am today. I would also like to thank my friends (Piyush and Sheshnath, to name a few) and mentors/leaders/managers who have also pushed me to become better every day. Onwards and Upwards!
Sylvester Pinto has been using Tableau for almost a decade now for improving business performance for different industries. Sylvester has designed various business solutions using Tableau for different organizations leading to a huge impact to improve their businesses. He has a Tableau certification and as a consultant designs solutions for various organizations.
Shweta Sankhe-Savale is the co-founder and Head of Client Engagements at Syvylyze Analytics (pronounced civilize
), a boutique business analytics firm specializing in visual analytics. Shweta is a Tableau Desktop Qualified Associate and a Tableau Accredited Trainer. Being one of the leading experts on Tableau in India, Shweta has translated her experience and expertise into successfully rendering analytics and data visualization services for numerous clients across a wide range of industry verticals. She has taken on numerous training and consulting assignments for customers across sectors such as BFSI, FMCG, retail, e-commerce, consulting and professional services, manufacturing, healthcare and pharma, ITeS, and more. She even had the privilege of working with renowned government and UN agencies. Combining her ability to break down complex concepts with her expertise on Tableau's visual analytics platforms, Shweta has successfully trained over 1,300 participants from 85+ companies.
Jean-Charles (JC) Gillet is a seasoned business analyst with over 7 years of experience with SQL at both a large-scale multinational company in the United Kingdom and a smaller firm in the United States, and 5 years of Tableau experience. He has been working with Tableau and SQL for multiple years to share his expertise with his colleagues, as well as delivering SQL training. A French national, JC holds a master's degree in executive engineering from Mines ParisTech and is a Tableau Desktop Certified Associate.
In his free time, he enjoys spending time with his wife and daughter (to whom he dedicates his work on this book) and playing team handball, having competed in national championships.
I'd like dedicate this work first and foremost to my wife and two children, who stand by my side every day, through thick and thin. But also to my parents, who taught me my core values, and my managers, especially my mentors and friends Robert and Miguel, who have meant so much to me.
Kenneth Michael Cherven is a Data Analyst and Visualizer based in Detroit, Michigan, USA. He has worked with Tableau for more than 15 years with a focus on making complex data easily understood through the of interactive dashboards and creative displays. Beyond his work in the automotive sector, Kenneth analyzes data and creates visualizations using open data sources from the baseball, government, music, and craft beer domains. Ken has previously published two titles for Packt – Network Graph Analysis and Visualization with Gephi and Mastering Gephi Network Visualization.
Who This Book Is For
This book is for anyone who wants to get started on visual analytics with Tableau. If you're new to Tableau, this Workshop will get you up and running. If you already have some experience in Tableau, this book will help fill in any gaps, consolidate your understanding, and give you extra practice with the key tools.
About the Chapters
Chapter 1, Introduction: Visual Analytics with Tableau, teaches you the basic skills needed to understand data and its visual elements for reporting and creating dashboards.
Chapter 2, Data Preparation: Using Tableau Desktop, covers the essential skills you need to create reports in Tableau, such as loading, joining, transforming, blending, and manipulating data.
Chapter 3, Data Preparation: Using Tableau Prep, covers Tableau Prep and how Prep helps in cleaning and joining disparate data sources. You will learn how to perform data manipulation methods such as pivots, grouping, and aggregations, and finally, how to export the transformed data into Tableau.
Chapter 4, Data Exploration: Comparison and Composition, expands on your Tableau knowledge. You will start creating charts in Tableau, including line, bar, and stacked area charts. You will also learn how to create trend reports.
Chapter 5, Data Exploration: Distributions and Relationships, covers reference lines and advanced chart types such as Dual Axis and Quadrant charts.
Chapter 6, Data Exploration: Exploring Geographical Data, teaches you how to explore geographical data to perform location-based analysis in Tableau.
Chapter 7, Data Analysis: Creating and Using Calculations, covers calculations, including numeric, string, and date calculations. You will also learn how to write logical statements in calculated fields.
Chapter 8, Data Analysis: Creating and Using Table Calculations, touches on table calculations and how they differ from calculated fields, and when to use table calculations versus calculated fields.
Chapter 9, Data Analysis: Creating and Using Level of Details (LOD) Calculations, covers LOD calculations, with which you will learn how to control the aggregation level in your view.
Chapter 10, Dashboards and Storyboards, covers the basics of using a blank canvas to build interactive dashboards, including adding branding elements, filters, and web pages. Finally, we will also cover storyboards and how they differ from dashboards.
Chapter 11, Tableau Interactivity: Part 1, dives deeper into Tableau Order of Operations, Filters, Sets, and Parameters, while reinforcing the other charting and dashboarding skills.
This is part one of a two-part topic, the latter half of which is available online.
Note
There are also three bonus chapters (Chapter 12, Tableau Interactivity: Part 2; Chapter 13, Distribution of Dashboards; and Chapter 14, Case Study) which you can find at https://packt.link/SHQ4H.
You can also find solutions for all activities in this Workshop online at https://packt.link/CTCxk.
Conventions
Code words in text form, database and collection names, file and folder names, shell commands, and user input use the following format: There are also other File, Edit, Flow, and Server menu options at the top. The purposes of the File and Edit options are self-explanatory. The Flow menu can be used to run the flow and the Server menu has the option to sign in and publish the flow on Tableau Server.
Often at the beginning of chapters, key new terms will be introduced. In these cases, the following formatting will be used: Understanding aggregations is the most fundamental concept you need to keep in mind when working with Tableau.
Minimum Hardware Requirements
For an optimal experience, we recommend the following hardware configuration:
Processor: Dual core or better
Memory: 4 GB RAM
Storage: 10 GB available space
Minimum Software Requirements
Unlike hardware requirements, software requirements can be challenging to list because Tableau releases new updates to their software every 3-6 months and there are new features added with these new releases. But considering the exercises/activities planned in this book, we expect the following to be required at minimum:
Tableau Desktop 2020.1 or above
Tableau Prep 2020.1 or above
This book was written and reviewed using Tableau versions 2020.1.x. Though new versions of Tableau are frequently released, the steps used for the exercises and activities in this book are unlikely to change with the version changes. Any known differences at the time of publication will be noted within the text as relevant.
Downloading the Book/Data Sources Bundle
GitHub link: https://packt.link/jqzD0
Download all the folders and data files from GitHub (as shown) or download individual chapter files separately as needed.
Figure 0.1: GitHub filesFigure 0.1: GitHub files
Setting Up Your Environment
Before you begin the book, you need to set up both Tableau Desktop and Tableau Prep. In this section, you will see how to install Tableau Desktop. Once you have followed these steps and installed Tableau Desktop, you will also then need to follow the same steps to download Tableau Prep. The download links are as follows:
Tableau Desktop 2020.1: https://www.tableau.com/support/releases
Tableau Prep 2020.1: https://www.tableau.com/support/releases/prep
Installing Tableau on Your System
From https://www.tableau.com/support/releases/, click on 2020.1 to expand the list. Click on any of the 2020.1.XX links as follows:
Figure 0.2: Tableau downloads/release notes pageFigure 0.2: Tableau downloads/release notes page
Click on 2020.1.20 and on the new page which was loaded. Next, either click on Download Tableau Desktop 2020.1.20 and Tableau will automatically detect your operating system, or else scroll down to the Download Files section and click on the appropriate download link for your operating system (Windows or Mac).
Figure 0.3: Tableau download 2020.1.20 pageFigure 0.3: Tableau download 2020.1.20 page
Once you have downloaded the file, open your downloads folder, and double-click on the downloaded file. You will see the following screen if you are using a Mac (Windows will have a similar workflow):
Figure 0.4: Tableau Desktop installer: introductionFigure 0.4: Tableau Desktop installer: introduction
Follow the prompt by clicking on Continue and agreeing to the terms and conditions of the software license agreement:
Figure 0.5: Tableau software agreement promptFigure 0.5: Tableau software agreement prompt
It might take a minute or two to install the software and you may be asked to restart your system, depending on your computer's configuration.
Once the files are written, you should see the following success message. Click on Close to finish the installation:
Figure 0.6: Tableau installation completeFigure 0.6: Tableau installation complete
To verify whether the software was installed, if you are using Mac, press cmd + Space to open spotlight search and type in Tableau. You should see the following on your screen. Similarly, if you are using Windows, click on the Windows button and type Tableau to open the application.
Figure 0.7: Searching Tableau in spotlight searchFigure 0.7: Searching Tableau in spotlight search
You can follow the same steps to install Tableau Prep by downloading the software from the download link above. When you load either Tableau Desktop or Tableau Prep for the first time, you might be required to register the software and enter the license key. Depending on your situation, either your organization might be able to provide the license keys, or you can start a 14-day trial to explore the software. Finally, if you are a student or teacher, Tableau offers free 1-year licenses; to learn more, visit https://www.tableau.com/academic/students.
Get in Touch
Feedback from our readers is always welcome.
General feedback: If you have any questions about this book, please 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 could report this to us. Please visit www.packtpub.com/support/errata and complete the form.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you could 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.
Please Leave a Review
Let us know what you think by leaving a detailed, impartial review on Amazon. We appreciate all feedback – it helps us continue to make great products and help aspiring developers build their skills. Please spare a few minutes to give your thoughts – it makes a big difference to us. You can leave a review by clicking the following link: https://packt.link/r/1800207654.
1. Introduction: Visual Analytics with Tableau
Overview
In this chapter, you will learn about Visual Analytics and why it is important to visualize your data. You will connect to data using Tableau Desktop and familiarize yourself with the Tableau workspace. By the end of this chapter, you will be well acquainted with the Tableau interface and some of the fundamental important concepts that will help you get started with Tableau. The topics that are covered in this chapter will mark the start of your Tableau journey.
Introduction
At a very broad level, the whole data analytics process can be broken down into the following steps: data preparation, data exploration, data analysis, and distribution. This process typically starts with a question or a goal, which is followed by finding and getting the relevant data. Once the relevant data is available, you then need to prepare this data for your exploration and analysis stage. You might have to clean and restructure the data to get it in the right form, maybe combine it with some additional datasets, or enhance the data by creating some calculations. This stage is referred to as the data preparation stage. After this comes the data exploration stage. It is at this stage that you try to see the composition and distribution of your data, compare data, and identify relationships if any exist. This step gives an idea of what kind of analysis can be done with the given dataset.
Typically, people like to explore the data by looking at it in its raw form (that is, at the data preparation stage); however, a quick and easy way to explore the data is to visualize it. Visualizing the data can reveal patterns that were difficult to recognize in the raw data.
The data exploration stage is followed by the data analysis stage, in which you analyze your data and develop insights that can be shared with others. These insights, when visualized, will enable easier interpretation of data, which in turn leads to better decision making. In very simplistic terms, the process of exploring and analyzing the data by visualizing it as charts and graphs is called visual analytics.
As mentioned earlier, the idea behind visualizing your data is to enable faster decision making. Finally, the last step in the data analytics cycle is the distribution stage, wherein you share your work with other stakeholders who can consume this information and act upon it.
In this chapter, we will discuss all these topics in detail, starting with a further exploration of the value of the titular process.
The Importance of Visual Analytics
As mentioned earlier, Visual Analytics
can be defined as the process of exploring and analyzing data by visualizing it as charts and graphs. This enables end users to quickly consume the information and, in turn, empowers them to make quicker and better decisions.
In this section, you will learn why data visualization is a better tool for evaluation than looking at large volumes of data in numeric format.
All of us have at some point heard the expression A picture is worth a thousand words.
Indeed, it has been found that humans are great at identifying and recognizing patterns and trends in data when consumed as visuals as opposed to large volumes of data in tabular or spreadsheet formats.
To understand the importance and the power of data visualization/visual analytics, let's look at one of the classic examples: Anscombe's Quartet. Anscombe's quartet is comprised of four distinct datasets with nearly identical statistical properties, yet completely different distributions and visualizations.
Note
This was developed in 1973 by an English statistician named Francis John (Frank) Anscombe, after whom it was named.
Let's take a deeper look at these datasets.
Figure 1.1: A screenshot showing the datasets used in Anscombe's quartetFigure 1.1: A screenshot showing the datasets used in Anscombe's quartet
As you can see in the preceding figure, each dataset consists of 11 X and Y points. Now, if you were to analyze these datasets using typical descriptive statistics such as mean, standard deviation, and correlation between X and Y, you would see that the output is identical.
Figure 1.2: A screenshot showing descriptive statistics of the Anscombe's quartet dataFigure 1.2: A screenshot showing descriptive statistics of the Anscombe's quartet data
Looking at the preceding figure, you can see the following:
The mean of X for each dataset is 9 (exact accuracy).
The standard deviation for X for each dataset is 3.32 (exact accuracy).
The mean of Y for each dataset is 7.50 (accurate up to two decimals).
The standard deviation for Y for each dataset is 2.03 (accurate up to two decimals).
The correlation between X and Y for each dataset is 0.816 (accurate up to three decimals).
So, by looking at the above statistical inferences, you would assume that these datasets are identical until you decide to visualize each of them, the results of which are displayed below.
The images show how these datasets appear when visualized as graphs. Now, let's compare each of these visualizations side by side so that you can see how different each of these datasets really are.
Figure 1.3: A screenshot showing a graphical representation of all four datasets of Anscombe's quartetFigure 1.3: A screenshot showing a graphical representation of all four datasets of Anscombe's quartet
The preceding example highlights how data visualization can help uncover patterns in data that it was not possible to see by simply looking at the numbers and/or just analyzing the data statistically. This is exactly why Francis Anscombe created his quartet.
He wanted to counter the argument that numerical calculations are exact, but graphs are rough,
which, back then, was a quite common impression among statisticians.
Next, take a look at one more example of how visualizing data helps us find quick insights. Refer to the following figure:
Figure 1.4: A screenshot of a grid view showing the marketing expense and profitability for products across marketsFigure 1.4: A screenshot of a grid view showing the marketing expense and profitability for products across markets
In the preceding figure, you can see a grid view of fields such as Product Type, Product, Market, Marketing, and Profit. In the data that you have used, Marketing is the money that is spent on any marketing efforts to promote products, and Profit is the profit generated after those marketing efforts. Further, these values are broken down by dimensions such as Product Type, Product, and Market. The idea is to evaluate how each product is doing in terms of Marketing and Profit across different markets.
Now, displaying this information in a grid format, as shown above, results in 84 numbers being shown in the view, and doing any kind of comparison across these 84 numbers is going to be very difficult. So, imagine you want to find out whether there are any products in any specific markets where losses are made even after spending significant money on the marketing efforts. Then you will end up comparing these numbers horizontally as well as vertically, which, honestly, is a bit tedious. However, let's see whether visualizing this data makes any difference. Refer to the following figure:
Figure 1.5: A bar chart comparing the marketing expense and profitability for productsFigure 1.5: A bar chart comparing the marketing expense and profitability for products
In the preceding figure, you can see that the length of the bar is the money spent on Marketing, whereas the color of the bar represents the Profit value. So basically, the longer the bar, the more money was spent on marketing; the darker the shade of blue, the more profitable the product; and the darker the shade of orange, the greater the loss accrued.
Looking back at that figure, note that the longest bar is Caffe Mocha in the East market. This means that Caffe Mocha has the highest marketing spending, but because the color of that bar is orange, you also know that it is accruing a loss.
This is another example that demonstrates the power of data visualization.
Now that you have understood what visual analytics is and why it is important, let's look at some data visualization tools in the next section.
The Tableau Product Suite
There are a lot of tools available on the market offering various features and functionalities that you can use to visualize your data. When it comes to business analytics and data visualization, Tableau is one of the leading tools in this space because of its ease of use and drag and drop functionality, which makes it easier even for a business user to start making sense of their data. Tableau has different tools for different purposes, available in the Tableau product suite, which we'll explore in this section.
The entire suite can be divided into three parts: data preparation, data visualization, and consumption or distribution. Refer to the following figure:
Figure 1.6: A screenshot showing the Tableau product suiteFigure 1.6: A screenshot showing the Tableau product suite
As shown in the preceding figure, you have Tableau Prep in the Data