Book Image

Tableau 10 Complete Reference

By : Joshua N. Milligan, Tristan Guillevin
Book Image

Tableau 10 Complete Reference

By: Joshua N. Milligan, Tristan Guillevin

Overview of this book

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: • Learning Tableau 10 - Second Edition by Joshua N. Milligan • Getting Started with Tableau 2018.x by Tristan Guillevin
Table of Contents (20 chapters)
Title Page
About Packt
Contributors
Preface
8
Deeper Analysis - Trends, Clustering, Distributions, and Forecasting
Index

Connecting to data


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:

  1. 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.
  2. Under Connect and To a file, click Text File.
  3. In the Open dialogue box, navigate to the \Learning Tableau\Chapter 01\ directory and select the Superstore.csv file.
  4. 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:
  1. 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:

  1. The menu contains various menu items for performing a wide range of functions.
  2. The toolbar allows for common functions, such as undo, redo, save, adding a data source, and so on.
  3. 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.
  1. 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.

Note

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

  1. 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.
  2. 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.
  3. 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.

Note

A Tableau workbook is the collection of data sources, sheets, dashboards, and stories. All of this is saved as a single Tableau workbook file (.twb or.twbx). We'll look at the difference in file types and explore details of what else is saved as a part of a workbook in later chapters.

  1. As you work, the status bar will display important information and details about the view and selections.
  2. 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:

  1. From the menu, navigate to File | Exit.
  2. When prompted to save changes, select No.
  3. 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.

Note

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

With a connection to the data, you are 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.