41,99 €
Explore and understand data with the powerful data visualization techniques of Tableau, and then communicate insights in powerful ways
Graphical presentation of data enables us to easily understand complex data sets. Tableau 10 Complete Reference provides easy-to-follow recipes with several use cases and real-world business scenarios to get you up and running with Tableau 10.
This Learning Path begins with the history of data visualization and its importance in today's businesses. You'll also be introduced to Tableau - how to connect, clean, and analyze data in this visual analytics software. Then, you'll learn how to apply what you've learned by creating some simple calculations in Tableau and using Table Calculations to help drive greater analysis from your data. Next, you'll explore different advanced chart types in Tableau. These chart types require you to have some understanding of the Tableau interface and understand basic calculations. You’ll study in detail all dashboard techniques and best practices. A number of recipes specifically for geospatial visualization, analytics, and data preparation are also covered. Last but not least, you'll learn about the power of storytelling through the creation of interactive dashboards in Tableau.
Through this Learning Path, you will gain confidence and competence to analyze and communicate data and insights more efficiently and effectively by creating compelling interactive charts, dashboards, and stories in Tableau.
This Learning Path includes content from the following Packt products:
Tableau 10 Complete Reference is designed for anyone who wants to understand their data better and represent it in an effective manner. It is also used for BI professionals and data analysts who want to do better at their jobs.
Joshua N. Milligan has been with Teknion Data Solutions since 2004 and currently serves as a principal consultant. With a strong background in software development and custom .NET solutions, he brings a blend of analytical and creative thinking to BI solutions, data visualization, and data storytelling. His years of consulting have given him hands on experience in all aspects of the BI development cycle from data modeling, ETL, enterprise deployment, data visualization, and dashboard design. He has worked with clients in numerous industries including financial, energy, healthcare, marketing, government, and services. Joshua has been named by Tableau as a Tableau Zen Master every year since 2014. This places Joshua in a group of individuals recognized by Tableau as not only masters of the tool but also who have a deep desire to teach and help others. As a Tableau Ambassador, trainer, mentor, and leader in the online Tableau community, Joshua is passionate about helping others gain insights from their data. He frequently broadcasts webinars to educate and inform the Tableau community and the world at large about the wonders of Tableau and is a much sought after featured speaker at Tableau conferences, user groups and various technology and industry functions. He thrives on helping others. Joshua is the author of the first edition of Learning Tableau, which quickly became one of the highest acclaimed Tableau books for users at all levels. He was a technical reviewer of the Tableau Data Visualization Cookbook, Creating Data Stories with Tableau Public, and his work has been featured multiple times on Tableau Public’s Viz of the Day and Tableau’s website. He also shares frequent Tableau tips, tricks, and advice along with a variety of dashboards on his fun and creative blog site, VizPainter. You can follow Joshua on Twitter at @VizPainter. Tristan Guillevin is a true data lover who likes to share his passion. He graduated from engineering school in 2015. During these years, he went to Burkina Faso to teach computer science in schools around the country. The will to share and help people never left him since then. He started his professional life as a consultant at Actinvision, where he discovered Tableau. Soon, data visualization became a passion that has taken him around the world. In 2017, he won the Iron Viz (the ultimate data visualization battle organized by Tableau every year) in Las Vegas. Since his winning, he helps people with Tableau by making webinars, conferences, blog articles, and finally, this book! He's currently working at Ogury as a business analyst.Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 436
Veröffentlichungsjahr: 2018
Copyright © 2018 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 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.
First Published: December 2018
Production Reference: 1211218
Published by Packt Publishing Ltd. Livery Place, 35 Livery Street Birmingham, B3 2PB, U.K.
ISBN 978-1-78995-708-2
www.packtpub.com
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.
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
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.
Joshua N. Milligan has been with Teknion Data Solutions since 2004 and currently serves as a Principal Consultant. With a strong background in software development and custom .NET solutions, he brings a blend of analytical and creative thinking to BI solutions, data visualization, and data storytelling. His years of consulting have given Joshua hands-on experience with all aspects of the BI development cycle from data modeling, ETL, enterprise deployment, data visualization, and dashboard design. He has worked with clients in numerous industries including financial, energy, healthcare, marketing, government, and services. Joshua has been named by Tableau as a Tableau Zen Master every year since 2014. This places Joshua in a group of individuals recognized by Tableau as not only masters of the tool but also who have a deep desire to teach and help others. As a Tableau Ambassador, trainer, mentor, and leader in the online Tableau community, Joshua is passionate about helping others gain insights from their data. He frequently broadcasts webinars to educate and inform the Tableau community and the world at large about the wonders of Tableau and is a much sought after featured speaker at Tableau conferences, user groups, and various technology and industry functions. He thrives on helping others. Joshua is the author of the first edition of Learning Tableau, which quickly became one of the highest acclaimed Tableau books for users at all levels. He was a technical reviewer of the Tableau Data Visualization Cookbook, Creating Data Stories with Tableau Public, and his work has been featured multiple times on Tableau Public’s Viz of the Day and Tableau’s website. He also shares frequent Tableau tips, tricks, and advice along with a variety of dashboards on his fun and creative blog site. You can follow Joshua on Twitter at @VizPainter.
Tristan Guillevin is a true data lover who likes to share his passion. He graduated from engineering school in 2015. During these years, he went to Burkina Faso to teach computer science in schools around the country. The will to share and help people never left him since then. He started his professional life as a consultant at Actinvision, where he discovered Tableau. Soon, data visualization became a passion that has taken him around the world. In 2017, he won the Iron Viz (the ultimate data visualization battle organized by Tableau every year) in Las Vegas. Since his winning, he helps people with Tableau by making webinars, conferences, blog articles, and finally, this book! He's currently working at Ogury as a business analyst.
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.
Title Page
Copyright
Tableau 10 Complete Reference
About Packt
Why Subscribe?
Packt.com
Contributors
About the Authors
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
Conventions Used
Get in Touch
Reviews
Creating Your First Visualizations and Dashboard
Connecting to data
Foundations for building visualizations
Measures and dimensions
Discrete and continuous
Discrete fields
Continuous fields
Visualizing data
Creating bar charts
Iterations of bar charts for deeper analysis
Creating line charts
Iterations of line charts for deeper analysis
Creating geographic visualizations
Filled maps
Symbol maps
Using Show Me
Bringing everything together in a dashboard
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
Blending example
Filtering data
Filtering discrete fields
Filtering continuous fields
Filtering dates
Other filtering options
Summary
Moving from Foundational to More Advanced Visualizations
Comparing values across different dimensions
Bar charts
Bar chart variations
Bullet chart – showing progress toward a goal
Bar in bar chart
Highlighting categories of interest
Visualizing dates and times
The built-in date hierarchy
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
Combination charts
Summary
Using Row-Level, Aggregate, and Level of Detail Calculations
Creating and editing calculations
Overview of the three main types of calculations
Row Level examples
Aggregate Level example
Row Level or Aggregate – why does it matter?
Level of Detail calculations
Level of Detail syntax
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
Achieving flexibility with data blends
Ad hoc calculations
Performance considerations
Summary
Table Calculations
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
Practical examples
Year – over – Year growth
Ranking within higher levels
Late filtering
Data densification
When and where data densification occurs
An example of leveraging data densification
Summary
Formatting a Visualization to Look Great and Work Well
Formatting considerations
Understanding how formatting works in Tableau
Worksheet level formatting
Field-level formatting
Additional formatting options
Adding value to visualizations
Tooltips
Summary
Telling a Data Story with Dashboards
Dashboard objectives
Example - is least profitable always unprofitable?
Building the views
Creating the dashboard framework
Implementing actions to tell the story
Designing for different displays and devices
How actions work
Filter actions
Highlight actions
URL actions
Example - regional scorecard
Stories
Summary
Deeper Analysis - Trends, Clustering, Distributions, and Forecasting
Trending
Customizing trend lines
Trend models
Analyzing trend models
Clustering
Distributions
Forecasting
Summary
Making Data Work for You
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
Techniques for dealing with data structure issues
Restructuring data in Tableau connections
Union files together
Originals
Prequels
Sequels
Cross-database joins
Working with different Level of Detail
Overview of advanced fixes for data problems
Summary
Advanced Visualizations, Techniques, Tips, and Tricks
Advanced visualizations
Slope chart
Lollipop chart
Waterfall chart
Sparklines
Dumbbell chart
Unit chart/symbol chart
Marimekko chart
Sheet swapping and dynamic dashboards
Dynamically showing and hiding other controls
Advanced mapping techniques
Supplementing the standard in geographic data
Manually assigning geographic locations
Creating custom territories
Ad hoc custom territories
Field – defined custom territories
Some final map tips
Using background images
Animation
Summary
Sharing Your Data Story
Presenting, printing, and exporting
Presenting
Printing
Exporting
Sharing with users of Tableau Desktop and 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
Catching Up with Tableau 2018
Tableau Desktop
Data Source improvements
Normalized extract (2018.3)
Spatial join (2018.2)
Other Data Source improvements
Visualization improvements
Density Mark (2018.3)
Step and jump lines (2018.1)
Worksheet transparency (2018.3)
Dual Axis mapping (2018.1)
Nested sort (2018.2)
Hierarchy filtering (2018.1)
Other improvements
Dashboard improvements
Extensions (2018.2)
Dashboard navigation button (2018.3)
Navigation action (2018.3)
The Change Set Values action (2018.3)
Automatic Mobile layouts (2018.2)
Grids (2018.2)
Tableau Server/Online
Interacting
Mixed content (2018.3)
Mobile preview (2018.3)
Comments (2018.2)
Web authoring
Connecting to data (2018.1)
Other web authoring improvements
Administration
Tableau Service Manager (2018.2)
Other administrative improvements
Summary
Deal with Security
Tableau Server security
User Filters
Row-level filters
Summary
How to Keep Growing Your Skills
The Tableau Community
Tableau Public
Community projects
Ambassadors, Zen Masters, and Iron Viz
Ambassadors
Zen Masters
Iron Viz
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
Graphical presentation of data enables us to easily understand complex data sets. Tableau 10 Complete Reference provides easy-to-follow recipes with several use cases and real-world business scenarios to get you up and running with Tableau 10.
This Learning Path begins with the history of data visualization and its importance in today's businesses. You'll also be introduced to Tableau - how to connect, clean, and analyze data in this visual analytics software. Then, you'll learn how to apply what you've learned by creating some simple calculations in Tableau and using Table Calculations to help drive greater analysis from your data. Next, you'll explore different advanced chart types in Tableau. These chart types require you to have some understanding of the Tableau interface and understand basic calculations. You’ll study in detail all dashboard techniques and best practices. A number of recipes specifically for geospatial visualization, analytics, and data preparation are also covered. Last but not least, you'll learn about the power of storytelling through the creation of interactive dashboards in Tableau.
Through this Learning Path, you will gain confidence and competence to analyze and communicate data and insights more efficiently and effectively by creating compelling interactive charts, dashboards, and stories in Tableau.
Tableau 10 Complete Reference is designed for anyone who wants to understand their data better and represent it in an effective manner. It is also used for BI professionals and data analysts who want to do better at their jobs.
Chapter 1, Creating Your First Visualizations and Dashboard, introduces the basic concepts of data visualization and shows multiple examples of individual visualizations that are ultimately put together in an interactive dashboard.
Chapter 2, Working with Data in Tableau, explains that Tableau has a very distinctive paradigm for working with data. This chapter explores that paradigm and gives examples of connecting to and working with various data sources.
Chapter 3, Moving from Foundational to More Advanced Visualizations, expands upon the basic concepts of data visualization to show how to extend standard visualization types.
Chapter 4, Using Row-Level, Aggregate, and Level of Detail Calculations, introduces the concepts of calculated fields and the practical use of calculations. The chapter walks through the foundational concepts for creating Row Level, Aggregate, and Level of Detail calculations.
Chapter 5, Table Calculations, is about table calculations, one of the most complex and most powerful features of Tableau. This chapter breaks down the basics of scope, direction, partitioning, and addressing to help you understand and use them to solve practical problems.
Chapter 6, Formatting a Visualization to Look Great and Work Well, is about formatting, which can make a standard visualization look great, have appeal, and communicate well. This chapter introduces and explains the concepts around formatting in Tableau.
Chapter 7, Telling a Data Story with Dashboards, dives into the details of building dashboards and telling stories with data. It covers the types of dashboards, objectives of dashboards, and concepts such as actions and filters. All of this is done in the context of practical examples.
Chapter 8, Deeper Analysis – Trends, Clustering, Distributions and Forecasting, explores the analytical capabilities of Tableau and demonstrates how to use trend lines, clustering, distributions, and forecasting to dive deeper into the analysis of your data.
Chapter 9, Making Data Work for You, shows that data in the real world isn’t always structured well. This chapter examines the structures that work best and the techniques that can be used to address data that can’t be fixed.
Chapter 10, Advanced Visualizations, Techniques, Tips, and Tricks, builds upon the concepts in previous chapters and expands your horizons by introducing non-standard visualization types along with numerous advanced techniques while giving practical advice and tips.
Chapter 11, Sharing Your Data Story, once you’ve built your visualizations and dashboards, you’ll want to share them. This chapter explores numerous ways of sharing your stories with others.
Chapter 12, Catching Up with Tableau 2018, details of every new feature of the different Tableau 2018 versions. You'll learn how to use them with clear explanations, examples, and tutorials. This chapter is the best way to catch up with the new releases if you already have some Tableau knowledge.
Chapter 13, Deal with Security, is the last technical chapter of this book and focuses on three ways to secure your data: permissions on Tableau Server, user filters on Tableau Desktop, and row-level data security in your data.
Chapter 14, How to Keep Growing Your Skills, is a non-technical but essential chapter. You'll discover many ways of learning new things and growing your Tableau skills thanks to community projects. The chapter is also a tribute to the Tableau community, presenting many ways to be part of that big family, which shares a passion for data visualization with Tableau.
You will need a licensed or trial version of Tableau Desktop to follow the examples contained in this book. You may download Tableau Desktop from Tableau Software at http://www.tableau.com/. The examples in this book use the interface and features of Tableau 10.0. Many of the concepts will apply to previous versions, though some interface steps and terminology may vary. The provided workbooks may be opened in Tableau 10.0 or later, though you may use any version to connect to the provided data files to work through the examples. Tableau Public is also available as a free download (http://www.tableau.com/) and may be used with many of the examples.
You may use a PC or a Mac to work through the examples in this book. Mac users may notice slight changes in user interface and will need to make note of the following changes in keys and clicks:
Right-click can be accomplished by holding the Command key while clicking
Right-click and drag and drop can be accomplished by holding the option
(Alt)
key while dragging and dropping
You can download the example code 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/Tableau-10-Complete-Reference. 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!
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, and user input are shown as follows: "We’ll create a calculated field named Floor to determine if an apartment is upstairs or downstairs."
A block of code is set as follows:
IF [Apartment] >= 1 AND [Apartment] <= 3 THEN "Downstairs" ELSEIF [Apartment] > 3 AND [Apartment] <= 6 THEN "Upstairs" ELSE "Unknown" END
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "When you open Tableau, on the left, in the Connect area, click on Microsoft Excel."
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.
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.
Tableau is an amazing platform for seeing, understanding, and making key decisions based on your data. With it, you can achieve incredible data discovery, analysis, and 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. Tableau accomplishes this using VizQL, a visual query language. You won't have to learn VizQL. It's all done behind the scenes and you won't be forced to write tedious SQL scripts, MDX code, or painstakingly work through numerous wizards to select a chart type and then link everything to data.
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 and then displayed visually. You'll be working in real-time, so you will see results immediately, get answers as fast as you can ask questions, and be able to iterate through dozens of ways to visualize the data to find a key insight or tell a piece of the story.
Tableau allows you to accomplish numerous tasks, including:
Data connection, integration, and preparation
: Tableau allows you to connect to data from sources and, if necessary, create a structure that is ready to use. 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 exploration
: You can visually explore a dataset using Tableau in order to understand what data you have.
Data visualization
: This is the heart of Tableau. You can iterate through the countless ways of visualizing the data to ask and answer questions, raise new questions, and gain new insights.
Data analysis
: Tableau has an ever growing set of analytical functions that allow you to 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.
We'll take a look at each of these tasks in the subsequent chapters. This chapter introduces the foundational principals of Tableau and focuses on data visualization. We'll accomplish this 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 the subsequent chapters. But don't skip this chapter, as it introduces key terminology and foundational concepts, including:
Connecting to data
Foundations for building visualization
Visualizing the data
Creating bar charts
Creating line charts
Creating geographic visualizations
Using Show Me
Bringing everything together in a dashboard
Tableau connects to data stored in a wide variety of files and databases. This includes flat files, such as Excel 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 building visualizations and performing analysis will be the same no matter what data source you use. We'll cover the details of connecting to different data sources in Chapter 2,Working with Data in Tableau.
For now, we'll connect to a text file, specifically, a comma-separated values file (.csv). The data itself is a variation of the sample data provided with Tableau for Superstore, a fictional retail chain that sells various products to customers across the United States. It's preferable to use the supplied data file instead of the Tableau sample data as the variations will lead to differences in visualizations.
The Chapter 1 workbook, included with the code files bundle, already have connections to the file; however, for this example, we'll walk through the steps of creating a connection in a new workbook:
Open Tableau; you should be able to see the home screen with a list of connection options on the left, thumbnail previews of recently edited workbooks in the center, links to various resources on the right, and sample workbooks on 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, notice that 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 similar to the following screenshot:
We'll refer to elements of the interface throughout the book using specific terminology, so take a moment to get familiar with the terms used for various components numbered in the preceding image:
The menu contains various menu items for performing a wide range of functions.
The toolbar allows for common functions, such as undo, redo, save, adding a data source, and so on.
The sidebar contains tabs for
Data
and
Analytics
. When the
Data
tab is active, we'll refer to the sidebar as the data pane. When the
Analytics
tab is active, we'll refer to the sidebar 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 and is 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 the shelves.
The canvas or view is where Tableau will draw the data visualization. You may also drop fields directly onto the view. In Tableau 10, you'll observe the seamless title at the top of the canvas. By default, it will display the name of the sheet, but it can be either edited or 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
towards the end of the chapter.
The tabs at the bottom of the window gives you the option of editing the data source, as well as navigating between and adding any number of sheets, dashboards, or stories. Many times a tab (whether it is a sheet, dashboard, or story) is referred to, generally, as a sheet. We'll also often use these specific terms for a tab:
A sheet
: A sheet is a single data visualization (such as a bar chart or line graph). Since sheet is 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
: 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 interactive.
A story
: A story is a collection of dashboards or single views arranged to communicate a narrative from the data. Stories can also be interactive.
As you work, the status bar will display important information and details about the view and selections.
Various controls allow you to navigate between sheets, dashboards, and stories, as well as view the tabs as a filmstrip or switch to a
Sheet Sorter
showing an interactive thumbnail of all sheets in the workbook.
Now that you have worked through connecting to the data, we'll explore some examples that lay the foundation for data visualization and then move into building some foundational visualization types. To prepare for this, do the following:
From the menu, navigate to
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.
With a connection to the data, you are now ready to visualize and analyze the data. As you start doing 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 down some foundations to understand how Tableau visualizes data.
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 sidebar. Fields can be dragged from the data pane onto the canvas area or onto various shelves, such as Rows, Columns, Color, or Size. We'll see that placement of the fields will result in different encodings of the data, based on the type of field.
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
: Measures are values that are aggregated. That is, they can be summed, averaged, and counted, or have a minimum or maximum.
Dimensions
: 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 defines 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 fields Region and Sales from the Superstore connection, as shown here:
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 (such as SUM, MIN, MAX, AVG) will be shown on the active field. 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.
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 you 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, and continuous fields, such as Sales, are green.
Discrete (blue) fields have values that are shown as distinct and separate from each other. Discrete values can be reordered and still make sense.
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 (green) fields have values that flow from first to last. Numeric and date fields are often used as continuous fields in the view. The values of these fields have an order, which 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 general, you can think of whether a field is continuous or discrete, as telling Tableau, how to display the data (header or axis, single colors or gradient) and measure or dimension, and how to organize the data (aggregate it or slice/group it).
As you work through the examples in this chapter, 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 difference in the visualization.
A new connection to a data source is an invitation to explore. 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 data visualization 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 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. Far more important than memorizing steps to create a bar chart is understanding how and why to use a Tableau to create a bar chart and then adjust your visualization to gain new insights as you ask new questions.
Bar charts visually represent data in a way that makes comparisons of value across different categories easy. 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 quite easy. Simply drag and drop the measure you want to see on either the Rows or Columns shelf and the dimension that defines the categories onto the opposing Rows or Columns shelf.
As an analyst for the 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.twbx workbook. The Chapter 01 Complete.twbx workbook will contain the complete example, so you can compare your results at any time:
Navigate to the
Sales by Department
sheet (view).
Drag and drop the
Sales
field from
Measures
in the data pane to 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, representing the sum of sales for each department:
You now have a horizontal bar chart. This makes the comparison of sales between the departments easy. Notice how the mark type in the 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 discrete dimension, the Department field defines row headers for each department in the data. As a continuous measure, the Sales field is defining an axis with the length of the bar extending from 0 to the value of the sum of sales for each department.
Using the preceding bar chart, you can easily see that the Technology department has more total sales than either Furniture or Office Supplies, which has fewer total sales compared to any other department. What if you want to further understand sales amounts for departments across various regions?
Navigate to the
Bar Chart (two levels)
sheet where you will find an initial view identical to the one you created previously.
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 the view, as shown:
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 will be able to easily compare sales for 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 has 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 an initial view identical to the one you created previously.
Drag the
Region
field from the
Rows
shelf and drop it on the
Color
shelf:
Instead of a side-by-side bar chart, you now have a stacked bar chart. Notice how 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 is still summed for every combination of region and department.
Stacked bars are 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 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.
Further experiment 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
.
Line charts connect the related marks in visualization to show movement or relationship between 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 visually communicate additional information.
The most common kind of line chart is a time series chart. Time series show the movement of values over time. They are very easy to create in Tableau and require only a date and a measure.
Continue your analysis of Superstore sales using the Chapter 01 Starter workbook that you saved earlier. The following are the steps to get the output of the Sales over time graph:
Navigate to the
Sales
over time
sheet.
Drag the
Sales
field from
Measures
to
Rows
. This will give you a single, vertical bar representing the sum of all the 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 on
Columns
. Tableau has a built-in date hierarchy and the default level of the 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 of the
YEAR(Order Date)
field on
Columns
(or right-click the field) and switch the date field to use the
Quarter
. You may observe 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
,
Moving from Foundational to More Advanced Visualizations
. For now, select the second option:
Observe the cyclical pattern that is quite evident when looking at the sales by quarter:
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 being 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, as shown:
With only four regions, it's fairly easy to keep the lines separate. What about dimensions that have more than four or five distinct values?
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 to four overlapping lines. However, clicking an item in the color legend will highlight the associated line in the view. Highlighting can be a good way to pick out a single item and compare it to all others.
Drag the
Category
field from
Color
on the
Marks
card and drop it on
Rows
. You now have a line chart for each category. Now you have a way to compare each product over time without overwhelming the overlap function. You can still compare trends and patterns over time. This is the start of a sparklines visualization that will be developed fully in the
Advanced visualizations
section of
Chapter 10
,
Advanced Visualizations, Techniques, Tips, and Tricks
.
Tableau makes creating geographic visualizations very easy. The built-in geographic database recognizes geographic roles for fields, such as country, state, city, 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 contains latitude and longitude fields, you may use those instead of the generated values.
The power and flexibility of Tableau's geographic capabilities, as well as the options for customization, will be covered in more detail in the Mapping techniques section of Chapter 10,Advanced Visualizations, Techniques, Tips, and Tricks. In the following examples, we'll consider some of the foundational concepts of geographic visualizing.
Geographic visualization is incredibly valuable when you need to understand where things happen and if there are any spatial relationships within the data. Tableau offers two basic forms of geographic visualization:
Filled maps
Symbol maps
Filled maps, as the name implies, makes use of filled areas, such as country, state, county, or zip code, to show location. The color that fills the area can be used to encode values of measures or dimensions.
What if you want to understand sales for Superstore and see whether there are any patterns geographically? Let's take a look at some examples of how you can do this:
Navigate to the
Sales by State
sheet.
Double-click on the
State
field in the data pane. Tableau automatically creates a geographic visualization using the
Latitude (generated)
,
Longitude (generated)
, and
State
fields.
Drag the
Sales
field from the data pane and drop it on the
Color
shelf on the
Marks