You are on page 1of 5

COMM213 - Computing and Visualization Tools

for Business Analytic

Lab 5

Introduction 2
Data Interpreter 2
Connect to different Data sources and close them 2
Join Tables 2
Section 2- More Charts, Dashboard, and Storyline 2
Bullet Chart 2
Geographical Maps + Filters + Create Bins 2
Sparklines + Calculated Fields 3
Parameters 3
Context Filter 3
Dashboards 4
Storyline 4
Introduction

In this tutorial, we will explore the intricacies of Tableau, focusing on advanced chart types and features
that can take your data visualization skills to the next level. To do this, we will use diverse data sources
stored in the Lab 5 folder on Moodle, offering a practical and hands-on experience.

In the following sections, we will learn about Tableau data interpreter, how to join tables in Tableau, and
create various visualizations. Using these visualizations, we intend to create an interactive Dashboard
and present it in the form of a Story to our audience.

Data Interpreter

Data Interpreter assists in automating the process of structuring and cleaning data, making it more
suitable for analysis and visualization.

1. Connect the “Data Interpreter- crime_US.xls” file to Tableau and use Data Interpreter. What do
you Notice?

Connect to different Data sources and close them

2. Connect the Loan.xlsx dataset as a new data source in Tableau. Now, close the “crime-US” data
source from Connect.

Join Tables

3. Add the Borrower.xlsx dataset to the Loan data source. Join the Loan.xlsx and Borrower.xlsx
datasets in Tableau. Explore different table join types.
4. Create a new worksheet and explore how data from each table is organized.
5. Close the Loan+Borrower data source.

Section 2- More Charts, Dashboard, and Storyline

6. From “Data-New Data Source-Saved Data Sources” connect to “World Indicators” data source.

Bullet Chart

A bullet graph is a type of data visualization used to display performance or progress towards a specific
goal or target.

7. Which world region(s) is attracting less tourists compared to sending tourists to other world
regions? (Hint: Create a bullet graph that shows Tourism Inbound vs. Tourism Outbound in
different world Regions.) ANS: Middle East
- Region in columns
- Tourism inbound and tourism outbound in rows
- Show me> bullet chart
- U can edit reference line for shaded areas if u want
Geographical Maps + Filters + Create Bins

8. In a new sheet named Filled map, create a filled map that shows average energy consumption in
each country. Change the color of map to Red palette. Change the title of the map to “Global
Energy Consumption”.
o Drag longitude in columns
o Drag latitude in rows
o Drag Energy Usage in Color marks
o Drag Country/Region into Details mark

9. Name three countries with birth rates higher than 4.5%. (Hint: Create a geographical map
showing birth rate ranges in different countries by color and population by different sized
circles.)
o Drag longitude in columns
o Drag latitude in rows
o Drag country/region to detail
o Right click on Birth Rate > Create > Bins
o Change it to 0.015
o Drag birth rate (bin) to filters > select all except null
o Drag birth rate (bin) to colors
o Drag population total to to size mark and change circle sizes > average
o Add region to filer to make visualization easier > show filter
- To make visualization legend into %
o Right click on value > edit Alias be

Sparklines + Calculated Fields

A sparkline is a small, compact data visualization or chart that is typically used to display trends or
variations in data within a narrow space, such as within a cell of a table or alongside text.

Calculated Fields in Tableau are user-defined fields that allow you to create new data from existing data
in your dataset. They enable you to perform calculations, add new dimensions or measures, and apply
custom logic to your data, without altering the original data source.

10. Create a sparkline that shows the trend of GDP and GDP per Capita for each country. Sort your
sparkline by average GDP in each country. You should be able to filter the region and year ranges
in your sparkline.
o Drag country/region to columns
o Drag GDP to rows
o Add year to column > continuous (green)
o Show me > line chart
o Drag region into filters > select all > show filter > single value dropdown
o Drag year to filter > select all > years > drop down and select year in continuous (so it
becomes green)
o To calculate GDP per capita=GDP/total population
o Create calculation field (right click)
o Gdp/population total
o Drag GDP per capitaa in rows
o Change gdp and gdc per cap into AVG

- Organize it from highest to lowest GDP


o Click on country drop down > sort by field > descending and field name GDP and
aggregation: sum

Parameters

In Tableau, a parameter is a dynamic and user-defined input that allows you to create more interactive
and flexible visualizations and calculations. Parameters enable you to change a constant value, such as a
number or a string, and see the impact of that change on your visualizations without having to modify
the underlying data or the calculated fields.

11. Which countries spend more than 12% of GDP on healthcare?

Hint: IF AVG([Health Exp % GDP])> [Health Exp Threshold]THEN "Above Threshold" ELSE "Below
Threshold" END

- Drag country/region to rows


- Drag health % GDP to columns > AVG
- Right click x axis > changes numbers to percentage with 0 decimal points
- Right click emoty space > create > parameter
- Change data type to float
- Set min = 0.05 and max = 0.15
- Display as percentage with 0 decimal points
- Click on SHOW parameter

Add reference line:

- Click on x axis > add reference line


- Value : Health Exp Threshold

If u wanna make the countries with above 12% a different color:

- Create a new calculated field


- DO THE if STATEMENT
- Drag above threshold into color

To have a dynamic title:

Double click > insert> parameter


Context Filter

Each context filter accesses all rows in your data source without regard to other filters. A context filter is
like an independent filter. Any other filter that is set is termed as a dependent filter due to the fact that
they only process the data that passes through the context filter.

You may create a context filter to:

 Force a filter to be carried out first.


 Create a dependent numerical or top N filter. You can set a context filter to include only the data
of interest, and then set a numerical or a top N filter.

12. Duplicate the sparkline worksheet and rename it to “Sparkline- Top 5”. Create a filter to select
top-5 countries in each region by average GDP.

Note: Notice that parameters are available to edit filters.

- Dag country/region to filters > click top > by field> 5> average > gdp
- Right click region in filter > add context so it become grey

Dashboards

13. Create an interactive dashboard that shows visualizations from Bullet chart, Population map, and
Parameter worksheets.

Storyline

14. Create a story using the worksheets you created in previous sections. You should design a Cover
page for your story.

Note: Your storyline should put your visualizations into a cohesive narrative, emphasizing key
takeaways and insights to convey a compelling message about Global Indicators to our audience.

You might also like