Creating Data Stories With Tableau Public - Sample Chapter
Creating Data Stories With Tableau Public - Sample Chapter
Creating Data Stories With Tableau Public - Sample Chapter
"Community
Experience
Distilled"
Ashley Ohmann
Matt Floyd
C o m m u n i t y
D i s t i l l e d
E x p e r i e n c e
Ashley Ohmann
Matt Floyd
Preface
Tableau Software is on a mission to help people see and understand their data.
Tableau Public, which is their free tool that allows anyone to publish interactive
visualizations in the cloud, is a tremendous step toward democratizing data by
providing tools to data journalists, bloggers, and hobbyists that previously would
have been available only through corporate IT departments.
When we initially started off this project, our goal was to describe the features of
Tableau Public so that you can create your own stories with data and then share them
with the community. We also wanted to provide examples of how members of the
online community have used Tableau Public to draw attention to important issues of
our time. In the intervening months, many things have transpired: in addition to the
important features in Tableau version 9.x, the online community has multiplied in
size, about 500,000 people a day use Tableau Public, as of this writing, and the Tableau
Foundation was established. Its mission is to use data to make a tangible difference
in the world through the involvement of data volunteers and by granting software
licenses to non-profit organizations that are dedicated to improving public health and
the lives of underprivileged populations around the world.
Tableau Public is only as good as the people using it, and as we progressed on our
own journeys with Tableau Public, we became engrossed in the data stories and
dialogue that people have created and curated, particularly those of the Tableau
foundation volunteers and others that have the express purpose of using data for
good. We have attempted to provide guidelines for you on how to craft a compelling,
rich story with data that enlightens others. Our examples focus on variations of the
World Bank indicators, and by the end of this book, we have crafted an example
dashboard that focuses on an issue that impacts everyone.
Preface
The side bar, including the Data window and the Analytics pane
[ 17 ]
The starting point that appears when opening a new Tableau workbook is the
worksheet view. This is the working area where you can build your dashboard.
Let's take a quick look at it.
The visualization shown in the following screenshot uses data from the Federal
Aviation Administration (FAA) on every commercial flight at the domestic airports
of the United States in March 2015 to average the departure delay (in minutes) for
every weekday. You can download this data from http://www.transtats.bts.
gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time. Also, you
can download the companion Tableau Public workbook from the profile of this book
at https://public.tableau.com/profile/tableau.data.stories#!/. We will
use this workbook to explore parts of the Tableau Public interface, as shown in the
following screenshot:
[ 18 ]
Chapter 2
The following are the parts of the user interface that are shown in the preceding
screenshot:
Workbook (1): This is the workbook title, which is the name given to the
workbook when you save it
Toolbar (2): This is where you can save your work, among other functions
Cards and shelves (3): These are the areas where you can add fields or filters
to the visualization
The ShowMe card (5): This prompts you to create different visualization
types based on the data selected
Sheet tabs (6): This allows you to create, rename, or duplicate sheets
and dashboards
The Status bar (7): This shows the aggregated totals of the marks on your
visualization
[ 19 ]
The Sidebar (9): This contains both the Data window and the Analytics pane
The Start button (10): This takes you back to the home screen
[ 20 ]
Chapter 2
[ 21 ]
Visual cues
Within the Data pane, each field name is displayed, but there is also a visual cue that
tells you what type of field it is. Field types determine the function and capability of
joining data sources. In addition to showing the field type, Tableau Public allows you
to change a field's type by right-clicking on it and selecting the Change Data Type
option. The following list shows the fields and their descriptions:
The Abc field: This indicates that the field is a string field, which means that
the contents of the field may include letters, special characters, or numbers
The # sign: This indicates a numeric field that can have any type of native
numeric format, from bigint to decimal
The globe icon: This icon indicates that the field has geographic attributes
The paper clip icon: This indicates that the field is a group that you have
created in Tableau Public
Chapter 2
Trend lines with the most commonly used models (such as linear,
exponential, and so on)
Forecast
Custom: With the help of this element, you can add custom reference lines
and distribution bands as well as box plots, which can also be used by
right-clicking on an axis
In the following screenshot, we added the average delay in minutes per day to the
graph as a reference line by performing the following operations:
1. Click on Analytics to see the Analytics pane.
2. Drag Average Line to the y axis, which is the vertical axis.
3. Select Table as the scope, as shown in the following screenshot:
[ 23 ]
File: You can open and save your work to Tableau Public via this menu.
Remember that Tableau Public does not auto-save.
Data: From here, you can add new data sources and modify the
existing ones.
Worksheet: From here, you can create new worksheets, copy the
visualization or data on your worksheet, and modify the title, caption,
tooltip, and other features.
Story: This is used to add Story Points, which enhance the narrative
capabilities of a data visualization. Story Points refers to a specific function
in Tableau Public, and it's beyond the scope of this book.
Map: By changing the Map options, you can modify background maps and
images, and add custom geocoding and WMS.
Help: You can use this to get help and manage performance.
The buttons on the toolbar are graphically descriptive of their function. When you
roll over each with your mouse, the instructions for use pop up as well.
The buttons of the toolbar include the following:
The Start button: This takes you back to the Start screen
The Undo button: This reverses the previous action that you took and can go
as far as back to the state of the workbook when you opened it
The Redo button: This repeats actions that you have reversed
The Save button: This is critical, as Tableau Public does not auto-save
The Swap button: This swaps the fields on the Rows and Columns shelves
[ 24 ]
Chapter 2
The Reset cards: These allows you to show legends and cards that you might
have hidden or removed
Fit: This allows you to change the fit of the visualization within a window
The Presentation mode: This hides the menus, the Data pane, or the
Dashboard pane
[ 25 ]
In the following screenshot, we have highlighted the Columns and Rows shelves, the
canvas, the Marks card, the Filters shelf, and the Pages shelf. This screenshot shows
how the workspace looks before we add fields to it, and the description is as follows:
The Columns Shelf (1) is where you put fields that you want on the
horizontal header or the x axis, that is, the axis that goes from left to right.
The Rows shelf is where you put fields that you want on the y axis.
The Canvas (2) has three places where you can drop fields, namely the x
axis/header, the y axis/header, and the visualization space itself.
The Marks card (3) includes the controllers that are used to mark color, size,
text label, and shape. In addition to this, the level of the Detail and Tooltip
controllers allows you to control the appearance of the visualization. You
can change the mark type for each individual axis as well as control the size,
color, label, and shape. (Since the Marks card is critical to the function of the
visualization, we will describe it in depth in the next section).
The Filters shelf (4) is where you put fields that you want to use to limit the
values included in your visualization. After dragging a field onto the Filters
shelf, you can select values in the dialog box of that data element's Filters shelf.
[ 26 ]
Chapter 2
The Pages shelf (5) allows users to progress through your visualization based
on the fields that you put on it. For instance, you can use a date field on the
Pages shelf, and your users can click on changes over time without having to
manually select the subsequent values.
Instances of fields that are discrete will appear in blue, and continuous fields
will appear in green. The following is a description of both these fields:
Discrete fields have specific values, and the range of values is finite
The Information Lab blog does a great job explaining the differences in
Tableau Public; you can have a look at the explanation by visiting http://
www.theinformationlab.co.uk/2011/09/23/blue-things-and-greenthings/
In case you have multiple pills on a shelf, the discrete pills appear first
because they are used to group fields, and the continuous pills appear second
because they are used to measure fields
[ 27 ]
In order to create the graph shown in the preceding screenshot, we will perform the
following steps:
1. Drag Flight Date to the Columns shelf from the Dimensions pane.
2. Choose WEEKDAY as the part of the data that we want to show.
3. Add a set that we created that groups airlines by the criteria that
we established.
[ 28 ]
Chapter 2
4. When we drag the Flight Date field and the set to the Columns shelf, they
both appear in the column headers. Drag the Delay minutes from the
Measures pane to the Rows shelf.
5. When you do this, it defaults to aggregating as a SUM. Click on the Context
menu of the pill and change the aggregation to Average.
Next, we will discuss how to use the Marks card to add color and labels.
Colors: This changes the colors of marks in the chart (such as bar or line
colors). In our example, the Set that shows whether an airline is in the top
five worst airlines according to their average delay time is on the Color shelf.
Label/Text: This adds a label to the chart for data points, bars, groupings,
or lines. In our example, the percentage difference in average delay time
between the top five worst airlines and all the others is on the Label shelf.
[ 29 ]
Details: This adds details to the chart or data points, allowing you to keep
the main structure of the chart. However, it further categorizes it in detail
and with more granularity. For example, if we add Unique Carrier to the
Detail shelf, our visualization will aggregate the average departure time by
day for each Unique carrier, which means that there is now a bar segment
for each carrier, and the story that our graph tells will change dramatically,
as shown in the following screenshot:
Tool Tip: This allows you to add context and calls to action, which are critical
for telling stories because they instruct users how to progress to the next step
and they better illustrate how a data point relates to a user's interests.
Shape: This sets the data point shape in the chart visualization.
Path: This is typically used for routes on a map. This controller allows a path
to be sequentially built and placed on a map visualization. This is commonly
seen in tornado and hurricane tracking maps visualizations.
[ 30 ]
Chapter 2
Once a field is on a shelf on the Marks card, it shows up under the shelves with
a small icon for the shelf type followed by the field name, as shown in the following
screenshot:
You can change the shelf on which a field is placed by clicking on the small icon
and then selecting the shelf to which you'd like to move the field, as shown in the
previous screenshot.
[ 31 ]
Since the functionality is limited online and that is where your users will interact
with your work, we will condense the discussion of the Page shelf:
[ 32 ]
Chapter 2
The lower-right hand side of the Tableau Public interface also contains three
workspace control tabs, as shown in the following screenshot:
Show Sheet Sorter: This shows the sheets in your workbook and allows you
to reorder them easily
Show Filmstrip: This shows the visualization with the thumbnails of other
worksheets, which is shown in the previous screenshot
Show Tabs: This shows the default view of the visualization and the named
tabs of other worksheets, as shown in the previous screenshot
[ 33 ]
This tool, as shown in the following screenshot, is a helpful aid when you wish to
select various chart types that can be used with your data:
The Show Me tool also contains a list of tips to add data to shelves and cards, such as
the number of dimensions and measures necessary to create the desired chart type.
The Show Me tool also suggests graph types based on the view that the user has
created and/or the fields that the user has selected from the Data window. Based on
the selections and the chart type selected in Show Me, the tool also instructs the user
what field types are needed to create a certain graph type.
For example, selecting a continuous date field will make the Show Me tool prompt
the suggestion of a line graph. Selecting a geocoded or latitude/longitude field will
make it prompt the selection of a geographic map.
[ 34 ]
Chapter 2
In Chapter 4, Visualization - Tips and Types, we will discuss the Show Me tool in detail
and have an overview of the chart types that are available in Tableau Public. Many of
these chart types are covered by the Show Me tool suggestions.
The Show Me tool dialog does not auto-hide once the user makes
a selection from it. Click on the Show Me button again to hide the
Show Me tool dialog.
Summary
In this chapter, we learned the Tableau Public user interface, from the welcome screen
to the worksheet and dashboard tab views. We discussed the concepts of shelves and
cards, walked through an example of how the Marks card affects a data visualization,
and had a look at how to create a dashboard from the various worksheets created in a
Tableau Public workbook. Lastly, we discussed the Show Me tool and how it can aid
you in choosing appropriate data visualization types for your data.
In the next chapter, we will discuss the various chart types that you can create in
Tableau Public and what some of the best practices and uses are for the chart types.
[ 35 ]
www.PacktPub.com
Stay Connected: