0% found this document useful (0 votes)
2 views49 pages

Data Visualization - Lecture Notes #2

The document outlines the fundamentals of data visualization, emphasizing the importance of understanding measurement levels (nominal, ordinal, interval, ratio) and their implications for data analysis. It details the use of Tableau for visualizing data through various techniques such as bar graphs and line graphs, as well as the creation and manipulation of dimensions and measures. Additionally, it discusses the use of parameters for enhancing interactivity and flexibility in reports.

Uploaded by

royshawjr35
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views49 pages

Data Visualization - Lecture Notes #2

The document outlines the fundamentals of data visualization, emphasizing the importance of understanding measurement levels (nominal, ordinal, interval, ratio) and their implications for data analysis. It details the use of Tableau for visualizing data through various techniques such as bar graphs and line graphs, as well as the creation and manipulation of dimensions and measures. Additionally, it discusses the use of parameters for enhancing interactivity and flexibility in reports.

Uploaded by

royshawjr35
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Data Visualization

• First step in data analysis is understanding what the data mean.


• Measurements levels are classifications of variable.
• Important to understand these as they determine the arithmetic and
statistical operations that can be carried out on the data.
• Four categories of measurement levels:
 Nominal
 Ordinal
 Interval
 Ratio
• A single variable can be measured at different measurement levels.

3
[Link]
4
Weakest
Level Description Example

Nominal Distinct categories, no ranking is implied; nothing can be implied gender,


about the magnitude or quantitative difference between the country
values (if numbers used)

Ordinal Ranking is implied; nothing can be inferred about the differences Placing in
between the categories. Ordering only implies which category is race,
greater/preferred – not by how much

Interval Ordered, the difference between measurements is a meaningful Degrees


quantity, no true zero point, every additional unit of measurement Celsius,
represents the same amount (interval). Shoe Size

Ratio Measurements can have a value of zero which represents the height, age,
absence of the quantity being measured length
5Strongest
6
• Categorical Variables:
 Variables on which calculations are not meaningful
 e.g. Nominal and ordinal

• Metric Variables:
 Calculations are meaningful on these
 E.g. Interval and ratio

• Discrete and continuous is another classification


• Some attributes can be classified in different ways
 e.g. Age, Date

• How an attribute is defined will determine the techniques that can be


applied
• Tableau uses dimension and measure 7
 Connecting to Data
 Foundations for building visualizations
 Visualizing the data
 Bar Graphs
 Line Graphs
 Geographic Visualizations
 Creating Variables
 Using Parameters
• Connect -> To a File
-> Text file
• Select file to open
• You can preview the
file
• Select Sheet1 on
bottom left to start
visualizing
1. Menu
2. Toolbar
3. Sidebar contains tabs
 Data tab – Data pane
 Dimensions
 Measures
1  Analytics tab – Analytics
pane
2 4. Shelves and Cards
4  Shelves
3  Columns
5 6  Rows
 Pages
 Filter
 Marks Card –
contains additional
shelves, Colour Size,
Text, Detail and
Tooltip
5. The Canvas
6. Show me
7. Edit Data Source or
7 navigate between sheets
9
8 and dashboards
8. Status bar
9. Sheet sorter
 Data in the data pane can be dragged onto canvas or the various shelves and cards
– Rows, Columns, Colour or Size.
 Measures
 Measure are continuous;.
 Values that are aggregated i.e summed, averaged, counted or have a min or max
 Colour – Green; Colouring – gradient (flows from first to last)

 Dimensions
 Dimension are categorical/discrete;
 Values that determine level of detail at which the measures are aggregated. Slicing the
measures or creating groups into which measures fit
 Colour – Blue; Colouring – distinct colour for each category
 Open Tableau
 Connect to Text file Superstore
 Create a Variable called Region – create a Calculated field
 Q - Sales of each department in the
Parishes
 Variables - Sales, Parish, Departments

 Move departments to Colour Marks

 Move parish to Colours Marks

 Experiment with swap and sort icons


on the Toolbar
 Level of detail – Based on the
dimensions
 Put Parish as filter

 Experiment with Marks – Colour (Put


department).

 Q - Compare sales in the different


parishes by county
 Experiment with Marks Cards
 Colour
 Size
 Label
 Formatting
 Title
 Caption
 X- Axis
 Y-Axis
 Put Mark type as circle or use Show me
 Put variables as shown in figures
 Sum(Sales)
 Department
 Region

 To put two variables in a mark press shift and place it there.


 Tableau creates two variables measure names and measure
values to build certain views that involve multiple
measures.

 Measure name - contains the names of all measures in your data,


collected into a single field with discrete values
 Measure values - contains all the measures in your data, collected
into a single field with continuous values.
Drag Department in Columns
Drag Region in Rows
We want to display both profit and sales figures

Drag measure values in Text – select only


Profit and Sales
Drag measure names in Rows
 Put Dept and Customer segment in rows and Sales in columns
 Drag profit on x-axis [drag until the mouse changes to a double ruler]
 Note both Sales and Profit are on same axis

 Show Sales and Profit in different colours - drag measure names in marks-color
 Rename the “value” axis dollars – right click on the x-axis region
 Unselect “Show Header” when the mouse is over profit/sales on y-axis on the
graph
 Put Dept and Customer segment on
• Open the second file Profit
target
• From Sheet1 Profit Target
• Drag Measure values
on Column
• Drag Measure Names
to Colour Marks
• Put Measure Names as
Size in Marks.
• Select Sheet2 Superstore
• Put Profit Ja as Measure
Values (below marks
card). You should have
only two variables.
• In Row put parish
• Edit colour to orange
and grey
• Fix Size
• Analysis-> Stacks
marks -> off
 When to use
 Movement of values over time
 How two continuous variables
are related
 Sales over time
 Sales and order date
 Change year to Quarter (2nd
option)
 Experiment with Colour Marks
 Put region in colour
 Put category in colour
[If too many values then line graph
is confusing]
 Dates as Dimensions and measures
 Hierarchy in dates
 Year- Quarter – Month – Week –Day
 If time is included then Hours-Min
 Profit margin = sum(Profit Ja)/sum(Sales Ja)
 To display as % => Right click variable (Select Default Properties-> Number
format)

 Select Category as row


 Select Sales as column
 Drag Profit on x-axis, drag Profit margin on x-axis put as different graphs.
 Put Measure names in colour
 Put labels on the graph
Do you like this Graph??
• Put Category in
rows
• Put Sales (Ja),
Profit (Ja), Profit
Margin in Column
• Put Measure
Names for Colour
 To get labels on
Sales, Profit and
profit margin
 Left click on Label
in marks card and
select Show marks
labels.
 Put date field as a
dimension in pages
Parameters are useful when you want to add interactivity and flexibility to a report, or to
experiment with what-if scenarios.

Use parameters,
• If you are unsure which fields to include in your view
• Which layout would work best for your viewers.
• To let viewers choose how they want to look at the data.

For parameters consider the following things


1. Create a parameter.
2. Show parameter - The parameter control needs to be displayed so that viewers
can interact with it.
3. Use parameters in calculations or filters.
• Put Customer
Name in Filter
and you can set
how many top
customers are to
be displayed
• If you want it to
be a variable,
then create a
parameter
 Click on right arrow in dimensions to create a Parameter – Top X Customers

• Right click on the


parameter and select
“Show Parameter
Control”

• It is displayed on the
right but notice it does
nothing
 Customer Name in Filter
 Edit Filter and Select Top
and the parameter
 Now the parameter control
is working
 You can click on the control
and changed slider to type
in
 Create Parameter
– “Sort By” as List
 Select Data type
as string
 Allowable values
as List
 In Value column
type Sales (JA),
Profit (JA), Profit
Margins
 Show the
Parameter Control
by right clicking
the Parameter
 Change values in
the control, it does
nothing as yet
 Create a Calc field –
“Sort Order” using case
statements

CASE[Sort by]
WHEN "Sales" THEN
sum([Sales (JA)])
WHEN "Profit" THEN
sum([Profit (JA)])
ELSE [Profit Margin]
END
 Right click “Category”
in Row shelf.
 Sort the “category” in
descending order using
the calculated field “Sort
Order”
 Now see how
Parameters change

You might also like