Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Course Title : Data pre-processing and

Visualization
Ram Mohan Dhara|
IMTG/ PGDM/ Term – VI / 2017-2019
Session 5 : Connecting to data
After completing this session, you will be able to –

Session • Prepare the data for visualization



objectives •
Connect to different data sources
Do data blends
• Connect to pdf data
How tableau looks like…
Loaded ‘datasets’ with Tableau.

It connects to Tableau online training


resources – very comprehensive source.

You can connect to various types of files.

You can connect to various types of servers. Explore


‘more’ option.

Instead of creating a new one, you can


use some ready-made workbook sample.
What should you do first…
Connect to the file ‘Global Superstore’

There are three sheets in ‘Global


Superstore’ file.
Objective – Connect to a data source
Steps -
Connecting to data • Connect to Global Super Store
datasource – it’s a online store for
furnitures, office supplies and
electronics.
• To connect a sheet , just drag-drop
the datasheet on to the working
pane. You can connect more than
one sheet.
• You can rename the sheets and
columns by just double-clicking.
• You can change the datatypes just
clicking the icon left to the column
name.
• You can connect to multiple
databases and cross-joining the
same database.
• Connecting to datasource on
server, you need to have access to
the file.
Connecting to data
Objective – Show the sales trend
over the years

Steps -
• Drag ‘sales’ to rows and ‘order
date’ to columns.
• Change the default to ‘bars’.
• Expand dates to years, quarters
and months
• Use ‘Show me’ and change the
graph style.
Ex 5.1
• Show the total sales
• Show the total sales (shipment sales) year wise. Can you observe any
trend? Which year shows the maximum sale and how much?
• Break the year wise sale (shipment sale) quarter wise. Can you observe any
trend? Which year and quarter show the maximum sale and how much?
• Now add the category; which category shows maximum sale in which year
and which quarter ? And what is that value?
Data preparation
Objective – How can you make
data compatible with Tableau
format.
Review the results
Steps -
• Use flight’s data for prep
• Tableau prefers a particular
format of data.
• Open ‘resolved incidences’
• Check interpreter
• Click review the results (a link
appears ‘cleaned with
interpreter)
Data preparation
Steps contd…
• Select all column, and
use pivot
• Rename the pivoted
columns by double
clicking.
• Date field is now string;
change it to date.
• Go to sheet, and create
a bar graph of resolved
incidents for each
employee.
Data preparation
Steps contd…

• Go to sheet, and create


a bar graph of resolved
incidents for each
employee.
• Take ‘Employee ID’ in
rows and ‘Incidents
Resolved’ in columns.
Ex 5.2 _data preparation
• Show resolved incidents day-wise
• Which day in January has maximum resolved incidents?
• Now show resolved incidents by employee code.
• On that particular day, which employee resolved maximum incidents ?
Objective – How Tableau handles
different types of datasets before
Cross-database joins visualization ?
Context - Global Superstore is a
dataset of megastore selling
furnitures, office supplies and
technology products.
Sales and Products are two
different datasets with a common
id.

Steps -
• Usually databases are in
different formats; integration is
necessary for any analysis.
• Files should have some common
id.
• Add xls. file ‘sales 2016’
• Add text file ‘product 2016’
• Tableau automatically joins the
2 databases.
• Only one dataset now visible on
the data pane.
Cross-database joins
Steps contd…
• Click on the left panel
and change ‘group by
folder’ – this will
arrange the variables
into ‘dimensions’ and
‘measures’.
• Create category, sub-
category and rename it
as product.
• Add product names and
product ids under
product
• Create a bar chart of
product and sales
Objective – we have two
Data blending different datasets. How can
we blend the two ?
Steps -
• Data blending is done when
two different datasets are
merged at a variable level;
whereas data joining
happens at individual level.
• Data -> edit relationship,
choose primary and
secondary data sources,
choose custom relationship.
• In the view pane, the
dataset with blue colour is
the primary dataset.
• Put State in rows shelf since
it is common to both. Put
sales from both data sources
and put in columns.
Data blending
Steps Contd…
• Switch the data sources
and orange coloured
field is the blended
field.
• Database joins – it joins
two datasets with a
common variable.
• Data blends – sends
separate queries to
different datasets and
aggregates the results
at a common level.
Objective – how can we
connect .pdf data ?
Connecting to pdf Steps -
• This is one of the
powerful features of
Tableau for data
connect.
• It can easily convert
tabular data in pdf
format into tableau;
however it faces
challenges if the data is
not properly structured.
• Connect to Amazon
data pdf file.
• Use interpreter to read
the pdf data.
• Create a bar chart.
Summary : what we have learnt
• How to prepare the data for visualization
• How to connect to different data sources - .xls,
.txt and .pdf
• How to do dataset joins, data blends
This concludes the session :
Connecting to data

Next session : Visual Analytics

You might also like