0% found this document useful (0 votes)
50 views109 pages

Data Visualization Lab

The document is a comprehensive guide on Data Visualization, focusing on tools like Tableau, its functionalities, and applications in various fields. It outlines key concepts, terminologies, and provides practical examples of visualizations using different datasets. The content is structured to facilitate understanding of data visualization techniques and the use of Tableau for effective data analysis.

Uploaded by

kspranamya2004
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)
50 views109 pages

Data Visualization Lab

The document is a comprehensive guide on Data Visualization, focusing on tools like Tableau, its functionalities, and applications in various fields. It outlines key concepts, terminologies, and provides practical examples of visualizations using different datasets. The content is structured to facilitate understanding of data visualization techniques and the use of Tableau for effective data analysis.

Uploaded by

kspranamya2004
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 LAB

Pavan M,IS& E

JNNCE,Shimoga

November 3, 2024

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 1 / 109


Outline
1 What is Data Visualization?
2 Introduction
3 Tools for Data Visualization
4 Applications
5 What is tableau?
6 Tableau workspace
7 Tableau terminologies
8 Tableau Functionality
Getting Started with an Example (Diamonds)
9 Connecting to DataSource
Creating a View
Creating a Calculated Field
Defining Parameters

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 2 / 109


Outline
10 Analysis of Revenue in Sales Dataset
choropleth map
Line Chart
Bar with Age Bins
Donut Chart
Butterfly Chart
Calculated Field
Dash Board
11 Analysis of GDP Data
Symbol Maps
Bar Graph for Belgium GDP Comparison
GDP Pie Chart 2010
Bhutan vs Costa Rica GDP
GDP Scatter Plot
Interactive Dashboard

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 3 / 109


Outline

12 Analysis of HR Dataset
KPI
Lollipop Chart
Pie Chart with Percentage of Total
Bar Chart by Age Group with Parameterized Bins
Highlight Table for Job Satisfaction Rating by Job Role
Horizontal Bar Chart for Attrition Count by Education Field
Donut Charts for Attrition Rate by Gender for Different Age Bands

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 4 / 109


What is Data Visualization?

Data visualization is the graphical representation of information and data


using visual elements like charts, graphs, maps, or infographics. By using
visual tools, data can be presented in a way that makes patterns, trends,
and insights easier to understand and analyze, especially when dealing with
large or complex datasets.
Common Types:
Bar Charts: Compare quantities across categories.
Line Graphs: Show trends over time.
Pie Charts: Represent proportions.
Heat Maps: Indicate data density.
Scatter Plots: Display relationships between variables.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 5 / 109


Example of Data Visualization

Figure: A Sample Data Visualization


Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 6 / 109
Popular Tools
Tableau: Interactive data visualization software.

Power BI: Microsoft’s business analytics tool.

Matplotlib & Seaborn: Python libraries for plotting.

ggplot2: A data visualization package in R.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 7 / 109


Applications of Data Visualization

Business Analytics: Companies use visualizations to make decisions


based on sales trends, customer preferences, and market data.

Scientific Research: Visualizing experimental results or data trends.

Smart Surveillance: In deep learning applications like smart surveil-


lance, data visualization helps in tracking objects or detecting anoma-
lies by highlighting activity patterns in real-time video feeds or historical
data.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 8 / 109


What is tableau?
Tableau is a powerful business intelligence (BI) and data visualization tool
used to analyze and visualize data in an intuitive and interactive way. It
helps users connect to a variety of data sources, from spreadsheets to cloud
databases, and create dynamic reports, dashboards, and charts without
needing advanced technical skills. Tableau’s key features include:
1 Data Visualization: Users can create complex visualizations like bar

charts, heat maps, and scatter plots.


2 Interactive Dashboards: Dashboards allow users to filter, drill down,

and explore data interactively.


3 Data Integration: It supports integration with a wide range of data

sources, including Excel, SQL databases, cloud services (e.g., AWS,


Google BigQuery), and more.
4 Collaboration and Sharing: Tableau enables users to share reports

and dashboards with others in real-time.


5 Real-time Analytics: It can handle real-time data for instant insights.

6 Ease of Use: Tableau is designed with drag-and-drop functionality,

making it accessible for users without coding expertise.


Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 9 / 109
Tableau workspace

The Tableau workspace is the primary interface where users build and inter-
act with visualizations, dashboards, and reports. It provides a user-friendly
environment for data analysis and visualization. The workspace is designed
with a drag-and-drop functionality that allows users to easily work with data,
making it accessible for both technical and non-technical users. Here are
the main components of the Tableau workspace:
1. Data Pane
Located on the left side, the data pane displays the connected data sources,
including dimensions and measures. Users can drag fields from this pane
into the view to create visualizations. It is divided into two sections:
Dimensions: Qualitative data like categories (e.g., names, dates, re-
gions).
Measures: Quantitative data (e.g., sales, profit, or any numerical val-
ues).

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 10 / 109


Tableau workspace
[Link] (Rows, Columns, Filters, Pages)
At the top of the workspace, there are shelves where users drag and drop
fields to create visualizations.
Rows and Columns Shelves: Determine the layout and structure
of the visualization. Fields placed in these shelves create the axes or
categories of the chart.
Filters Shelf: Allows users to apply filters to the data, showing only
relevant or specific data points.
Pages Shelf: Enables the visualization of data over a sequence of
individual pages, often used for time-series data.
[Link] Card
The marks card is where users can control the appearance of visualizations,
such as color, size, shape, and labels. It offers a high level of customization,
allowing you to:
Change how data is displayed visually (e.g., changing the color of bars
or adjusting the size of points on a scatter plot).
Add details like labels or tooltips for enhanced interactivity.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 11 / 109
Tableau workspace
[Link] (Canvas) The center part of the workspace is the view or canvas,
where the actual visualization is displayed. As users drag fields to the shelves
or marks card, the canvas updates to show the resulting visualization in real-
time.
[Link] Pane This pane is used for adding advanced analytical tools to
visualizations, like reference lines, trend lines, and forecasts. It helps users
derive deeper insights from their data.
[Link]/Story Workspace When building dashboards or stories, users
can combine multiple visualizations into a single view. Dashboards allow in-
teractive elements like filters or highlight actions that apply across all visual-
izations. Stories can be used to create a narrative by arranging visualizations
in a sequence.
7. Toolbar Located at the top, the toolbar contains various options like
undo, redo, save, and export. It also offers options for formatting, zooming,
and adjusting the view.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 12 / 109


Tableau workspace I

8. Show Me Panel The “Show Me” panel suggests visualization types


(e.g., bar charts, pie charts, maps) based on the data selected. It helps
users choose appropriate chart types for the given data.

9. Sheet Tabs At the bottom of the workspace, the sheet tabs allow users
to switch between different worksheets, dashboards, and stories within the
same workbook. This helps in organizing multiple visualizations and analyses
within a single project.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 13 / 109


Tableau workspace II

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 14 / 109


Tableau terminologies
Here are some important Tableau terminologies that you should know
when working with the platform:
1. Workbook A Tableau file that contains one or more worksheets and
dashboards. It is where you save your work. Workbooks have the extension
.twb or .twbx.
2. Worksheet An individual workspace within Tableau where you build
visualizations using data fields. It consists of rows, columns, marks, and the
canvas.
3. Dashboard A collection of multiple worksheets (visualizations) displayed
together on a single canvas. Dashboards are used to create a unified view
of different visualizations and enable interactions between them.
4. Story A sequence of visualizations arranged to convey a narrative or
insights. A story lets you navigate through different sheets or dashboards
to tell a data-driven story.
5. Data Source The dataset you connect to in Tableau. Data sources can
be spreadsheets, databases, cloud services, etc. Once connected, data fields
(dimensions and measures) from this source are used to build visualizations.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 15 / 109
Tableau terminologies
6. Dimensions Qualitative data that is often categorical in nature (e.g.,
country names, product categories, dates). Dimensions are typically used
to create the structure of the visualization by segmenting or grouping data.
7. Measures Quantitative data (numerical values) used for calculations,
such as sums or averages (e.g., sales, profit). Measures are typically aggre-
gated in visualizations to show totals, averages, or other metrics.
8. Fields Columns of data from your data source. Fields are categorized as
either dimensions or measures in Tableau and are used to build visualiza-
tions.
9. Marks The graphical elements used to represent data points in a vi-
sualization (e.g., bars, lines, circles). Marks can be customized using the
Marks Card to adjust color, size, shape, and other attributes.
10. Filters Mechanisms used to limit the data being displayed in a visu-
alization. Filters can be applied to restrict the view to a specific subset of
data.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 16 / 109


Tableau terminologies
11. Shelves Areas in the Tableau workspace (like Rows, Columns, Pages,
and Filters) where you drag and drop fields to build visualizations. For
example, fields placed in the Rows and Columns shelves define the axes of
a chart.
12. Calculated Fields Custom fields that users create by writing formulas
based on existing fields. They allow you to create new insights and calcula-
tions from the data (e.g., creating a calculated field for profit margin).
13. Aggregations The process of summarizing data values (e.g., sum,
average, count). When measures are added to a visualization, they are
often aggregated to provide meaningful insights.
14. Parameters Dynamic input controls that allow users to modify the
values displayed in visualizations. Parameters are flexible and can be used
for various purposes, such as changing a filter value, setting thresholds, or
swapping between different measures.
15. Aliases Alternative names assigned to dimension members. They allow
you to rename data points for clarity (e.g., changing ”CA” to ”California”).

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 17 / 109


Tableau terminologies
16. Table Calculation A calculation that is applied to the results of an
existing field in a visualization. Table calculations perform advanced com-
putations like running totals, moving averages, percent differences, etc.
17. LOD Expressions (Level of Detail) A powerful feature that allows you
to compute values at different levels of granularity, regardless of the view in
your visualization. Common LOD expressions include FIXED, INCLUDE,
and EXCLUDE.
18. Tooltip Information that appears when a user hovers over a data point
in a visualization. Tooltips typically display additional data or metrics about
that point.
19. Bins Used to group continuous data into discrete intervals or ranges
(e.g., grouping ages into age ranges or sales into revenue bands).
20. Pills Fields that are dragged from the data pane onto shelves (Rows,
Columns, Filters, etc.). Dimensions and measures are referred to as ”pills”
when they appear in visualizations.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 18 / 109


Tableau terminologies
21. Extract A subset of data from a data source that is stored locally
for improved performance. Extracts are often used for faster querying and
offline analysis. They have the .hyper extension.
22. Blending Combining data from multiple data sources in Tableau.
Blended data sources are related by linking fields across different datasets.
23. Joins A method of combining data from two or more tables based on a
common field. Joins include different types: inner, left, right, and full outer
joins.
24. Hierarchy A structured grouping of related dimensions (e.g., a geo-
graphical hierarchy with Country > State > City). Hierarchies allow users
to drill down into more detailed levels of data.
25. Sets Custom fields that define a subset of data based on certain
conditions. Sets can be static (fixed) or dynamic (change based on the
data).
26. Show Me A feature that suggests appropriate chart types based on
the data fields selected. It helps users quickly choose the best visualization
for their data.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 19 / 109
Tableau Functionality I
* Data Connection
▶ Tableau connects to multiple data sources (Excel, SQL, cloud services
like Google Sheets, AWS).
▶ Supports data blending, combining multiple data sources for a single
analysis.
▶ Option for live data connections or extracted static snapshots.
* Data Preparation
▶ Perform basic data cleaning (renaming, calculated fields, removing du-
plicates).
▶ Easily shape data through pivoting, unpivoting, and aggregations.
▶ Join and union datasets within Tableau for comprehensive analysis.
* Visualization
▶ Drag-and-drop interface for quick creation of visuals.
▶ Pre-built chart types include bar charts, line graphs, pie charts, scatter
plots, heatmaps, tree maps, geographical maps.
▶ Custom visualizations like bullet charts, Gantt charts, and box plots are
available.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 20 / 109


Tableau Functionality II
* Interactive Dashboards
▶ Combine multiple visuals into a single interactive dashboard.
▶ Utilize filter actions for global or specific filters across visualizations.
▶ Drill-down analysis for hierarchical data exploration (Year → Quarter →
Month → Day).
▶ Parameter controls enable users to change values and selections in real-
time.
* Sharing and Collaboration
▶ Share publicly via Tableau Public or use Tableau Server/Tableau Online
for secure sharing.
▶ Export visualizations as PDFs, PowerPoints, images, and data as CSV
or Excel files.
* Advanced Analytics
▶ Create custom calculations with calculated fields.
▶ Perform forecasting using historical data.
▶ Add trend lines and statistical models (linear, polynomial, exponential).
▶ Use clustering to group data based on patterns.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 21 / 109


Tableau Functionality III
▶ Parameters allow dynamic changes to calculations and visual elements.
* Maps and Geospatial Analysis
▶ Tableau supports geocoding to interpret location data automatically.
▶ Use custom geographical shapes and combine data layers for layered
maps.
* Data Storytelling
▶ Create sequences of visualizations with narratives using Story Points.
▶ Add annotations and tooltips to explain or provide more information on
visual elements.
* Real-Time Data Analysis
▶ Support for live data connections enables real-time analysis of continu-
ously updating datasets.
* Mobile-Optimized Dashboards
▶ Tableau provides responsive dashboards that adapt to different screen
sizes, including mobile devices.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 22 / 109


Getting Started with an Example (Diamonds) I
* Tableau Desktop interface, a widely used Business Intelligence (BI)
tool renowned for its ability to create effective visual representations of
data.
* Downloading Data:
- Start by downloading the Diamonds Excel file from the repository.
- It is advisable to save the file in your Drive folder for access from any
location.
* Using Tableau Desktop:
- Launch Tableau Desktop.
- The interface allows you to connect to various data sources, including
local files (Excel, JSON, PDF) and databases.
* Loading Data:
- Connect to the Diamonds dataset by selecting the appropriate Excel file
from your OneDrive.
- Upon loading, you will see two sheets: Diamonds and Legend.
- The Legend sheet provides metadata, explaining what each column rep-
resents in the Diamonds dataset.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 23 / 109
Getting Started with an Example (Diamonds) II
* Data Overview:
- Upon dragging the Diamonds sheet into the data pane, you can preview
the dataset. Key columns include:
* ID: Unique identifier for each diamond record.
* Weight: The carat weight of the diamond, represented as a decimal
number.
* Color: Categorical variable indicating the diamond’s color, where ’D’ is
the highest quality.
* Clarity: Categorical variable indicating clarity levels, with ’VVS1’ con-
sidered the highest.
* Price: The market price of the diamond.
- Tableau automatically recognizes data types, classifying them as inte-
gers, decimals, or strings, which allows for appropriate data manipula-
tion.
* Creating Extracts:
- To enhance performance when handling data, you have the option to
create an extract of the dataset in Hyper format.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 24 / 109


Getting Started with an Example (Diamonds) III
- This process enables Tableau to access data more quickly, especially
beneficial when working with larger datasets.
* Creating Visualizations:
- First Sheet: No of Records per Rater(Bar Chart)
* Click on the New Worksheet icon to create a new sheet.
* Drag the Color dimension from the Data pane to the Rows shelf.
* Drag the ID dimension to the Columns shelf.
* Right-click on the ID pill in the Columns shelf and select Count Distinct.
* Select the Show Me panel and choose the Bar Chart option.
* Adjust the colors and labels for clarity.
- Second Sheet: Average Price per Clarity
* Click on the New Worksheet icon to create another sheet.
* Drag the Clarity dimension to the Rows shelf.
* Drag the Price measure to the Columns shelf.
* Right-click on the Price pill in the Columns shelf and select Average.
* Optionally sort the data in descending order.
- Third Sheet: Price vs. Weight (Scatter Plot)
* Click on the New Worksheet icon to create a third sheet.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 25 / 109


Getting Started with an Example (Diamonds) IV
* Drag the Weight measure to the Columns shelf.
* Drag the Price measure to the Rows shelf.
* Select the Show Me panel and choose the Scatter Plot option.
* Drag the Color dimension to the Color shelf.
* Right-click on the scatter plot to select Trend Lines and choose Show
Trend Lines.
* Building a Dashboard:
- After creating the individual visualizations, compile them into a cohesive
dashboard:
* Click on the New Dashboard icon.
* In the Dashboard pane, drag each sheet onto the dashboard workspace.
* Arrange the visualizations thoughtfully.
* Use the Dashboard menu to add filters, such as a Color filter.
* Add a title by dragging the Text object to the top of the dashboard area.
* Adjust the size of the dashboard for clarity and visibility.
* Exporting Visualizations:
- Once your dashboard is finalized, export the visualizations in various
formats:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 26 / 109


Getting Started with an Example (Diamonds) V

* Each sheet can be exported individually as an image.


* The entire dashboard can be saved for submission.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 27 / 109


Getting Started with an Example (Diamonds) VI

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 28 / 109


Connecting to DataSource I

* Open Tableau: Launch the Tableau application on your computer.


* Connect to Data Sources: On the start page, select from various
data source options.
* Connect to Excel File (Customer Data):
- Click on Microsoft Excel under the Connect section.
- Navigate to the location of [Link] and select it.
- Click Open to load the Excel workbook and view available sheets.
- Drag the relevant sheet (e.g., Customers) to the designated area to add
it to your data source.
* Connect to CSV File (Purchase Data):
- Select Text File under the Connect section for CSV files.
- Navigate to the location of [Link] and select it.
- Click Open to load the CSV data and preview it.
* Creating Joins Between Data Sources:
- Go to the Data Source tab after loading both datasets.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 29 / 109


Connecting to DataSource II

- Drag the Purchases Table onto the Customers Table in the canvas
area.
- Select the common field for joining (e.g., CustomerID) and choose the
Join Type (Inner, Left, Right, Full Outer).
- Click OK to create the join.
* Verify the Data Structure:
- Preview the combined data in the Data Source tab and check for cor-
rectness and any null values.
* Save the Data Source:
- Click Sheet 1 to move to a new worksheet.
- Save your workbook via File > Save As to retain connection settings.
* Visualize Your Data:
- Create visualizations by dragging fields from both datasets onto the rows,
columns, or marks card to produce charts, graphs, or tables.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 30 / 109


Creating a View I
* Create a Chart:
- Drag and drop fields onto the Rows and Columns shelves to generate a
chart, such as a bar chart for purchases per customer.
- Tableau automatically generates the chart based on selected data.
* Select the Chart Type:
- Click on the Show Me panel to choose the desired chart type (e.g., Bar
Chart, Line Chart, Pie Chart).
* Format the Chart:
- Access the Format Pane by right-clicking on the chart area or using the
dropdown arrow in the visualization.
- The Format pane allows adjustments to various chart elements.
* Formatting Titles and Text:
- Click on the chart title to edit its font, size, color, and alignment.
- Right-click on axes to edit titles, change settings like range and tick
marks.
- Enable Show Mark Labels in the Label shelf to add data labels.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 31 / 109


Creating a View II
* Adjusting Colors:
- Use the Color shelf to change data point colors from palettes or custom
schemes.
- Adjust opacity, border, and other color properties in the Format pane.
* Adjusting Size:
- Drag the Size slider in the Marks card to adjust data point sizes.
- Specify sizes based on measures or dimensions by dragging a field to the
Size shelf.
* Adding Filters:
- Drag dimensions or measures to the Filters shelf to add filters.
- Right-click on filters to select Show Filter for displaying filter controls.
* Adding Tooltips:
- Customize tooltips by clicking on the Tooltip shelf in the Marks card,
including relevant dimensions and measures.
* Final Adjustments:
- Review the chart for clarity and visual appeal; adjust scales, add gridlines,
or change font styles as needed.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 32 / 109
Creating a View III

* Save Your Changes:


- Save your workbook by navigating to File > Save or Save As once
satisfied with the formatting.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 33 / 109


Creating a Calculated Field I
* Open Tableau:
- Start Tableau and connect to your data source.
* Go to the Data Pane:
- Locate the Data pane on the left side of the Tableau workspace.
* Create Calculated Field:
- Right-click on the data source or within the Data pane.
- Select Create Calculated Field.
* Name the Calculated Field:
- Name it something descriptive, such as ”Customer Grade”.
* Enter the Formula:
- In the calculation editor, input the formula that grades customers based
on their total purchase amount.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 34 / 109


Defining Parameters I
* Open Tableau:
- Launch Tableau and connect to your data source with product informa-
tion.
* Create a Parameter:
- Right-click in the Data Pane and select Create Parameter.
- Name the parameter as ”Price Threshold”.
- Set the data type to Float or Integer.
- Enter a default value (e.g., 100) for the current value.
- Set allowed values as Range or List.
- Click OK to create the parameter.
* Create a Calculated Field for Categorization:
- Right-click in the Data Pane and select Create Calculated Field.
- Name it ”Product Category”.
- Enter a formula to categorize products based on the parameter, replacing
[Price] with the actual price field name.
- Click OK to create the calculated field.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 35 / 109


Defining Parameters II

* Show Parameter Control:


- Right-click on the ”Price Threshold” parameter in the Data pane and
select Show Parameter Control to add it to the worksheet.
* Using the Calculated Field in Visualizations:
- Drag the ”Product Category” calculated field onto your worksheet for
visualization.
- Use this field in filters, color legends, or as dimensions to analyze product
prices effectively.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 36 / 109


Defining Parameters III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 37 / 109


Analysis of Revenue in Sales Dataset I

1 Analysis of Revenue in Sales Dataset:


1 Create a choropleth map to spot trends, showing the state with the
highest revenue.
2 Create a line chart to show revenue based on the month of the year.
3 Create a bin of size 10 for the age measure to create a new dimension
to show the revenue.
4 Create a donut chart to show the percentage of revenue per region by
creating zero access in the calculated field.
5 Create a butterfly chart by reversing the bar chart to compare female
and male revenue based on product category.
6 Create a calculated field to show the average revenue per state, displaying
profitable and non-profitable states.
7 Build a dashboard.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 38 / 109


choropleth map I

* Connect to Your Data Source:


- Open Tableau.
- Connect to your dataset (e.g., Excel or CSV) that includes fields for
State and Revenue.
* Assign Geographic Role to State:
- In Tableau’s Data Pane, right-click on the State field.
- Choose Geographic Role > State to ensure Tableau recognizes the field
as geographic data.
* Create the Basic Map:
- Drag the State field to the Rows shelf.
- Tableau will automatically generate a map if the field has a geographic
role.
* Add the Revenue Data:
- Drag the Revenue field to the Color shelf under Marks.
- The map regions will be filled based on the revenue data for each state.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 39 / 109


choropleth map II
* Adjust the Map Type to Filled (Choropleth Map):
- On the Marks card, change the map type to Filled Map.
- States will be filled with color based on revenue.
* Edit the Color Scheme:
- Click on the Color shelf and choose Edit Colors.
- Use a diverging color palette (e.g., light-to-dark gradient) to highlight
highest and lowest revenue states.
* Finalize the Map:
- Adjust map size and zoom as needed using zoom controls or dragging
the map.
- Add a Title by double-clicking on the worksheet title and entering a
descriptive title like ”State-wise Revenue Analysis”.
* Publish or Export:
- When the map is ready, export it or publish it to Tableau Server/Tableau
Public.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 40 / 109


choropleth map III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 41 / 109


Line Chart I
* Connect to Your Data Source:
- Open Tableau.
- Connect to your dataset that includes Date (or a field for month) and
Revenue.
* Drag the Date Field to the Columns Shelf:
- Drag the Date field from the Data Pane to the Columns shelf.
- By default, Tableau will display the Year from the date field.
* Change Date Aggregation to Months:
- Click the drop-down arrow on the Date pill in the Columns shelf.
- Select Month from the Date Parts options to split your data by months.
* Drag the Revenue Field to the Rows Shelf:
- Drag the Revenue field from the Data Pane to the Rows shelf.
- This will plot the Revenue against each month of the year.
* Adjust the Line Chart Type:
- Tableau will automatically generate a line chart.
- If not, go to the Marks card and select the Line chart type.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 42 / 109


Line Chart II

* Ensure Continuous Time Axis:


- On the Columns shelf, right-click the Month(Date) field.
- Choose Exact Date to treat the axis as a continuous timeline.
- Tableau will now display the months in a continuous line from January
to December.
* Add a Title:
- Double-click on the Title at the top of the worksheet.
- Give a descriptive title like “Monthly Revenue Analysis”.
* Finalize and Publish:
- Once your chart is ready, export it or publish it to Tableau Server/Tableau
Public.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 43 / 109


Line Chart III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 44 / 109


Bar with Age Bins I

* Connect to Your Data Source:


- Open Tableau and connect to the dataset that includes the fields Age
and Revenue.
* Create an Age Bin:
- In the Data Pane, locate the Age field.
- Right-click on the Age field and select Create > Bins.
* Define the Bin Size:
- In the Create Bins dialog box, specify the bin size.
- Set the bin size to 10 (grouping ages into bins of 10, e.g., 0-9, 10-19,
20-29, etc.).
- Click OK.
* New Age Bin Dimension:
- Tableau will create a new dimension called Age (bin), which will appear
in the Data Pane under the Dimensions section.
* Drag the Age Bin to Rows or Columns:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 45 / 109


Bar with Age Bins II
- Drag the newly created Age (bin) field to the Rows or Columns shelf,
depending on your display preference.
* Drag the Revenue Field to the Other Shelf:
- Drag the Revenue field from the Data Pane to either the Rows or
Columns shelf (opposite of the Age (bin) dimension placement).
- This will create a chart showing total revenue for each age bin.
* Choose the Chart Type:
- By default, Tableau may create a bar chart.
- If not, go to the Marks card and select Bar Chart or any other chart type
(e.g., histogram).
* Add a Title:
- Double-click the title area at the top of the worksheet.
- Give a descriptive title like “Revenue Distribution by Age Group (Bins
of 10)”.
* Publish and Share:
- Once satisfied with the visualization, export or publish it to Tableau
Server or Tableau Public.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 46 / 109
Bar with Age Bins III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 47 / 109


Donut Chart I
* Connect to Your Data Source:
- Open Tableau and connect to the dataset that includes the fields Revenue
and Region.
* Create a Calculated Field for the Zero Axis:
- Go to the Data Pane, right-click, and select Create Calculated Field.
- Name the field ”Zero Axis” and enter the formula ‘0‘.
- Click OK.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 48 / 109


Donut Chart II
* Create the Pie Charts:
- Inner Pie Chart:
- Drag the Zero field to the Columns shelf.
- Click the Show Me panel and select the Pie Chart option.
- Outer Pie Chart:
- Drag the Zero field again to the Columns shelf, next to the first pie
chart.
- Right-click on the second Zero field and choose Dual Axis.
* Format the Donut Chart:
- Adjust the size of both pie charts:
- Click on the Size shelf for both pie charts and increase the size of the
outer pie chart.
- Set the inner pie chart color to white to create the donut effect.
* Format the Labels:
- Drag Region to the color shelf in the first pie chart to show revenue by
region.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 49 / 109


Donut Chart III
- Drag Revenue to the Label shelf in the first pie chart to show percentage
of total revenue.
- Right-click the Revenue field on the Label shelf, select Quick Table Cal-
culation > Percent of Total.
* Remove Unnecessary Axis Headers:
- Right-click on the axes headers and deselect Show Header to hide them.
* Add a Title and Format the Chart:
- Add a chart title by double-clicking the title area.
- Use a descriptive title such as ”Percentage of Revenue by Region”.
- Customize the colors of the different regions using the Color shelf on the
Marks card.
* Final Formatting and Customization:
- Adjust the size of the pie slices or hole, format the labels, and refine the
color scheme.
- Optionally, add tooltips for additional information when hovering over
slices.
* Publish and Share:
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 50 / 109
Donut Chart IV

- Once satisfied with your donut chart, export or publish it to Tableau


Server or Tableau Public.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 51 / 109


Donut Chart V

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 52 / 109


Butterfly Chart I
* Connect to Your Data Source:
- Open Tableau and connect to your data source (Excel, CSV, etc.) con-
taining your revenue data.
* Create Calculated Fields for Male and Female Revenue:
- Male Revenue:
- Click on the Analysis menu and select Create Calculated Field.
- Name it ”Male Revenue” and enter the formula:

- Female Revenue:
- Repeat the process to create another calculated field named ”Female
Revenue” with the formula:

* Create the Butterfly Chart:


- Drag the Male Revenue calculated field to the Columns shelf.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 53 / 109


Butterfly Chart II
- Drag the Female Revenue calculated field next to the first measure on
the Columns shelf.
- Reverse the Male Revenue axis:
- Right-click the axis for Male Revenue, select Edit Axis, and check ”Re-
versed”.
- Add the Product Category dimension by dragging it to the Rows shelf.
- Sort the Product Category:
- Right-click the Product Category field and choose Sort.
- Sort by either Male Revenue or Female Revenue in descending order.
- Add labels:
- Drag Male Revenue and Female Revenue measures onto the Label shelf
and format as needed.
- Format the chart:
- Drag the Gender dimension to the Color shelf for differentiation.
- Remove grid lines by right-clicking on them and selecting Format.
- Adjust tick marks by right-clicking the axis and choosing Edit Axis.
- Optional: Create a Zero Line:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 54 / 109


Butterfly Chart III

- Create a calculated field for a zero line with a fixed value of 0 and name
it ”Zero Line”.
- Final formatting:
- Adjust the size of the bars for visibility.
- Remove unnecessary headers or axes for clarity.
* Add a Title:
- Double-click on the title area to edit the title.
- Enter a relevant title, such as ”Comparison of Male and Female Revenue
by Product Category”.
* Review and Save:
- Review the visualization for adjustments and save your Tableau work-
book.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 55 / 109


Butterfly Chart IV

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 56 / 109


Calculated Field I

* Connect to Your Data Source:


- Open Tableau and connect to your dataset that includes fields like State,
Revenue, and Profit.
* Create a Calculated Field for Average Revenue:
- Right-click in the Data Pane and select Create Calculated Field.
- Name the field Average Revenue Per State.
- Enter the formula:

- Click OK to save the calculated field.


* Create a Calculated Field to Classify Profitable vs. Non-Profitable
States:
- Right-click in the Data Pane and select Create Calculated Field.
- Name the field State Profitability.
- Use the formula:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 57 / 109


Calculated Field II

- Click OK to save the calculated field.


* Create the Visualization:
- Drag State to the Rows shelf (or Columns shelf).
- Drag Average Revenue Per State to the Columns shelf.
- Drag State Profitability to the Color shelf on the Marks card for color-
coding.
* Enhance the Visualization:
- Add labels: Drag Average Revenue Per State to the Label shelf.
- Customize colors: Use green for Profitable and red for Non-Profitable.
- Filter by state: Drag State Profitability to the Filters shelf to view spe-
cific categories.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 58 / 109


Calculated Field III

* Title and Format the Chart:


- Add a title by double-clicking the title area and typing ”Average Revenue
and Profitability by State”.
- Adjust axis, gridlines, and formatting options for better readability.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 59 / 109


Calculated Field IV

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 60 / 109


Dash Board I
* Prepare Your Worksheets:
- Create individual worksheets for specific visualizations:
- A bar chart for revenue by state.
- A line chart for revenue over time.
- A map showing revenue by region.
- A donut chart for percentage revenue by product category.
* Create a New Dashboard:
- Click the New Dashboard icon at the bottom tabs or select Dashboard
from the top menu.
* Adjust Dashboard Size:
- In the Dashboard pane, select a size from the drop-down menu (e.g.,
Desktop, Tablet, Mobile).
- For publishing, use a fixed size based on your audience (e.g., 1200x800
pixels).
* Drag Worksheets to the Dashboard:
- Drag and drop desired worksheets into the blank dashboard space.
- Adjust the layout as needed.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 61 / 109
Dash Board II

* Add Interactive Filters:


- Click the drop-down arrow on any sheet and select Filters.
- Choose filters like State, Product Category, or Date Range for interac-
tivity.
* Add Titles and Descriptions:
- Add a title to your dashboard for context.
- Use Text Objects from the Objects section to provide descriptions or
instructions.
* Publish the Dashboard:
- Publish to Tableau Server or Tableau Public by clicking Server ¿ Publish
Workbook or File > Save to Tableau Public.
- Share a link or embed the dashboard after publishing.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 62 / 109


Dash Board III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 63 / 109


Analysis of GDP Data I

I. Visualize the countries data given in the dataset with respect to latitude
and longitude along with country name using symbol maps.
II. Create a bar graph to compare GDP of Belgium between 2006 – 2026.
III. Using a pie chart, visualize the GDP of India, Nepal, Romania, South
Asia, Singapore by the year 2010.
IV. Visualize the countries Bhutan & Costa Rica competing in terms of
GDP.
V. Create a scatter plot or circle views of GDP of Mexico, Algeria, Fiji,
Estonia from 2004 to 2006.
VI. Build an interactive dashboard.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 64 / 109


Symbol Maps I
1 Connect to the Dataset:
▶ Open Tableau and click on “Connect” to load your CSV file or connect
using Microsoft Excel or Text file option.
▶ Select the dataset with columns: Country, Latitude, Longitude, and
GDP.
2 Create the Symbol Map:
▶ Go to Sheet 1 view.
▶ Ensure Latitude and Longitude are recognized as geographic fields:
⋆ Right-click on Latitude and Longitude fields, and select Geographic Role
> Latitude and Longitude.
3 Add Latitude and Longitude to the View:
▶ Drag Longitude to the Columns shelf.
▶ Drag Latitude to the Rows shelf.
4 Assign Countries to the Map:
▶ Drag Country to the Detail section under the Marks card to place points
for each country.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 65 / 109


Symbol Maps II

5 Display GDP as Symbol Size or Color:


▶ Drag GDP (Billion USD) to the Size section to visualize symbol size
based on GDP.
▶ Optionally, drag GDP to the Color section to use color for GDP differ-
ences.
6 Add Country Labels:
▶ Drag Country to the Label section under the Marks card.
▶ Adjust label formatting by clicking on the Label shelf.
7 Save and Share the Map:
▶ Save the worksheet as ”Country GDP Map”.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 66 / 109


Symbol Maps III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 67 / 109


Bar Graph for Belgium GDP Comparison I
1 Connect to the Data Source:
▶ Open Tableau and connect to your dataset with columns: Country, Year,
and GDP.
▶ Navigate to the sheet for creating the visualization.
2 Filter Data for Belgium:
▶ Drag the Country field to the Filters shelf.
▶ Select ”Belgium” in the filter dialog box and click ”OK.”
3 Filter the Year Range (2006–2026):
▶ Drag the Year field to the Filters shelf.
▶ Choose a range of years between 2006 and 2026 in the filter dialog and
click ”OK.”
4 Set Up the Bar Chart:
▶ Drag Year from the Dimensions pane to the Columns shelf.
▶ Drag GDP from the Measures pane to the Rows shelf.
5 Change the Chart Type:
▶ If a line chart appears, select Show Me from the toolbar.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 68 / 109


Bar Graph for Belgium GDP Comparison II

▶ Choose the Bar Chart option from the available types.


6 Adjust the Axes and Formatting:
▶ Right-click the Year field and select ”Convert to Continuous” for a con-
tinuous Year axis.
▶ Format the GDP axis for proper units (e.g., billions or millions) by right-
clicking the axis, selecting Format, and adjusting the number format.
7 Enhance the Visualization:
▶ Add labels to the bars by clicking the Label button in the Marks card
and selecting Show Mark Labels.
▶ Optionally, sort the bars based on GDP values in ascending or descending
order.
8 Save the Sheet:
▶ Name the sheet ”Belgium GDP Comparison” by double-clicking the sheet
tab.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 69 / 109


Bar Graph for Belgium GDP Comparison III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 70 / 109


GDP Pie Chart 2010 I
1 Connect to the Data Source:
▶ Open Tableau and connect to the dataset containing GDP data with
fields: Country, Year, and GDP.
2 Filter for the Year 2010:
▶ Drag the Year field to the Filters shelf.
▶ Choose 2010 in the filter dialog box and click ”OK” to display only 2010
data.
3 Filter for the Specific Countries:
▶ Drag the Country field to the Filters shelf.
▶ Select India, Nepal, Romania, South Asia, and Singapore in the filter
dialog and click ”OK.”
4 Create a Pie Chart:
▶ In the Marks card, select Pie from the dropdown menu (default is ”Au-
tomatic”).
5 Assign Country and GDP to the Pie Chart:
▶ Drag the Country field to the Color section in the Marks card.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 71 / 109


GDP Pie Chart 2010 II

▶ Drag the GDP field to the Angle section in the Marks card.
▶ Optionally, drag GDP to the Label section to display GDP values on
each slice.
6 Adjust the Pie Chart:
▶ Click on the Size button in the Marks card and adjust the slider for pie
size.
7 Format and Label the Pie Chart:
▶ Click the Label button in the Marks card and check Show Mark Labels.
▶ Right-click on the chart, select Format, and adjust font, number format,
or alignment of labels.
8 Save the Sheet:
▶ Rename the sheet ”GDP Pie Chart 2010” by double-clicking the sheet
tab.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 72 / 109


GDP Pie Chart 2010 III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 73 / 109


Bhutan vs Costa Rica GDP I
1 Connect to the Data Source:
▶ Open Tableau and connect to the dataset containing GDP data with
fields: Country, Year, and GDP.
2 Filter for Bhutan and Costa Rica:
▶ Drag the Country field to the Filters shelf.
▶ In the filter dialog, select Bhutan and Costa Rica, then click ”OK.”
3 Drag Year and GDP to Columns and Rows:
▶ Drag the Year field to the Columns shelf to create a horizontal axis for
years.
▶ Drag the GDP field to the Rows shelf to create a vertical axis for GDP
values.
4 Add Country to the Detail or Color:
▶ Drag the Country field to the Color section in the Marks card for visual
comparison.
▶ Alternatively, drag Country to the Detail section for separate marks.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 74 / 109


Bhutan vs Costa Rica GDP II

5 Choose a Line Chart:


▶ In the Marks card, select Line from the dropdown menu (default is ”Au-
tomatic”) to create a line chart.
6 Label the GDP Values (Optional):
▶ Drag the GDP field to the Label section in the Marks card to display
GDP values on the lines.
▶ Format labels by clicking the Label button and aligning them as needed.
7 Save the Sheet:
▶ Rename the sheet to ”Bhutan vs Costa Rica GDP” by double-clicking
the sheet tab.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 75 / 109


Bhutan vs Costa Rica GDP III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 76 / 109


GDP Scatter Plot I
1 Connect to the Data Source:
▶ Open Tableau and connect to the dataset containing GDP data with
fields: Country, Year, and GDP.
2 Filter for Countries:
▶ Drag the Country field to the Filters shelf.
▶ In the filter dialog, select Mexico, Algeria, Fiji, and Estonia, then click
”OK.”
3 Filter for Year (2004-2006):
▶ Drag the Year field to the Filters shelf.
▶ Choose the Range of Years option and set the range to 2004 to 2006,
then click ”OK.”
4 Set Up the Scatter Plot:
▶ Drag the GDP field to the Rows shelf for the Y-axis.
▶ Drag the Year field to the Columns shelf for the X-axis.
▶ Optionally, drag another quantitative field (e.g., Population) to the
Columns shelf for a more complex comparison.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 77 / 109


GDP Scatter Plot II
5 Add Country as Detail:
▶ Drag the Country field to the Detail section in the Marks card to repre-
sent each country individually.
6 Customize Mark Type to Circles:
▶ In the Marks card, select Circle as the mark type from the dropdown
menu.
7 Color the Circles by Country:
▶ Drag the Country field to the Color section in the Marks card to assign
different colors to each country.
8 Add GDP Labels (Optional):
▶ Drag the GDP field to the Label section in the Marks card to display
GDP values on the plot.
9 Save the Sheet:
▶ Rename the sheet to ”GDP Scatter Plot” by double-clicking the sheet
tab.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 78 / 109


GDP Scatter Plot III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 79 / 109


Interactive Dashboard I
1 Connect to the Data Source:
▶ Open Tableau and connect to the relevant data source containing fields
such as Country, Year, GDP, Latitude, and Longitude.
2 Navigate to the Dashboard Tab:
▶ Click on the “Dashboard” tab to create a new dashboard.
3 Drag and Drop Visualizations:
▶ From the “Sheets” pane, drag and drop the visualizations onto the dash-
board canvas.
▶ Arrange visualizations for a clean layout, resizing as necessary.
4 Add Filters:
▶ Drag relevant fields (e.g., Year or Country) onto the dashboard and set
them as filters to enable user interaction across visualizations.
5 Create Dashboard Actions:
▶ Go to the “Dashboard” menu and select “Actions.”
▶ Add the following actions:
⋆ Filter Action: Click on elements in the Bar Graph or Pie Chart to filter
other visualizations.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 80 / 109
Interactive Dashboard II

⋆ Highlight Action: Hover over a country in the Symbol Map or GDP


Scatter Plot to highlight related data.
6 Preview the Dashboard:
▶ Use presentation mode to preview the dashboard and test interactive
elements.
▶ Ensure visualizations respond correctly to user interactions.
7 Save and Publish the Dashboard:
▶ Save and name the dashboard (e.g., “GDP Analysis Dashboard”).
▶ Publish it to Tableau Server, Tableau Public, or share it as a packaged
workbook.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 81 / 109


Interactive Dashboard III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 82 / 109


Analysis of HR Dataset I
1 Create KPI to show employee count, attrition count, attrition rate,
active employees, and average age.
2 Create a Lollipop Chart to show the attrition rate based on gender
category.
3 Create a pie chart to show the attrition percentage based on Depart-
ment Category. Drag department into colors and change automatic to
pie. Entire view, drag attrition count to angle, label attrition count,
change to percent, add total, edit label.
4 Create a bar chart to display the number of employees by Age group.
5 Create a highlight table to show the Job Satisfaction Rating for each
job role based on employee count.
6 Create a horizontal bar chart to show the attrition count for each Ed-
ucation field. Drag education field to rows, sum attrition count to
columns.
7 Create multiple donut charts to show the Attrition Rate by Gender for
different Age groups.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 83 / 109
KPI I
1 Connect to the Dataset:
▶ Open Tableau and connect to your HR dataset (CSV or Excel file).
▶ Drag your dataset into the workspace.
2 Create Calculated Fields for KPIs:
▶ Employee Count:
⋆ Go to Analysis > Create Calculated Field.
⋆ Name it ”Employee Count”.
⋆ Enter the formula: COUNT([EmployeeID]).
▶ Attrition Count:
⋆ Create a calculated field named ”Attrition Count”.
⋆ Enter the formula: COUNT(IF [Attrition] = "Yes" THEN [EmployeeID]
END).
▶ Attrition Rate:
⋆ Create a calculated field named ”Attrition Rate”.
⋆ Enter the formula: [Attrition Count] / [Employee Count].
⋆ Format as a percentage by right-clicking the field in the data pane, select-
ing Default Properties > Number Format, and setting it to Percentage.
▶ Active Employees:
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 84 / 109
KPI II
⋆ Create a calculated field named ”Active Employees”.
⋆ Enter the formula: COUNT(IF [Attrition] = "No" THEN [EmployeeID]
END).
▶ Average Age:
⋆ Create a calculated field named ”Average Age”.
⋆ Enter the formula: AVG([Age]).
3 Set Up the KPI Dashboard:
▶ In a new sheet, drag each calculated field (e.g., Employee Count, At-
trition Count, Attrition Rate, Active Employees, Average Age) into the
Text shelf to display them individually.
▶ Format each field to display prominently by adjusting font size, align-
ment, and color.
4 Create Titles and Formatting for Each KPI:
▶ Add Titles by right-clicking on each field in the view to edit the label
(e.g., rename ”Employee Count” to ”Total Employees”).
▶ Apply uniform font styles and sizes, and adjust spacing and alignment
for clarity.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 85 / 109


KPI III

5 Finalize the Worksheet:


▶ Arrange each KPI in a logical order.
▶ Customize colors for visual distinction (e.g., use red for attrition count).
▶ Save the sheet with a name like ”Employee KPI Dashboard”.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 86 / 109


KPI IV

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 87 / 109


Lollipop Chart I
1 Open a new worksheet in Tableau.
2 Place Attrition Rate in Columns:
▶ Drag the Attrition Rate measure to the Columns shelf to represent the
rate of attrition per gender as a percentage.
3 Add Gender to Rows:
▶ Drag Gender from the Dimensions pane to the Rows shelf to categorize
the Attrition Rate by gender.
4 Duplicate the Attrition Rate Axis:
▶ Right-click on the Attrition Rate pill in the Columns shelf and select
Duplicate to create a dual-axis chart for overlaying bars and circles.
5 Set Up the Bar Marks:
▶ Click on the first Attrition Rate in the Columns shelf and select Bar as
the mark type in the Marks card.
▶ Adjust the bar width as needed to make it narrower.
6 Set Up the Circle Marks:
▶ Click on the duplicated Attrition Rate in the Columns shelf.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 88 / 109
Lollipop Chart II

▶ In the Marks card, select Circle as the mark type and resize the circles
to be slightly larger than the width of the bars.
7 Synchronize the Axes:
▶ Right-click on the second Attrition Rate axis and select Synchronize Axis.
▶ Hide the second axis by right-clicking it and deselecting Show Header.
8 Format the Visualization:
▶ Adjust colors for each axis in the Marks card to differentiate bars and
circles.
▶ Format the Attrition Rate axis to display as percentages if necessary.
9 Add Labels (Optional):
▶ Drag Attrition Rate to the Label shelf on the Marks card for the circles
to add labels for additional clarity.
10 Rename the Sheet:
▶ Rename the worksheet to ”Attrition Rate by Gender - Lollipop Chart.”

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 89 / 109


Lollipop Chart III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 90 / 109


Pie Chart with Percentage of Total I
1 Open a New Worksheet:
▶ Start by creating a new worksheet in Tableau.
2 Drag Department to the Rows Shelf:
▶ From the Dimensions pane, drag Department to the Rows shelf to create
a row for each department.
3 Change the Mark Type to Pie:
▶ In the Marks card, change the mark type from Automatic (or Bar) to
Pie to set up the visualization as a pie chart.
4 Add Attrition Count to Angle:
▶ Drag Attrition Count from the Measures pane to the Angle shelf on the
Marks card to set the size of each pie slice based on attrition count.
5 Add Department to Color:
▶ Drag Department from the Dimensions pane to the Color shelf on the
Marks card to color the pie slices according to their department.
6 Add Attrition Count to Label:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 91 / 109


Pie Chart with Percentage of Total II
▶ Drag Attrition Count to the Label shelf on the Marks card to show the
attrition count on each slice of the pie.
7 Right-Click on Attrition Count for Percentage Calculation:
▶ In the Label shelf, find the Attrition Count field, right-click on it, and
select Quick Table Calculation > Percentage of Total to display the
percentage of total attrition count for each department.
8 Adjust the Size of the Pie Chart:
▶ Click on the pie chart and adjust the size to ensure all slices are visible
and clearly displayed.
9 Clean Up the View:
▶ Hide any unnecessary headers or axes by right-clicking on them and
selecting Hide.
10 Rename the Sheet:
▶ Rename the worksheet to something descriptive, such as ”Attrition Per-
centage by Department.”

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 92 / 109


Pie Chart with Percentage of Total III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 93 / 109


Bar Chart by Age Group with Parameterized Bins I
1 Open a new worksheet in Tableau and rename it to “Number of Em-
ployees by Age Group.”
2 Create a parameter for bin size:
▶ Right-click in the Data pane and select Create Parameter.
▶ In the Create Parameter dialog, set the following:
⋆ Name the parameter ‘Bin Size‘.
⋆ Set Data Type to Integer.
⋆ Set Current Value to ‘3‘.
⋆ Set Minimum Value to ‘2‘.
⋆ Set Maximum Value to ‘10‘.
⋆ Set Step Size to ‘1‘.
▶ Click OK to create the parameter.
3 Show parameter control:
▶ Right-click on the Bin Size parameter and select Show Parameter Con-
trol.
4 Create age bins:
▶ Right-click on the Age field in the Data pane and select Create → Bins.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 94 / 109
Bar Chart by Age Group with Parameterized Bins II
▶ In the Create Bins dialog, set the following:
⋆ Name the bin ‘Age Bins‘.
⋆ Set Size of bins to use the parameter ‘Bin Size‘.
▶ Click OK to create the Age Bins field.
5 Add Age Bins to the Rows shelf by dragging the Age Bins field to the
Rows shelf.
6 Count of employees:
▶ Drag Employee count to the Columns shelf.
7 Change to a bar chart:
▶ Ensure the Marks type is set to Bar.
8 Add labels:
▶ Drag Employee count to the Label shelf in the Marks card to display
counts on the bars.
9 Format the bar chart by clicking on the Format option in the toolbar
to adjust colors and font sizes.
10 Fit the view:
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 95 / 109
Bar Chart by Age Group with Parameterized Bins III

▶ Click on the View dropdown in the toolbar and select Entire View.
11 Rename the worksheet to “Number of Employees by Age Group” if not
done already.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 96 / 109


Bar Chart by Age Group with Parameterized Bins IV

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 97 / 109


Highlight Table for Job Satisfaction Rating by Job Role I
1 Open a new worksheet in Tableau and rename it to “Job Satisfaction
Rating by Role.”
2 Drag Job Role to the Rows shelf:
▶ Find the Job Role field in the Data pane.
▶ Drag the Job Role field to the Rows shelf to list all job roles.
3 Drag Job Satisfaction Rating to the Columns shelf:
▶ Locate the Job Satisfaction Rating field in the Data pane.
▶ Drag the Job Satisfaction Rating field to the Columns shelf to display
ratings.
4 Add Employee Count to Text:
▶ Find the Employee Count field (or the unique identifier for employees).
▶ Drag the Employee Count field to the Text shelf on the Marks card to
show counts.
5 Change Marks type to Square:
▶ Change the Marks type from Automatic to Square using the dropdown
menu.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 98 / 109


Highlight Table for Job Satisfaction Rating by Job Role II
6 Color encoding based on Job Satisfaction Rating:
▶ Drag the Job Satisfaction Rating field again to the Color shelf on the
Marks card.
▶ Customize the color gradient by clicking on the Color legend and selecting
Edit Colors to choose a palette that best represents your data.
7 Add labels for Job Satisfaction Ratings:
▶ Drag the Job Satisfaction Rating field to the Label shelf on the Marks
card to display actual ratings.
▶ Adjust font size and color for better visibility as needed.
8 Adjust table formatting:
▶ Click on the Format option in the toolbar to modify font, alignment, and
shading for visual appeal.
▶ Adjust the size of the squares using the size slider in the Marks card.
9 Add a title to the worksheet:
▶ Double-click on the title area at the top of the worksheet and enter “Job
Satisfaction Rating by Role.”

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 99 / 109


Highlight Table for Job Satisfaction Rating by Job Role III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 100 / 109
Horizontal Bar Chart for Attrition Count by Education
Field I
1 Open a new worksheet in Tableau and rename it to “Attrition Count
by Education Field.”
2 Drag Education Field to the Rows shelf:
▶ Locate the Education Field (e.g., Education Level, Degree) in the Data
pane.
▶ Drag the Education Field to the Rows shelf to list each education level.
3 Drag Attrition Count to the Columns shelf:
▶ Find the Attrition Count field in the Data pane.
▶ Drag the Attrition Count field to the Columns shelf to create bars rep-
resenting the count of attrition for each education field.
4 Change Marks type to Bar:
▶ Ensure the Marks type is set to Bar. Select Bar from the dropdown
menu if needed.
5 Adjust aggregation if necessary:

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 101 / 109
Horizontal Bar Chart for Attrition Count by Education
Field II
▶ If the attrition count is not aggregated (e.g., sum), click on the Attrition
Count pill on the Columns shelf and set it to Sum.
6 Sort the bars:
▶ Right-click on the Attrition Count axis and select Sort.
▶ Choose Descending and apply to Field: Sum(Attrition Count).
7 Add labels:
▶ Drag the Attrition Count field to the Label shelf on the Marks card to
display actual counts on the bars.
▶ Format the labels as needed for readability.
8 Adjust bar colors (optional):
▶ Drag another dimension (like Education Level or Attrition Rate) to the
Color shelf on the Marks card for visual differentiation.
9 Add a title:
▶ Click on the title area at the top of the worksheet and enter “Attrition
Count by Education Field.”

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 102 / 109
Horizontal Bar Chart for Attrition Count by Education
Field III

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 103 / 109
Donut Charts for Attrition Rate by Gender for Different
Age Bands I
1 Create a New Worksheet
▶ Open a new worksheet in Tableau and rename it as “Attrition Rate by
Gender for Different Age Bands.”
2 Set Up the Age Band for Rows
▶ Ensure an Age Group field exists in your dataset. If not, create it using
a calculated field:
▶ Go to Analysis → Create Calculated Field and name it “Age Band.”
▶ Use the formula:
IF [Age] >= 20 AND [Age] < 30 THEN "20-30"
ELSEIF [Age] >= 30 AND [Age] < 40 THEN "30-40"
ELSEIF [Age] >= 40 AND [Age] < 50 THEN "40-50"
ELSE "50+" END
▶ Drag “Age Band” to the Columns shelf to segment the charts by age
group.
3 Convert to Pie Chart
▶ In the Marks card, change the mark type to Pie.
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 104 / 109
Donut Charts for Attrition Rate by Gender for Different
Age Bands II
▶ Click Entire View to maximize the chart’s display.
4 Add Gender to Color
▶ Drag “Gender” to the Color shelf to differentiate male and female seg-
ments.
5 Use Attrition Count for Angle
▶ Drag “Attrition Count” to the Angle shelf to size the segments by attri-
tion count per gender.
6 Convert Pie Chart to Donut Chart
1 Add a dummy axis:
⋆ In the Rows shelf, type MIN(1) and press Enter.
⋆ Hold down Control and drag this MIN(1) axis to duplicate it, creating
two identical axes.
2 Set up a dual axis and synchronize:
⋆ Right-click on the second “MIN(1)” axis, select Dual Axis, then Syn-
chronize Axis.
3 Format the donut shape:
Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 105 / 109
Donut Charts for Attrition Rate by Gender for Different
Age Bands III
⋆ In the Marks card, adjust the second “MIN(1)” to create the inner circle
by:
⋆ Removing Gender from Color.
⋆ Setting the mark type to Circle.
⋆ Adjusting the circle size to create a hole in the donut.
7 Format the Labels
▶ On the outer “MIN(1)” Marks card, drag “Attrition Count” to Label.
▶ Right-click on “Attrition Count” in Label, choose Quick Table Calcula-
tion → Percentage of Total, and format to display percentages.
▶ For the inner circle’s “MIN(1)” Marks card, drag “Attrition Count” to
Label to display the total count at the center.
8 Format the Chart
▶ Hide unnecessary headers and axes by right-clicking them and deselecting
Show Header.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 106 / 109
Donut Charts for Attrition Rate by Gender for Different
Age Bands IV

▶ Adjust colors as needed, and hide the Age Band header by right-clicking
and selecting Hide Field Labels for Columns.

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 107 / 109
Donut Charts for Attrition Rate by Gender for Different
Age Bands V

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 108 / 109
HR Data Analysis Dash Board

Pavan M,IS& E (JNNCE,Shimoga) DATA VISUALIZATION LAB November 3, 2024 109 / 109

You might also like