Lecture 2 - Visualization in Tableau
Lecture 2 - Visualization in Tableau
Visualization in Tableau
Edward Tufte’s Principles
Show the data
Induce viewer to think about the substance
Avoid distorting what the data have to say
Present many numbers in a small space
Make large data sets coherent
Encourage the eye to compare different pieces of data
Reveal data at several levels of detail
Serve the purpose of description, exploration, or tabulation
Integrate with statistical and verbal definitions of a data set
Edward Tufte
2
Show the Data
What is the mean of each x & y series
F. J. Anscombe
3
Show the Data
Anscombe’s Quartet
1 2
3 4
F. J. Anscombe
4
Florence Nightengale
http://understandinguncertainty.org/coxcombs
5
Polar Area Diagram - Coxcomb
Bloomberg Businessweek
6
Data Source Connections
Extracts
Snapshots of data optimized for aggregation
Loaded into system memory to be recalled quickly
After connection data can be extracted and brought in-memory with
one click
Live connections
Provide real-time updates with data source changes reflected in Tableau
Relies on an outside database for queries
Data connectors that leverage existing data infrastructure
Send dynamic SQL or MDX statements to the datasource
7
Connecting to Data
Connect to a data file – Excel, Text, JSON
8
Connect to Server
On the Connect to a Server page, select the type of server
Creation of Data Source Extract
Automatically identification of meta data types for each field
Data Source Overview
After the connection is established
Data Source fields display in the Data window of a workbook
Data Joins
Select a data source and drag it to the join box
12
Define the Join Condition
Select the preferred type of join
Select a common field from the first Data Source
Select the common field from the second Data Source
13
Reviewing the Join
Data source fields are assigned unique colors
14
Data Union
Tables for union must have the same structure
Select new union
Drag and drop tables to the union dialog box
15
Data Blending
Establishes a common field relationship in a view
Establishes a primary data source with a blue check, secondary data
source with an orange check
Orange links beside data elements signify the linked field
16
Data Blending Result
Primary query scopes the data presentation, secondary query
enhances the primary result
Effective technique when data source data exists at different
levels
17
Workspace Area
Workbook Name
Cards & Shelves View
Data Panel
19
Data Type Icons
Meta data types are changed on the data source source page or
in the properties of each field
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/datafields_typesandroles_datatypes.htm 20
Understanding Basic Concepts
Dimensions
Qualitative values (customer, product, dates, geographic data)
Used to categorize, segment, and reveal details in the data
Dimensions affect the level of detail in the view
Measures
Quantitative values that can be aggregated (sales, quantity, profit)
Aggregation is applied to measures by default
Source:https://onlinehelp.tableau.com/current/pro/desktop/en-us/datafields_typesandroles.htm 21
Aggregation
Single plotted point aggregates all data for the two measures
As category is encoded, the aggregation splits by category
Measure pills are displayed Aggregation(Data Element)
22
Aggregating Measures
Each measure is assigned a default aggregation
Aggregations for each measure can be changed
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_aggregation.htm 23
Aggregating Dimensions
Aggregating a dimension creates a temporary measure column
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_aggregation.htm 24
Data Element Properties
Fields can be renamed
Aliases can be assigned to the values in each field
25
Convert Measure to Dimension
In some analyses we prefer to have a field function as a
dimension even through it is numeric
Quantity is used as a category of sale types
26
Measure Number Format
Number type can be defined for currency, scientific, or whole
numbers can be defined in default properties
27
Assign Geographic Role
Geographic roles need to be
assigned to fields used in
mapping
Geographic roles include
County, State, City, and Zip
Code
28
Visual Encoding Fields
Fields are dragged from the data panel and attached to a type
of mark to encode that specific data element
After encoding, marks can be edited in each encoded pill
below
29
Encoding Points with Color
Category is dragged to the color marks reflecting the 3
categories of items sold
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-gb/viewparts_marks_markproperties.htm 30
Encoding Bars with Color
Country is dragged to the color marks reflecting individual
countries in the bars
31
Encoding Points with Size
Sales is dragged to the size marks reflecting sales amounts as
different sizes of circles
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-gb/viewparts_marks_markproperties.htm 32
Encoding Bars with Size
Dragging Average Revenue to Size in the Marks card
33
Encoding with a Label
When the Sales measure is dragged to the Label, marks apply
labels to each bar
34
Encoding Detail
Dragging Birth Date to Detail in Marks encodes detailed date
categories (year, quarter, month, day)
35
Encoding a Tooltip
Includes data attributes in a hover over display of a visual
object
36
Encoding with Shapes
Segment data element is dragged to shape encoding the customer
segment
37
Encoding with Path
Draws paths in chronological order using the data element of
date
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-gb/viewparts_marks_markproperties.htm 38
Format Views for Presentation
For a view, you can specify the font, style, size, and color for
the pane text, header text, and annotations
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_worksheet.htm
39
Format Marks for Presentation
Multiple encoding with shape, size, and color
Each pill can be formatted by clicking on it
40
Avoid Overloading your Views
Overloading a view is one of the most common mistakes in
data visualization (data to ink ratio)
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 41
Limit Number Colors and Shapes
Encoding too many values with colors without an order
creates cognitive confusion instead of communication
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 42
Exploring and Analysing Data
How does color improve the visualization?
How can we improve the one on the right?
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 43
Line Chart
Trend lines are most frequently used to track a trend data over time
Here we see trends over time by sector
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 44
Area Chart
Area charts treats each sector as a pattern
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 45
Stacked Bar Chart
This bar chart focuses each year as a single pattern
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 46
Column Line Diagram
Bloomberg Businessweek
47
Horizontal Bar Chart
Horizontal bar charts work very well for comparison and ranking
Encodes quantitative values as length on the same baseline for easy
comparison
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 48
Scatter Plot
Scatter plot encoding provides a good view of the correlation
of points in relation to a mean
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 49
Dual Axis Chart
Allows you to compare two measures on the Y in one view
50
Combining Multiple Charts
Placing trend lines for sales price and quantity on top of bar chart
performance guides the viewer’s focus toward a comparison of two trends
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 51
Box Plot
Distribution analysis shows how quantitative values are distributed across a
quantitative range
Box plots are excellent for displaying multiple distributions
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 52
Histogram
Histograms displays a distribution breaking the data out by time
segments (or bins)
Number of patients are counted in each segment
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 53
Pie Charts
Pie Charts perform a part-to-whole analysis
Pie charts are well recognized but suffer from challenges in radial
accuracy
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 54
Comparison
Are the comparisons easier or harder to make versus pie chart
segments?
Source: blog.funnel.io 55
Pie Chart Counter Argument
True that with 3 or less large slices it is easy to interpret
Bar chart in the bottom left has a Y axis problem
Source: displayr.com 56
Symbol Map
Geographic maps are a type of symbol map
57
Bullet Chart
Bullet chart combines a bar chart with reference lines
comparing actual and target values
Source: https://www.tableau.com/learn/whitepapers/tableau-visual-guidebook 58
Bubble Chart
Bubble charts are used to show the relative relationship
between three or more measure values
59
Highlighted Table
Provides quick
highlighting of high
and low values that
are interesting
60
Gantt Chart
Gantt charts are useful to show the duration of activity or events
Each mark shows a duration (typically a bar)
Source: https://www.tableau.com/learn/whitepapers/which-chart-or-graph-is-right-for-you
61
Heat Maps
Heat maps provide comparison across two or more categories using
color
Patterns guide viewers around the chart, quickly showing where the
intersection of categories is strongest and weakest
62
Source: https://www.tableau.com/about/blog/2018/11/density-mark-type-brings-new-kind-heatmap-tableau-98488
Tree Map
Tree maps relate different segments of your data to the whole
Categories within a level are nested within a higher level
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/buildexamples_treemap.htm
63
Candlestick Chart
Candlestick charts are used for financial analysis using a box plot in place
of each point
This chart defines the open, close, high, and low values for trading prices
Source: https://www.tableau.com/learn/whitepapers/which-chart-or-graph-is-right-for-you
64
Create a Group
Group can be created selecting values in a dimension
Visual data elements can be selected in the view and click on the
paper clip icon
65
Create an Other Group
Other groups can be created representing all other categories
Source: onlinehelp.tableau.com 66
Create a Set
Visual data elements can be
selected to form a set
Source: onlinehelp.tableau.com 67
Create Hierarchies
Dragging and dropping a field onto another field creates a
hierarchy
Clicking the + or – in the pill will move through the hierarchy
Source: onlinehelp.tableau.com 68
Add a Filter to the View
Drag and drop dimension or measures on the filter pane.
69
Add a Date Filter
You can also drag date fields to the filter pane to set filtering
conditions
70
Keep / Exclude Data Points
With a selection of data points you can keep only those data points
or exclude those data points from the view
Source: onlinehelp.tableau.com 71
Add a Context (nested) Filter
Source: onlinehelp.tableau.com 72
Sorting
Sorting can be performed using an axis, header, or field label
73
Sort from the Toolbar
Sort icons on the toolbar will sort ascending or descending
Sorting can be engaged on each pill
Source: onlinehelp.tableau.com 74
Manual Sort
A value can be selected and dragged to the desired position in
a list
75
Computed Sort
Tableau offers several computer generated sort options such as
Alphabetic(ascending or descending),by fields, nested and data
source order
76
Add a Trend Line
A trend line can be added based on a specified field or a data
value in the view
You can add a reference line at a constant or computed value
on the axis
Trend Line
77
Table Calculation
A table calculation is a transformation
of values in a visualization
These are special type of calculated field
that computes on the local data
78
Create a Calculated Field
Sometimes a data source does not contain a field (or column)
Calculated field provides a formula using existing data
79
Create a Parameter
Parameters are dynamic values that can replace constant values
in calculations, filters, and reference lines.
80
Share TWBX as an Image and PDF
Export to Image
1. Select Worksheet > Export> Image.
2. In the Copy Image dialog box, select the contents you want to
include in the image and the legend layout (if the view contains a
legend). Click Save.
Export to PDF
In Tableau Desktop, you can publish one or more views to PDF by
selecting File > Print to PDF
81
Source: https://onlinehelp.tableau.com/current/pro/desktop/en-us/save_export_image.htm
Export Worksheet to Excel
The data elements in the current view can be exported to
excel
82
Summary
Data is not the thing, phenomena is the thing
Insights are about the phenomena
Information is the organization of data into meaning
Tableau creates worksheets, dashboards, and stories
Marks perform visual encoding
Sorting and Filtering format visual data elements
83