0% found this document useful (0 votes)
5 views

Lecture 4

This document covers data visualization techniques in Excel and Tableau, highlighting the use of charts, including Gantt charts, and the comparison between Tableau and Excel. It explains Tableau's capabilities as a data visualization tool, its user interface, and the process of creating and sharing visualizations. Additionally, it discusses data source management, including joining tables and connection types in Tableau.

Uploaded by

Chi Ho Iu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture 4

This document covers data visualization techniques in Excel and Tableau, highlighting the use of charts, including Gantt charts, and the comparison between Tableau and Excel. It explains Tableau's capabilities as a data visualization tool, its user interface, and the process of creating and sharing visualizations. Additionally, it discusses data source management, including joining tables and connection types in Tableau.

Uploaded by

Chi Ho Iu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Chapter 03 Data Visualization

in Excel
IIMT3643
Faculty of Business and Economics
The University of Hong Kong
Instructor: Dr. Yipu DENG
2

Recap of Last Lecture


• Edit charts in Excel
▪ Add chart element
➢ Add, subtract, and edit elements in the chart, including axis titles, data labels, etc.
▪ Select data
➢ Add, subtract, and edit data in the chart
▪ Change chart type
▪ Format axis pane
▪ …
• Advanced charts
▪ Pivot chart
➢ Pivot table → transform a large dataset into easy-to-read information
▪ Heat map → similar to table, but use shades of color to indicate magnitude
➢ GETPIVOTDATA function & conditional formatting
▪ Gantt chart → stacked bar chart illustrating a project schedule
3

Gantt Chart
• A Gantt chart is a type of bar chart that illustrates a project schedule.
▪ Vertical axis → tasks to be performed; horizontal axis → time intervals
▪ The width of the horizontal bars shows the duration of each task.
▪ It also illustrates the start and finish dates of each task.
➢ DAYS360 → calculate the length of each task
➢ Stacked bar chart
➢ Select data
4

In-class Exercise
• App-related data from the Google Play Store (Excel practice.xlsx)
Chapter 04 Basic Data Viz
in Tableau Desktop
IIMT3643
Faculty of Business and Economics
The University of Hong Kong
Instructor: Dr. Yipu DENG
6

What is Tableau?
• It is a powerful and fastest-growing data visualization tool used in the
Business Intelligence (BI) industry.
▪ BI technology
➢ Provide historical, current, and predictive views of business operations
➢ Handle large amounts of structured and sometimes unstructured data, which helps identify,
develop, and create new strategic business opportunities
→ Facilitate easy interpretation of big data
• Tableau writes optimized SQL queries at the backend to fetch data from the
data source in the desired way and then generates visuals with its high-end
graphics and color schemes.
• It is easy to create data viz in Tableau. We only need to:
▪ Connect to a data source
▪ Drag data fields to desired parts of the interface
7

Tableau vs. Excel


• Can Tableau replace Excel?
▪ No! They serve different purposes and complement each other.

• How does Tableau compare to Excel?

• Similarities between Tableau and Excel


▪ Both can handle the following tasks equally well.
➢ Importation of small datasets
➢ Simple data manipulation, such as sorting
➢ Basic calculations, such as count, average, min, max, etc.
➢ Simple Pivot Tables
➢ Simple charting
8

Tableau vs. Excel


• How does Tableau compare to Excel?

• Differences between Tableau and Excel


→ Tableau is a data visualization tool while Excel is not.
▪ Excel
➢ Ad hoc data management (e.g., create a dataset from scratch)
➢ Customized calculations with preprogrammed functions and cell references
▪ Tableau
➢ Easy creation of advanced charts
➢ Analysis of large amounts of complex data → the amount of data is not limited.
➢ Interactive dashboards showing key business metrics real time for BI
• Excel is suitable for customized calculations; Tableau is suitable for analyzing
large, complex datasets.
9

Tableau Products
• Tableau is a platform which consists of many products.

▪ Tableau Prep
➢ A data preparation tool that allows users to clean, combine, and shape data for analysis

▪ Tableau Desktop
➢ A data visualization tool that allows users to connect to various data sources, analyze
data, and create interactive dashboards
➢ It is not free ($75 per month).

▪ Tableau Cloud and Tableau Server


➢ Once we have published our Tableau workbooks, we can share and collaborate on them
in Tableau Server and Tableau Cloud.

▪ …
10

Create Your First Visualization


• Global Superstore Orders 2016
11

Tableau Workflow
• How to handle data using Tableau
Desktop?

▪ Connect the Tableau Desktop to our data


source

▪ Build various visualizations with the data


→It allows us to analyze data from all angles

▪ Share our analysis (e.g., a dashboard or a


story) with our intended audience
12

Tableau User Interface - Connect


• Start page
13

Tableau User Interface - Connect


• Data Source page
▪ Rename
▪ Hide
▪ Group
▪ Split Making changes in Tableau Desktop will NOT
▪ Change data type change the underlying data source.
▪ …
14

Tableau User Interface – Connect (Practice)


• Imagine that you are studying worldwide library usage and cost data. You are
going to explore it using Tableau Desktop.

• Download the dataset “Global Library Data.xlsx” from Moodle

• Launch Tableau Desktop and create a new workbook

• Connect to this data source, and focus on the “Country Data” sheet for further
analysis
15

Tableau User Interface - Analyze


• Menus

• Toolbar (there is no automatic save in Tableau Desktop!)

• Data window
16

Tableau User Interface - Analyze


• Shelves
X axis

Y axis

• Marks card • Ways to bring data into the view


▪ Drag fields to
➢ Canvas
➢ Shelves
➢ Marks card
➢ ….
17

Tableau User Interface - Analyze


• Example of superstore
▪ Overall sales
➢ Drag fields to shelves
➢ Double click

▪ Sales & profit by product category

▪ A crosstab showing sales and profit by subcategory within the category

▪ Italic fields → Tableau generated fields


➢ Latitude
➢ Longitude
➢…
18

Tableau User Interface – Analyze (Practice)


• Global Library Data.xlsx

• Build a vertical bar chart to show Total Libraries by Region.

• Arrange the bars in descending order based on Total Libraries.

• Change the name of the worksheet to “Total Libraries by Region”.

• Which region has the highest number of libraries?


19

Tableau User Interface – Analyze (Practice)


• Create a new worksheet

• Construct a crosstab to display Expenditures, Total Libraries, Total Users,


and Total Volumes, all organized by Country.

• Arrange the crosstab in descending order based on the Total Users column.

• Update the name of the worksheet to “Country Details”

• Which country has the highest number of library users?


20

Tableau User Interface – Share


• A format for sharing → Dashboard
▪ We put all useful worksheets together in a dashboard.

• Tableau file formats for saving and sharing


▪ TWB (the default way)
➢ Tableau Workbook file type
➢ It saves all visualizations and the connection information, but does NOT contain a copy of data.
➢ Require access to data source to open
▪ TWBX
➢ Tableau Packaged Workbook file type
➢ It includes a copy of the data and everything in the TWB file.
➢ Can be opened without access to data source
21

Tableau User Interface – Share (Practice)


• Convert the existing column chart to a horizontal bar chart

• Set up a new dashboard and add both visualizations (i.e., the bar chart “Total
Libraries by Region” and the crosstab “Country Details”) to it

• Adjust the size of each visualization within the dashboard to ensure clear visibility

• Configure the horizontal bar chart in the dashboard to act as a filter, allowing you to
select a specific region and display corresponding country details in the crosstab.

• Save your Tableau workbook as a .twbx file

• Which European country has the highest number of libraries?


22

Data Source Page


• Things we can do on the data source page:
▪ Select tables that we want to use from our data
▪ Get a summary of table details (e.g., type, field name, source table, remote field name)
▪ Preview data
▪ Modify fields
➢ Rename fields
➢ Hide fields
➢ Create groups
➢ Split fields
➢ Change data type
▪ Rename connections
▪ View data
▪ …
23

Data Source Page - Join Tables


• Join tables → tables must have a common field for joining.
▪ Inner join (the default way)
➢ It returns records that have matching values in both tables based on the specified common field.
▪ Left join
➢ It returns all records from the left table and only matching records from the right table. If there is
no match, the result is NULL on the side of the right table.
▪ Right join
➢ It returns all records from the right table and only matching records form the left table. If there is
no match, the result is NULL on the side of the left table.
▪ Full outer join
➢ It returns all records from both tables. If there is no match, the result is NULL on the side that
does not have a match.
24

Data Source Page - Join Tables


• You have connected to the Order table and are adding a join to the Date table.

• Using an inner join, determine the number of records that will result from
this operation.
ORDER TABLE DATE TABLE
Order ID Customer Name Order ID Order Date
101 A 101 Jan 2, 2023
102 B 103 Jan 30, 2023
103 C 104 Feb 1, 2023
107 Feb 1, 2023
25

Data Source Page - Live vs. Extract Connections


• If the connected data source gets updated, Tableau can bring in those updates.
However, the way it updates depends on the connection type.

• Live connection (the default type)


▪ It allows us to refresh data within Tableau to quickly see the most up-to-date data.
→ Once new data is added, it can be incorporated into analysis.
▪ To refresh data, we can either refresh manually or reopen the Tableau workspace.
▪ It might result in slower performance.
• Extract connection
▪ Tableau makes a copy of data and saves it into Tableau data engine.
▪ It might help in connecting to slow databases.
26

Data Source Page - Live Connection


• Example of flight data
▪ A line chart showing the total number of resolved incidents by year.

• Ways to refresh data source


▪ Click the refresh data source button on the data source page
▪ Right-click the data source in the data pane and select Refresh

• Structural changes in data


▪ Tableau cannot automatically accommodate changes in data structure (e.g., changes in field
names).
➢ We need to replace references manually.

You might also like