You are on page 1of 36

Course Title : Visual Analytics and

Applications
Ram Mohan Dhara|
IMTG/ PGDM/ Term – VI / 2018-2020
Session 3-4 : Visual Analytics
After completing this session, you will learn –

• Hierarchies and drill-down


• Export dataset / specific subset of a dataset
Session •

Grouping
Visual grouping
objectives • Filtering , interactive filtering
• Parameters
• Trendline
• Clustering
• Forecasting
Hierarchies; drill-down and drill-up

■ Multidimensional data sources are referred as cubes. Cubes contain hierarchies.


■ One of the most useful ways to navigate hierarchies is to drill down or drill up.
■ Examples
– For example, if you are examining the sales totals for various years, you can
then drill down and view sales for all of the months within each year.
Alternatively, if you are examining sales totals for all months, you can then drill
up and view the sales for each year.
– You can examine the sales totals at the category level, then you can then drill
down and view sales at the product level. Alternatively, you can examine the
sales at the product level, then you can then drill up to view the sales at the
category level.
Hierarchies; drill-down and drill-up ■ Objectives –
■ Column drill-down
1. Measure - sales
2. Show the sales at the
category level
3. Drill-down the
categories at the
product level (sub-
category)
■ Row drill-down
1. Add markets
2. Drill-down the markets
to regions
■ Add second measure –
profit
1. Add profit to rows, and
change the colour of
profit.
Hierarchies; drill-down and drill-up ■ Objectives –

■ Add second measure –


profit
1. Add profit to rows, and
change the colour of
profit.
2. But we want side-by-
side graph for sales
and profit.
3. Select side-by-side
graph from ‘show me’.
4. And arrange as per
view.
Ex 3.1- Hierarchies; drill-down and drill-up
• Show the total sales
• Show the total sales year wise. Can you observe any trend? Which year
shows the maximum sale and how much?
• Break the year wise 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?
• Now add profit; which category shows maximum profit in which year and
which quarter ? And what is that value?
• Show Sales and Profit in different colours.
• Show colour gradation for profit/ sales
Grouping

■ Examples
– You can use grouping option to correct data errors (for example, to combine
"CA" and "California")
– You can combine dimensions members (for example, to combine "East" and
"West" regions)
– You can combine smaller items in the data and call ‘others’
Grouping ■ Objectives – Group
different regions of
Asia and rename it as
One Asia

■ Steps :
1. Show sales by regions
2. Select Central Asia,
North Asia and South-
East Asia
3. Select the ‘paper clip’
icon.
4. It creates a group and
rename it.
Grouping
Visual Grouping ■ Objectives – Organize
regions as High, Mid
and Low sales region

■ Steps :
1. Show sales by regions
2. Create a scatter plot.
3. Select high sales
regions and rename.
4. Similarly do for Mid
5. Similarly do for Low
6. Use different colours
Ex 3.2- Grouping data
• Show the total sales
• Show the total sales by category and sub-category
• Group Binders, Envelopes and Fasteners; and rename as office stationary
• Add region; show sale of ‘office stationary’ by region.
• Which region has the maximum sale of ‘office stationary’ and how much ?
Ex 3.3 – Visual Grouping of data
• Show the total profit
• Show the total profit by sub-category; use colour
• Group all sub-categories with profit less than 100K and rename as sub-
category (profit<100k)
• Change the colour of this group
• Use the group as filter and choose ‘show filter’

Notice that it’s a static filter. Let’s see we can create a dynamic one.
Filtering
■ Objectives – Create a
dynamic filter i.e. if I
change the cut-off profit,
then sub-categories will
automatically be updated.

■ Steps :
1. Click on left pane and
choose create -> calculated
field.
2. Create a field ‘Profit sub-
category’.
3. Use this custom field in the
filter, choose ‘show filter’.
4. To colour distinguish, add
this custom field into colour
palette.
5. This is still static in nature.
Interactive Filtering (using parameter) ■ Objectives – Create a
dynamic filter i.e. if I
change the cut-off profit,
then sub-categories will
automatically be updated.

■ Steps :
1. Create a parameter called
‘Profit Threshold’
2. Create a calculated field
‘High Profit sub-category
parameter’.
3. Connect these two.
4. Use the new custom
measure in filter and show
filter.
5. Use the new custom
measure in colour palette.
Ex 3.4 – Interactive Filtering
• Show the total profit
• Show the total profit by sub-category drilled-up to category.
• Create a filter of sub-category
• Create a filter of category
• Profit-threshold parameter has already been created.
• Answer – How many sub-categories post a profit of more than 100K ?
Which sub-category posts maximum profit and how much ?
Ex 3.4.1– Interactive Filtering
• Show the total profit
• Show the total profit by region
• Create a filter of region
• Create a Profit-threshold parameter for region
• Answer – How many regions post a profit of more than 150K ? Which region
posts maximum profit and how much ?
Ex 3.4.2– Interactive Filtering
• Show the total sales.
• Create segment as a filter – choose ‘consumer’
• Create market as a filter – choose ‘US’
• Show sales by cities (with filters – ‘consumers’ and ‘US’ )
• Create a sales-threshold parameter
• Create a sales-threshold as a calculated field (custom field)
• Connect these two.
• Answer – How many US cities post a sale of more than 50K ? Which city
posts maximum sale and how much ?
Ex 3.4.3 – Dual Interactive Filtering
• Show the total profit • Show the total sales
• Show the total profit by sub-category • Show the total sales by sub-category
• Create and show ‘Profit-threshold’ • Create and show ‘Sales-threshold’ parameter
parameter
• Create a custom field on ‘Sales-threshold’ parameter.
• Create a custom field on ‘Profit-
threshold’ parameter.
• And connect these two.
• And connect these two.
• Now we have two custom fields – one on ‘sales
• Create and show the filter on this threshold’ and other one on ‘profit threshold’
custom field.
• Create and show both the filters
• Answer – How many sub-categories post
a profit of more than 150K ? Which sub- • Answer – How many sub-categories post a profit of
category posts maximum profit and how more than 150K ? Out of which how many posts sale
much ? of 1M? Which sub-category(s) posts maximum profit
and sale?
■ Objectives – Select top
10 customers.

Parameters
■ Steps :
1. customer-ids into rows
and sales into columns
2. Set up customer-id as a
filter.
3. Select top 10
But this will not provide any
flexibility to select top5, top10
etc.
So, we will set-up a
parameter on customer-id.
What is a parameter?
■ Parameters is a variable
whose coefficient can be
changed by the end-user
to see the change on
outcome.
■ Let’s create a parameter
on customer id.
Parameters ■ Objectives – Select top
10 customers.

■ Steps :
Let’s create a parameter
on customer id.
1. Select customer id
2. Edit filter
3. Select top 10
4. Create ‘a new
parameter’.
Ex 3.5 – create a parameter
• Show sales
• Show the sales by sub-category
• Create a filter of sub-category, create a parameter on sub-category ‘Top sub-
categories’
• Show the sales by sub-category by region
• Create a filter of region, create a parameter on region ‘Top regions’
• Answer – select top two regions and top 2 sub-categories in each region.
Name the regions and the sub-categories.
Ex 3.5.1 – create a parameter
• Show profit
• Show the profit by customer id
• Create a parameter on customer id ‘Top customers’
• Create a filter of customer ids
• Select ‘edit filter’, choose top customers by ‘Top customer parameter’ to
connect the two.
• Show parameter control on ‘Top customers’
• Answer – find out the customer id with max profit.
Ex 3.5.2 – create a parameter
• Show sales
• Show the sales by product id
• Create a parameter on product id ‘Top products’
• Create a filter of product ids
• Select ‘edit filter’, choose top products by ‘Top products’ parameter to
connect the two.
• Show parameter control on ‘Top products’
• Answer – find out the product id with max sale.
Ex 3.5.3 – create two parameters
• Show sales • Show sales

• Show the sales by product id • Show the sales by customer id

• Create a parameter on product id ‘Top • Create a parameter on customer id ‘Top


products’ customers’
• Create a filter of customer ids
• Create a filter of product ids
• Select ‘edit filter’, choose top customers by
• Select ‘edit filter’, choose top products ‘Top customers’ parameter to connect the
by ‘Top products’ parameter to two.
connect the two.
• Show parameter control on ‘Top customers’
• Show parameter control on ‘Top
products’ • Answer – find out the top 5 products and
top 50 customers.
• Answer – find out the product id with
max sale. • Draw an analytical conclusion on results.
■ Objectives – Find a
Trend line relationship between
satisfaction level and
usage level.

■ Steps :
Use HATCO dataset.

1. Create a scatter plot


between Usage level and
satisfaction level.
2. Go to analytics tab,
select a trend line.
3. You might want to
examine the trend might
vary according to firm
size.
4. Let’s check that out.
Trend line ■ Objectives – Find a
relationship between
satisfaction level and
usage level.

■ Steps :
1. You might want to
examine the trend
might vary according to
firm size.
2. Let’s check that out.
Ex 3.6 – trendline
• Use HATCO dataset
• Show a scatter plot between Satisfaction = function (Price flexibility)
• Find the beta – coefficient
• Does the trend differ by size of the firm? Show it.
• Find beta-coefficients for both small and large firms. What do you
conclude?
Cluster • What is a cluster?
• Segmenting the
dataset on the basis
of certain
characteristics.
• How can you make a
cluster a dataset ?
• Tableau uses k-
means for clustering.
• Select the famous
IRIS dataset.
• Plot a scatter diagram
of petal length and
petal width.
• Go to analytics tab
and select cluster.
• Can change the
number of cluster.
• Right-click and see
description of cluster.
Ex 3.7 – clustering
• Use iris dataset
• Create 2x2 clusters with four variables.
• Judge which two variables produce better results
Forecast
• What is a forecast?
• Forecast is
predicting the values
in future based on
the current data.
• How can you draw a
trendline on a dataset ?
• Forecast the
shipping cost in
2016-17.
• Select forecast in
analytics tab and
drop it on the
working pan.
• Right-click on the
working pan and
check interactivity of
the forecast.
Ex 3.7 – forecasting
• Show the total profit
• Show a trend of profit vs. order date
• Show profit forecast for next 12 months
• Show profit forecast for next 12 months category-wise
• Show profit forecast for next 12 months market-wise
Summary : what we have learnt
• How to create hierarchies and drill-down
• How to grouping variables and create visual
grouping
• How to create a filter, interactive filters
• How to use parameters
• How to create a trendline in graphics
• How to create clusters
• How to create forecast
This concludes the session : Visual
Analytics

Next session : Creating dashboard

You might also like