DV Lab Manual
DV Lab Manual
Data visualization is the practice of translating information into a visual context, such as a map or graph,
to make data easier for the human brain to understand and pull insights from. It is the representation of
information and data through use of common graphics, such as charts, plots, infographics, and
animations. Data visualization is a powerful way for people, especially data professionals, to display data
so that it can be interpreted easily.
Data Visualization enables decision-makers of any enterprise or industry to look into analytical reports
and understand concepts that might otherwise be difficult to grasp.
6. Minimizes ambiguity
Data visualization tools provide the ability to see and understand data trends, outliers, and patterns in
an easy, intuitive way. There are various data visualization tools available. One must choose the tool
based on various factors such as its ease of use, types of graphical representations the tool can produce,
size of the dataset the tool can handle etc. some of Data Visualization tools are Tableau, Power BI,
Google Charts, Jupyter, Grafana etc.
Table: A table is data displayed in rows and columns, which can be easily created in a Word document or
Excel spreadsheet.
Chart or graph: Information is presented in tabular form with data displayed along an x and y axis,
usually with bars, points, or lines, to represent data in comparison.
Geospatial visualization: Data is depicted in map form with shapes and colours that illustrate the
relationship between specific locations, such as a choropleth or heat map.
Dashboard: Data and visualizations are displayed, usually for business purposes, to help analysts
understand and present data.
Tableau is a data visualization tool that provides pictorial and graphical representations of data. It is
used for data analytics and business intelligence. Tableau provides limitless data exploration without
interrupting flow of analysis. With an intuitive drag and drop interface, user can uncover hidden insights
in data and make smarter decisions faster.
Tableau is a Business Intelligence tool for visually analyzing the data. Users can create and distribute an
interactive and shareable dashboard, which depict the trends, variations, and density of the data in the
form of graphs and charts. Tableau can connect to files, relational and Big Data sources to acquire and
process data. The software allows data blending and real-time collaboration, which makes it very
unique. It is used by businesses, academic researchers, and many government organizations for visual
data analysis. It is also positioned as a leader Business Intelligence and Analytics Platform in Gartner
Magic Quadrant.
As a leading data visualization tool, Tableau has many desirable and unique features. Its powerful data
discovery and exploration application allows you to answer important questions in seconds. You can use
Tableau's drag and drop interface to visualize any data, explore different views, and even combine
multiple databases easily. It does not require any complex scripting. Anyone who understands the
business problems can address it with a visualization of the relevant data. After analysis, sharing with
others is as easy as publishing to Tableau Server.
Tableau Features
Speed of Analysis − As it does not require high level of programming expertise, any user with
access to data can start using it to derive value from the data.
Self-Reliant − Tableau does not need a complex software setup. The desktop version which is
used by most users is easily installed and contains all the features needed to start and
complete data analysis.
Visual Discovery − The user explores and analyzes the data by using visual tools like colors,
trend lines, charts, and graphs. There is very little script to be written as nearly everything is
done by drag and drop.
Blend Diverse Data Sets − Tableau allows you to blend different relational, semi structured and
raw data sources in real time, without expensive up-front integration costs. The users don’t
need to know the details of how data is stored.
Architecture Agnostic − Tableau works in all kinds of devices where data flows. Hence, the user
need not worry about specific hardware or software requirements to use Tableau.
Real-Time Collaboration − Tableau can filter, sort, and discuss data on the fly and embed a live
dashboard in portals like SharePoint site or Salesforce. You can save your view of data and allow
colleagues to subscribe to your interactive dashboards so they see the very latest data just by
refreshing their web browser.
Centralized Data − Tableau server provides a centralized location to manage all of the
organization’s published data sources. You can delete, change permissions, add tags, and
manage schedules in one convenient location. It’s easy to schedule extract refreshes and
manage them in the data server. Administrators can centrally define a schedule for extracts on
the server for both incremental and full refreshes.
Working on Tableau ---Some important screen shots and steps of sheets(Not Related to Programs)
Program 1
Program 1: Getting Started - Tableau Workspace, Tableau terminologies, Basic functionalities.
Working with Tableau that focuses on understanding the Tableau Workspace, Tableau terminologies,
and basic functionalities.
1. Go to Start Page: Toggle between the active sheet and the Desktop Start Page.
2. Data Pane: Includes dimensions and measures, populated from your selected data source. May
also include calculated fields, parameters, or sets.
3. Analytics Pane: Includes options you can use to apply reference lines, forecasts, trend lines, to
add totals to crosstabs, and to build boxplots.
6. Toolbar Icons: Icons are available for quick access to popular features.
10. New Worksheet, Dashboard, and Story Tabs: Click to create a new Worksheet, Dashboard, or
Story.
11. Status Bar: Displays data about the fields and marks included in the view.
Steps:
Connect to Data:
Open Tableau, and on the "Start Page," select Connect -> To a File ->
Text File.
Browse to the location of vgsales.csv and open it.
Data Preview:
After loading, Tableau will show a preview of the data. You can rename
columns if necessary.
Click on the "Sheet 1" tab at the bottom to go to your first worksheet.
2. Tableau Terminologies:
Measures: These are quantitative fields used for calculations. Examples are
Global_Sales, NA_Sales, and Year.
Rows and Columns Shelf: Drag dimensions and measures to the Rows or Columns
shelves to build the structure of your visualization.
Marks: Controls the appearance of the data. You can set marks to be circles, bars, or
other shapes and control size, color, and label.
Pages Shelf: Used for creating animations or segmenting your view by categories.
3. Basic Functionalities:
You should see a bar chart. If the data isn’t aggregating correctly, check if the aggregation is set
to SUM by right-clicking Global_Sales -> Measure -> Sum.
b. Sorting:
Click on the Global_Sales axis and sort descending to show the genres with the most sales first.
c. Filtering:
Add Year to the Pages shelf to create a dynamic view of how sales changed over time.
4. Additional Functionalities:
Dashboards: Combine different sheets to create a comprehensive dashboard. Go to the Dashboard tab,
drag your created sheets to the layout, and arrange them accordingly.
Create a line chart to show how global sales have trended over time.
c. Add multiple visualizations to a single dashboard. (To increase dashboard size - select size-
Automatic)
d. Arrange charts (e.g., a line chart for yearly sales, a bar chart for top genres, etc.).
Program 2
Program 2 : Connecting to Data Source – Connecting to Database, Different types of Tableau Joins.
Dataset used: Tableau Joins File: Contains 3 sheets : Demographics, Salary, Job Title
Tableau will display the sheets from the Excel file in the Data Source tab.
Demographics:
EmployeeID
NameofEmployee
EmployeeAge
EmployeeGender
Salary:
EmployeeID
EmployeeSalary
These sheets have a relationship based on the EmployeeID, and you can join them using this field.
Drag and drop Demographics table- Right click-select open- that allows you to do following types of
joins.
Now Drag and drop Salary table - That allows you to do join of your choice.
Once both tables are in the Data Source tab, Tableau automatically suggests an inner join, but you can
modify the type of join depending on the scenario.
a. Inner Join:
Tableau automatically detects the common field (EmployeeID). If not, manually select it.
Result: You will see only employees whose employee id matches in both Demographics
and Salary table.
b. Left Join:
Description: Returns all records from the left table (Demographics), and matched records from
the right table (salary). If there’s no match, NULL values are returned for fields from the right
table.
Result: All employees will be returned, even if data missing in Salary. Salary information will be
NULL for those without a match.
c. Right Join:
Description: Returns all records from the right table (Salary), and matched records from the left
table (Demographics). If there’s no match, NULL values are returned for fields from the left
table.
Result: You will see all salary, even if they don't have employee id. Employee information will be
NULL for those salary with no matching employee id.
Description: Returns all records when there is a match in either the left (Demographics) or right
(Job Title) table. If there’s no match, NULL values are returned for the missing side.
Result: You will see all employees and all salary, even if they don’t have a match in the
other table. NULL values will appear where there’s no corresponding record.
After performing the joins, you can build different visualizations. Press on Sheet 1:
For example:
This chart will display the number of employees and their salary based on the type of join.
Sort it in decending
Program 3
Program 3. Creating a View - formatting charts, adding filters, creating calculated fields
and defining parameters
b) Choose your data source by selecting text file and load your vgsales dataset into
Tableau.
c) Drag EU Sales to the Rows shelf. That gives the line graph visualization.
In the Show Me panel on the right, select a bar chart or any other type that suits your needs.
Format Axes:
b) In the Format pane, adjust the font style & size as needed.
a) Click on the chart title area and enter a descriptive title - Global Sales by
Year.
d) Press Ok
a) Drag Global Sales-EU Sales to the Rows shelf to show Global Sales over Year with Global
Sales-EU Sales over Year.
Values: List (e.g., "Action", "Adventure", "Shooter") or Add values from Genre.
Formula:
At the right side of your sheet you can select required Genre and can see different
Visualization Visualization by Genre: Fighting
1.1. Worksheets
Definition: Each worksheet in Tableau represents a single view (chart, graph, or table).
Placement: Worksheets are the main content of your dashboard, where data
visualizations are displayed.
1.2. Containers
Definition: Containers are organizational tools in Tableau that help in grouping and
aligning worksheets or other objects (like text, images, or filters) within the dashboard.
Types:
o Horizontal Container: Aligns elements side by side.
o Vertical Container: Stacks elements on top of one another.
Use Case: Containers help ensure that your dashboard is well-organized and responsive.
For example, you can use a vertical container to stack a chart and its corresponding filter,
ensuring they move together when the dashboard is resized.
1.3. Filters
Definition: Filters allow users to interact with the dashboard by refining the data shown
in the visualizations.
Placement: Filters can be placed within the dashboard for easy access, usually in a
horizontal or vertical container alongside the related views.
1.4. Parameters
Definition: Parameters are user-defined inputs that can drive different aspects of the
dashboard, such as calculated fields or filter criteria.
Placement: Like filters, parameters can be placed within the dashboard to allow users to
interact with the data.
Definition: Text boxes and images can be added to provide context, titles, instructions, or
branding.
Placement: Typically placed at the top for titles or instructions and strategically
elsewhere for context or decoration.
Start by dragging the worksheets from the "Sheets" list to the dashboard workspace.
Action filters are interactive elements that allow users to control the data displayed in different
parts of the dashboard by interacting with specific elements (like clicking on a part of a chart).
Definition: Filter actions allow users to filter the data in one or more views based on
their interaction with another view.
Example: Clicking on a bar in one chart might filter another chart on the same dashboard
to show only the relevant data.
Definition: Highlight actions emphasize data in one view based on user interaction with
another view.
Example: Hovering over a data point in one chart can highlight the related data points in
other charts.
Definition: URL actions allow users to navigate to a web page or another Tableau
dashboard by clicking on a specific element in the view.
Example: Clicking on a region in a map might open a URL that provides more detailed
information about that region.
Definition: This action allows users to navigate between different sheets within the
workbook.
Example: Clicking on a button or data point in one dashboard could take the user to
another dashboard or worksheet with more detailed data.
Program 5
Question : Introducing Power BI –Components and the flow of work. Power BI Desktop
Interface-The Report has five main areas.
Solution :
• Power BI Desktop − This is used to create reports and data visualizations on the dataset.
• Power BI Gateway − You can use Power BI on-premises gateway to keep your data
fresh by connecting to your on-premises data sources without the need to move the data.
It allows you to query large datasets and benefit from the existing investments.
• Power BI Mobile Apps − Using Power BI mobile apps, you can stay connected to their
data from anywhere. Power BI apps are available for Windows, iOS, and Android
platform.
• Power BI Service − This is a cloud service and is used to publish Power BI reports and
data visualizations
Flow of work
• A semantic model is a container of data. For example, it might be an Excel file from
the World Health Organization. It might also be a company-owned database of customers,
or it might be a Salesforce file. And it might be all three if the designer combines them
into a single model. Designers manage semantic models. The data contained in semantic
models is used to build reports, dashboards, and apps that designers share with you.
• A dashboard is a single screen with tiles of interactive visuals, text, and graphics. A
dashboard collects your most important metrics, or a focused set of metrics, on one screen,
to tell a story or answer a question. The dashboard content comes from one or more
reports and one or more semantic models.
• A report is one or more pages of interactive visuals, text, and graphics that together
make up a single report. Power BI bases a report on a single semantic model. Often,
the designer organizes report pages to each address a central area of interest or answer a
single question.
• An app is a way for designers to bundle and share related dashboards, reports, and
semantic models together. Business users receive some apps automatically but can go
search for other apps created by colleagues or by the community. For example, out-of-
the-box apps are available for external services you may already use, like Google
Analytics and Microsoft Dynamics CRM.
5. Download Begins and you will get exe file which will be downloaded in your
downloads folder
PBIDesktopSetup_x64
(2).exe
6. Double click on the .exe file ,to get the installation wizard
7. Click on Next button until you get Finish button and finally installation will be done.
8. Once the Installation is done ,double click on Power BI App.
9.When you launch the application, Power BI Desktop will start with a blank report. Let's
go over the components of the Power BI Desktop Interface
Data Visualization Lab(BAIL504)
• Ribbon - the top ribbon contains most of the controls and options needed for building the
report.
• Views - this is made up of the report view, the data view, and the model view.
• Canvas - this is the main design area where visualizations and other elements are added.
• Page selector - for navigation to other pages in the report.
• Filters - fields can be added here to filter the data.
• Visualizations - this contains the list of available visualizations.
• Fields - this section contains the tables and fields that are available in the data model.
It is the process of cleansing and transforming data and permits users to access datasets
connecting from multiple sources. It is included on the Power BI desktop. Business users may
view the data from distinct databases like MySQL, SQL servers, DB2, and many more.
Power View
It is a data visualization tool that assists users in developing stunning charts, and colourful maps,
that turn data into a story.
Power Map
It is a 3D map visualization tool to identify geospatial data on Map visuals. It helps organizations
to examine the maximum sales production geographically, visualizing the demographic
populations of specific regions.
Power Pivot
Data Visualization Lab(BAIL504)
It is a Data Modelling technique that is used to create relationships between datasets. It performs
complex computations by utilizing DAX functions.
Power Q & A
When dealing with giant datasets, it becomes crucial to get to know the in-depth details of the
data. Luckily, it is done through natural language where users may ask questions and obtain the
answer through Power Q & A.
Build reports :
In Power BI Desktop Report view, you can build visualizations and reports.
The Report view has six main areas:
1. The ribbon at the top, which displays common tasks associated with reports and
visualizations.
2. The canvas area in the middle, where you create and arrange visualizations.
3. The pages tab area at the bottom, which lets you select or add report pages.
4. The Filters pane, where you can filter data visualizations.
5. The Visualizations pane, where you can add, change, or customize visualizations, and
apply drill through.
6. The Format pane, where you design the report and visualizations.
7. The Fields pane, which shows the available fields in your queries. You can drag these
fields onto the canvas, the Filters pane, or the Visualizations pane to create or modify
visualizations.
Data Visualization Lab(BAIL504)
PROGRAM – 6
PROGRAM – 7
PROGRAM – 8
Step3: Customize: In the "Format" pane, adjust settings such as color, size, and tooltips to
enhance readability. You can use color gradients to indicate different revenue levels, helping to
spot trends.
Question 2:Create a line chart to show the revenue based on the month of the year.
Step1:Add a Line Chart: Select the "Line chart" visualization from the Visualizations pane.
Step2: Configure the Chart:
Data Visualization Lab(BAIL504)
Step3: Format: In the "Format" pane, you can customize the line color, axis titles, and other
aspects to clearly present the revenue trend throughout the year
.
Question 3: Create a bin of size 10 for the age measure to create a new dimension to
show the revenue.
Step1: Create Bins for age
• Create a new visualization (e.g., bar chart or column chart). Here we used Stacked column
chart.
• Drag the new age bins field to the "X Axis" and the revenue field to the "Y axis”.
Question 4: Create a donut chart view to show the percentage of revenue per region by
creating zero access in the calculated field.
Data Visualization Lab(BAIL504)
Step1: Add a Donut Chart: Select the "Donut chart" visualization from the Visualizations
pane.
Step2:Set Up the Chart:
• Go to the "Format" pane, select "Detail labels", and set the "Label position" to "Inside" to
create a zero access effect.
• Adjust the "Detail" and "Percentage" settings as needed.
Note: The "zero access effect" is a visual design technique often used in data visualizations to
emphasize or clearly show zero values or the absence of certain data. This effect is
particularly useful in charts where you want to highlight how values are distributed relative to
zero, or where zero plays a significant role in the interpretation of the data.
Donut Charts:
In a donut chart, the zero access effect can be used to enhance readability by placing labels or
markers at the center of the chart or using a specific design to show where there is no data.
For example, if one segment of a donut chart represents zero revenue, you might design the
chart so that this segment is clearly visible or highlighted to indicate no revenue.
Question 5: Create a butterfly chart by reversing the bar chart to compare female &
male revenue based on product category.
Step1: Create a New Measure
TotalRevenue = sum(SalesTable[Revenue])
Data Visualization Lab(BAIL504)
Method 2:
Step 1:
Step 2:
Apply a Filter:
▪ In the "Filters" pane, add a filter to show only Female revenue. You can drag Gender to the
"Filters" pane and set the filter to include only Female.
Step 3:
Apply a Filter:
▪ In the "Filters" pane, add a filter to show only Male revenue. You can drag Gender to the
"Filters" pane and set the filter to include only Male.
Step 4:
Data Visualization Lab(BAIL504)
• To create the butterfly effect, you need to reverse one of the bar charts. This involves
adjusting the direction of the bars so that they face opposite directions from the center.
o Reverse the Bars:
▪ For one of the charts (e.g., Male revenue), you will need to use a calculated column or
measure to make the bars extend in the opposite direction. In Power BI, this can be achieved
by adjusting the data in the chart's settings or using custom visualizations if necessary.
• Add clear titles and labels to each chart to indicate what data they represent (e.g., "Female
Revenue" and "Male Revenue").
• Customize the chart's appearance to enhance readability.
Question 6:Create a calculated field to show the average revenue per state & display
profitable & non-profitable state.
Step1: Create a New Measure
AverageRevenuePerState =
AVERAGEX(
VALUES(SalesTable[State]),
CALCULATE(SUM(SalesTable[Revenue]))
)
Step2: Create a Calculated Column to Categorize States
Next, create a calculated column to classify states as profitable or non-profitable based on the
average revenue.
Enter the following DAX formula to create a column that categorizes states as
profitable or non-profitable:
ProfitabilityStatus =
IF(SalesTable[AverageRevenuePerState] > 1000,
"Profitable",
"Non-Profitable"
)
Step 3: Display the Results
ii) Create a bar graph to compare GDP of Belgium between 2006 – 2026.
Step1:
Get Measured Names to Filter Pane then select as in years mentioned
2006 – 2026.Get Country to Filter and Select Belgium
Step2:
iii)Using pie chart, visualize the GDP of India, Nepal, Romania, South Asia,
Singapore by the year 2010.
Step1:
Get Country to Filter pane and select India, Nepal, Romania, South
Asia, SingaporeGet Measure Name to Filter and select 2010
Step2: Important Step
Select option of chart as Pie(instead of automatic in Marks Pane) andDrag Country in Color
frame
Finaly Sum or avg or anything of your choice to angle Frame ( For sum its SUM[(2010)], For
average itsAVG[(2010)] from measure value
The output result is as in below
Data Visualization Lab(BAIL504)
iv)Visualize the countries Bhutan & Costa Rica competing in terms of GDP.
Step1: Filter Country and Measure name Iike Bhutan,Costarics and 2016,2017,2018 as
year(Measure name)
Step2:Add Country and Measure Names in column, Measure Values in Row
Step3:For better view add Measure Names to Color frame in Marks pane
v)Create a scatter plot or circle views of GDP of Mexico, Algeria, Fiji, Estonia from 2004 to
2006.
Step1:Add Country in filter as per requirement
Add measure names in filter and select as per requirement
Step2: Add Measured Name in Column and an add any measured values of year
2004,2005,2006Finally opt for Circle as option
Data Visualization Lab( BAIL504)
Step6: Choose KPI card in the visualization and drag and drop the Attrition Rate. Format your visuals of
your style.
ii) Create a Lollipop Chart to show the attrition rate based on gender category.
Power BI does not have a native Lollipop Chart, so you will simulate it using (any chart) a Line and
Stacked column Chart
Data Visualization Lab( BAIL504)
iii) Create a pie chart to show the attrition percentage based on Department Category-
Drag department into colours and change automatic to pie. Entire view, Drag attrition count to angle. Label
attrition count,change to percent, add total also, edit label.
• From the Visualizations pane on the right, select the Pie Chart visual icon. This will add a blank
pie chart to your report canvas.
Set Up the Pie Chart:
• Drag the Department Field to the Legend area.
• Drag the Attrition Count Measure to the Values area.
Configure Data Labels and Formatting:
• Click on the Pie Chart to select it.
• Open the Format Pane (paint roller icon).
Change Data Label Settings:
• Go to the Data Labels section in the Format pane.
• Toggle Data Labels to On.
• In the Data Label settings, change Label Style to Percent. This will show the percentage of each
department's attrition relative to the total.
• To show the Total alongside the percentages:
o Ensure that Data Labels are visible and set to Show.
o You can add a Total Label in the Title or Tooltips sections if needed for additional context.
Format the Pie Chart:
• Adjust Colors:
o Go to the Data Colors section in the Format pane.
o You can customize colors for each department by clicking on the color next to the department
name and choosing the color you prefer.
• Edit Labels:
o If you want to customize the text in the labels, you can use the Data Label formatting options
to adjust font size, color, and display units.
Finalize Your Visualization:
• Ensure your pie chart looks as expected with percentages representing the attrition rate for each
department.
Data Visualization Lab( BAIL504)
iv) Create a bar chart to display the number of employees by Age group,
Step1: right click Age and choose new group and set bin size as 5.
Step2: Choose any bar chart drag and drop new age bin and employee count.
V) Create a highlight table to show the Job Satisfaction Rating for each job role based on employee
count.
• Create a Matrix visual from the Visualizations pane.
• Drag the Job Role field to Rows.
• Drag the Job Satisfaction Rating field to Columns.
• Drag the Employee Count measure to Values.
Data Visualization Lab( BAIL504)
VI) Create a horizontal bar chart to show the attrition count for each Education field Education
field wise
Attrition – drag education field to rows, sum attrition count to col,
Step1: Horizontal bar chart It's called the Clustered Bar Chart or Stacked Bar Chart in the visualization
pane
Choose stacked bar chart and set y axis is education filed and x axis is attrition count.
vii) Create multiple donut chart to show the Attrition Rate by Gender for different Age group.
Choose donut chart and drag and drop legend as gender and value as attrition rate.
1. Select the Donut Chart from the Visualizations pane.
2. Create separate Donut Charts for different age groups.
• For each chart, filter the dataset based on age group (using the Age Group field created earlier).
3. Drag the Gender field to Legend.
4. Drag the Attrition Rate measure to Values.
Data Visualization Lab( BAIL504)
5. Repeat for each age group, ensuring each donut chart represents a different age group with gender
breakdown.
Note:
• Use Filters to dynamically adjust visuals where necessary (e.g., filter by Age Group or Education
Field).