0% found this document useful (0 votes)
17 views42 pages

2 - 1 Ai & Ds DV Lab

The document is a lab manual for the CS308PC Data Visualization course at St. Mary’s Group of Institutions, detailing the curriculum for the academic year 2025-26. It outlines program outcomes, specific outcomes, course objectives, and expected outcomes for students, along with a comprehensive index of experiments related to data visualization using Tableau. The manual covers fundamental concepts of data, the use of Tableau for data visualization, and advanced techniques for creating and sharing visualizations.

Uploaded by

King K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views42 pages

2 - 1 Ai & Ds DV Lab

The document is a lab manual for the CS308PC Data Visualization course at St. Mary’s Group of Institutions, detailing the curriculum for the academic year 2025-26. It outlines program outcomes, specific outcomes, course objectives, and expected outcomes for students, along with a comprehensive index of experiments related to data visualization using Tableau. The manual covers fundamental concepts of data, the use of Tableau for data visualization, and advanced techniques for creating and sharing visualizations.

Uploaded by

King K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

St.

Mary’s Group of Institutions Hyderabad


(An Autonomous Institution)
Deshmukhi(V), Pochampally(M), Yadadri Bhungir(DT), 508284

Department of Computer Science and Engineering

Academic Year: 2025-26

II Year I Semester

Regulation: SR24

Lab Manual

CS308PC: Data visualization- R Programming/ Power BI

B.Tech – Computer Science and Engineering


PROGRAM OUTCOMES (POs)
Engineering Graduates will be able to:
1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of athematics,
natural sciences, and engineering sciences.
3. Design / development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant
to the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multi disciplinary environments.
12. Life- long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context o technological change.
PROGRAM SPECIFIC OUTCOMES (PSO)

1. Analyze, design, develop and implement their Artificial Intelligence and Data Science
concepts to solve real-world problems.
2. Solve social and environmental problems with ethics and perform multidisciplinary
projects with advance technologies and tools.
3. Apply cutting-edge Al tools and techniques to innovate and develop new solutions
CS308PC : Data visualization- R Programming/ Power BI LAB

B.Tech. II Year I Sem. L T P C


0 0 2 1
Course Objectives:
● Effective use of Business Intelligence (BI) technology (Tableau) to apply data
visualization
● To discern patterns and relationships in the data.
● To build Dashboard applications.
● To communicate the results clearly and concisely.
● To be able to work with different formats of data sets.

Course Outcomes: At the end of the course a student should be able to


● Understand How to import data into Tableau.
● Understand Tableau concepts of Dimensions and Measures.
● Develop Programs and understand how to map Visual Layouts and Graphical
Properties.
● Create a Dashboard that links multiple visualizations.
● Use graphical user interfaces to create Frames for providing solutions to real
world problems.
INDEX
E.No Experiment Name Page No.

Understanding Data, What is data, where to find data, Foundations


1 1
for building Data Visualizations, Creating Your First visualization?

Getting started with Tableau Software using Data file formats,


2 connecting your Data to Tableau, creating basic charts(line, bar 6
charts, Tree maps),Using the Show me panel.

Tableau Calculations, Overview of SUM, AVR, and Aggregate


3 11
features, Creating custom calculations and fields

Applying new data calculations to your visualizations, Formatting


4 Visualizations, Formatting Tools and Menus, Formatting specific 16
parts of the view.

Editing and Formatting Axes, Manipulating Data in Tableau data,


5 20
Pivoting Tableau data.

Structuring your data, Sorting and filtering Tableau data, Pivoting


6 24
Tableau data.

Advanced Visualization Tools: Using Filters, Using the Detail panel,


7 using the Size panels, customizing filters, Using and Customizing 30
tooltips, Formatting your data with colours.
Creating Dashboards & Storytelling, creating your first
dashboard and Story, Design for different displays, adding
8 39
interactivity to your Dashboard, Distributing & Publishing your
Visualization.

Tableau file types, publishing to Tableau Online, Sharing your


9 45
visualizations, printing, and Exporting.

Creating custom charts, cyclical data and circular area charts, Dual
10 49
Axis charts.
1: Understanding Data, What is data, where to find data, Foundations for building Data
Visualizations, Creating Your First visualization?

Understanding data involves grasping its fundamental concept and recognizing its
sources. Data refers to raw facts, figures, or information. It can be found in various places,
such as databases, spreadsheets, online repositories, and public datasets. Distinguishing
between structured and unstructured data is crucial, with structured data organized in a
predefined manner (like tables), while unstructured data lacks a predefined data model (like
text documents). Knowing where to find relevant data involves exploring databases,
governmental websites, research publications, and specialized platforms tailored to specific
fields. Developing data literacy skills enables individuals to interpret, analyze, and derive
meaningful insights from the available information.
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.
Benefits of Data Visualization:
1. It is easy to understand the information with graphics

2. It made data to be represented in attractive way

3. Shows complex relationships

4. Helps to process large datasets

5. Useful for identifying trends

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.
The following are some common types of data visualizations:

 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.


2: Getting started with Tableau Software using Data file formats, connecting your
Data to Tableau, creating basic charts(line, bar charts, Tree maps),Using the Show
me panel.

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 can be downloaded from the following website:

https://www.tableau.com/products/public/download

after downloading, the following is the screen

appears

Click the licence agreement checkbox and then click on install button. After installation, click
on Tableau Public icon to run Tableau. Following is the Tableau Public home screen.
Tableau supports connecting to a wide variety of data, stored in a variety of places. For
example, data might be stored on computer in a spread sheet or a text file, or in a big data,
relational, or cube (multidimensional) database on a server in enterprise or the data can be from
a public domain available on the web.
Data can be imported in Tableau Public from Connect panel on left side. For example, an Excel
sample data set was loaded into Tableau as follows:
After clicking on open, screen is as follows:

The data store page appears as above. The left pan shows that above dataset consists of 3
worksheets. If we drag orders table, screen appears as follows: Tableau automatically identifies
the data type of each column.
Now drag Returns table onto the Canvas to the right of Orders table. This shows the relation
between the two tables Orders and Returns.

If we click on the link between Orders and Returns table names at the top gives the summary
of the relationship between the tables. Now rename the data store and click on Sheet1 at the
bottom left to proceed. This step creates a data extract which improves query performance.
Bar chart:
Bar charts can be created in 3 variations in Tableau: Horizontal bars, stacked bars, side-by-side bars.
Horizontal bars can be created by selecting that type of chart from Show Me menu on right hand
side of Canvas. The type of chart in box on right hand side represents horizontal bar graph.

In similar to above, stacked bar graph can be created and the result is shown below.
Side-by-side bar chart can be created in following way.

Discrete line graph is shown below:


Pie chart:
3: Tableau Calculations, Overview of SUM, AVR, and Aggregate features, Creating
custom calculations and fields.
We can apply various aggregation and statistical functions on data such as count, minimum,
maximum, sum, Avg, standard deviation, variance etc. This is shown below. This can be done
by right clicking on the required field of dataset, click on Default properties and click on
aggregation

Or the above operation can be done by creating a calculated field as shown below. To create a
calculated field, click on the down arrow button beside search tab above Tables panel, drag a
field to that calculated field window.
Then click on apply and results are shown below:

In the same way we can apply any aggregate or statistical function on data with the help of
calculated fields.
4 : Applying new data calculations to your visualizations, Formatting
Visualizations, Formatting Tools and Menus, Formatting specific parts of the view.

Tableau lets you format specific elements of your visualization:


On the left side of the Tableau interface, you'll find the Format pane. It allows you to format
various aspects of your visualization, such as fonts, colors, lines, shading, and borders. Simply
select the element you want to format and use the options in the Format pane to make changes.

You can add annotations to your visualizations to highlight important points or provide
additional context. Format these annotations using the options available when you right-click on
an annotation.
Tooltips:

Customize tooltips to display relevant information when users hover over data points. You can
format tooltips to show or hide specific fields and control their appearance.
Headers and Titles:

Format headers, titles, and subtitles for clarity and consistency. Use the Format pane or the
Format menu to adjust text formatting, alignment, and shading.
5 : Editing and Formatting Axes, Manipulating Data in Tableau data, Pivoting Tableau data.

Tableau provides several formatting tools and menus to help you refine the appearance of your
visualizations:

Worksheet Menu:

In the Worksheet menu, you'll find options to format the entire worksheet, including background
color, borders, and worksheet title. You can also adjust the worksheet size.
Dashboard Menu:

If you're working with dashboards, the Dashboard menu allows you to format the entire
dashboard layout, including background, size, and title.
6: Structuring your data, Sorting and filtering Tableau data, Pivoting Tableau data.
Filter with Calculated Fields:
Create filters using calculated fields to control which data points are displayed in your
visualization. You can use calculated fields to filter by specific criteria, such as a calculated date
range or a custom ranking.

Sort Data in a Visualization

Quickly sort from an axis, header, or field label

There are multiple ways to sort a visualization with single click sort buttons.

In all cases, one click sorts descending, two clicks sorts ascending, and three clicks clear the
sort.
Sort from the toolbar:

1. Select the dimension you wish to sort.

If you don’t select a field before sorting, the default behavior is to sort the deepest
dimension.

2. Choose the appropriate sort button (ascending or descending) in the toolbar.


7: Advanced Visualization Tools: Using Filters, Using the Detail panel, using the Size
panels, customizing filters, Using and Customizing tooltips, Formatting your data
with colors.

Create Views in Tooltips

In the source sheet, click the Tooltip button in the Marks card to open the Tooltip
Editor

Formatting your data with colors


Using Filters:
Drag dimensions, measures, and date fields to the Filters shelf

Another way to create a filter is to drag a field directly from the Data pane to the Filters shelf.
When you add a field to the Filters shelf, the Filter dialog box opens so you can define the filter.
The Filter dialog box differs depending on whether you are filtering categorical data
(dimensions), quantitative data (measures), or date fields.
8: Creating Dashboards & Storytelling, creating your first dashboard and Story,
Design for different displays, adding interactivity to your Dashboard, Distributing
& Publishing your Visualization.

A dashboard is a way of displaying various types of visual data in one place. Usually, a
dashboard is intended to convey different, but related information in an easy-to-digest form. And
oftentimes, this includes things like key performance indicators (KPI)s or other important
business metrics that stakeholders need to see and understand at a glance.
Dashboards are useful across different industries and verticals because they’re highly
customizable. They can include data of all sorts with varying date ranges to help you understand:
what happened, why it happened, what may happen, and what action should be taken.
For example, category of sales across months in a year, region is the field added. The first view
is shown below. This can be renamed at the bottom of the screen.

Now go to 2nd sheet for creating the 2nd view. The second view is shown below. A bubble chart
was drawn between profit and subcategory. Then rename the sheet.
Next 3rd view is created as follows for profit for each subcategory in the category with averages.

After creating individual views, now a Dashboard can be created by clicking on create
dashboard at the toolbar.
after clicking on new dashboard option, the screen is shown below.

Now the sheets or views which are created earlier can be drag and dropped on this dashboard.
The above three created views are placed in the dashboard as follows. One can follow their own
way of importing sheets on the dashboard. After creating dahsboard, title can be given to the
dashboard from Dashboard tab. Dahsboard can be customized in terms of its appearance by the
user if requied. Dashboard once created can be saved on users system and can be retrieved
whenever required.
9: Tableau file types, publishing to Tableau Online, Sharing your visualizations,
printing, and Exporting.

Tableau File Types:

You can save your work using several different Tableau specific file types: workbooks,
bookmarks, packaged data files, data extracts, and data connection files. Each of these file types
are described below. For related details, see Save Your Work.

 Workbooks (.twb) – Tableau workbook files have the .twb file extension. Workbooks
hold one or more worksheets, plus zero or more dashboards and stories.
 Bookmarks (.tbm) – Tableau bookmark files have the .tbm file extension. Bookmarks
contain a single worksheet and are an easy way to quickly share your work. For more
information, see Save a bookmark(Link opens in a new window).
 Packaged Workbooks (.twbx) – Tableau packaged workbooks have the .twbx file
extension. A packaged workbook is a single zip file that contains a workbook along
with any supporting local file data and background images. This format is the best way
to
package your work for sharing with others who don’t have access to the original data. For
more information, see Packaged Workbooks.
 Extract (.hyper) – Tableau extract files have the .hyper extension. Extract files are a local
copy of a subset or entire data set that you can use to share data with others, when you
need to work offline, and improve performance. For more information, see Extract Your
Data.
 Data Source (.tds) – Tableau data source files have the .tds file extension. Data source
files are shortcuts for quickly connecting to the original data that you use often. Data
source files do not contain the actual data but rather the information necessary to
connect to the actual data as well as any modifications you've made on top of the actual
data such as changing default properties, creating calculated fields, adding groups, and
so on. For more information, see Save Data Sources.
 Packaged Data Source (.tdsx) – Tableau packaged data source files have the .tdsx file
extension. A packaged data source is a zip file that contains the data source file (.tds)
described above as well as any local file data such as extract files (.hyper), text files,
Excel files, Access files, and local cube files. Use this format to create a single file
that you can then share with others who may not have access to the original data
stored locally on your computer. For more information, see Save Data Sources.

These files can be saved in the associated folders in the My Tableau Repository directory, which
is automatically created in your My Documents folder when you install Tableau. Your work
files can also be saved in other locations, such as your desktop or a network directory.

Changing the Repository Location

You can specify a new location for the Tableau repository if you are not using the default
location in your Documents folder. For instance, if you are required to have your data on a
network server instead of on your local machine, you can point Tableau at the remote repository.
1. Select File > Repository Location.

2. Select a new folder that will act as the new repository location in the Select a
Repository dialog box.

3. Restart Tableau so that it uses the new repository.

Changing the repository location does not move the files contained in the original
repository. Instead, Tableau creates a new repository where you can store your files.

Simple Steps to Publish a Workbook

You want to share a workbook with your colleagues, you can publish it to Tableau Server or
Tableau Cloud with a few simple clicks. There, other people can view it, interact with it,
and even edit it if their server permissions allow.

Before you publish your workbook, make sure you know the following:

 The name of the server and how you sign in to it. If your organization uses Tableau
Cloud, you can click the Quick Connect link.
 Any publishing guidelines your Tableau administrator might have, such as the name of
the project you should publish to.

Publish your workbook

1. With the workbook open in Tableau Desktop, click the Share button in the toolbar.

If you aren’t already signed in to Tableau Server or Tableau Cloud, do so now. If you
don’t have a site yet, you can create one on Tableau Cloud.

2. In the Publish Workbook dialog box, select the project to publish to.

3. Name the workbook according to whether you’re creating a new one or publishing
over an existing one.

4. Under Data Sources, select Edit. For Authentication, select Allow refresh
access or Embed password.

For some data connections, only one authentication option appears. If None shows, leave
it set to that.
5. Click Publish.

If this is your first time publishing a workbook, test it on the server and work out any
glitches before letting other users know the workbook is available.

For more details, see these topics:

 Comprehensive Steps to Publish a Workbook


 Publish a Data Source
 Set Credentials for Accessing Your Published Data

Let others know the workbook is available on the server

1. Make sure your colleagues can access the site and project you published to.

2. Send them a direct link to your workbook.

3. After they sign in, the workbook opens for viewing, interacting, or editing.
10: Creating custom charts, cyclical data and circular area charts, Dual Axis charts.
Creating custom charts:
Bump charts are very useful for comparative analysis and in understanding trends over a period
of time. In this blog let’s learn the steps to build a bump chart, with an example scenario –
comparing sales trends in different regions across months of 2017.
1. Build the following chart:

2. Convert the ‘SUM(Sales)’ green pill in Rows to a Rank table calculation:


3. The problem here – as seen in the image above, is that ranking has been done based on
the sales across the months, for each region. But we need the ranking to be done based on
sales across the regions, for each month. So, we would need to change the
level at which the table calculation takes place. Change the ‘Compute Using’ option for
‘SUM(Sales)’ from ‘Table (Across)’ to Compute Using Region. After changing the
computation level, we get the following output:

4. Duplicate the ‘SUM(Sales)’ pill and place it beside the original pill in Rows and
create a dual axis:
5. Convert ‘Marks’ of one of the Measure Axis to ‘Circle’ and add the ‘Rank of
SUM(Sales)’ as the ‘Text’ for the Labels. Change the ‘Alignment’ of the labels’ text as shown
below and hide the axis on the right side of the chart:

6. Finally, edit the axis and reverse the scale. Right click on the axis and select the option
to bring the marks to the front. We get the final output as shown below:
Dual Axis charts:
A dual axis chart is used to present the relationship between two variables. More specifically,
these charts are useful for demonstrating the relationship between two or more measures with
different amplitude and scale. The dual axis charts help in presenting plenty of information in the
limited space present on your dashboard and also allows you to understand the trends, you may
have missed otherwise.

For example, in our US Super Store dataset, we have the Profit and Sales measures. These two
measures have different magnitude and scale. Let’s directly dive into the implementation in a
stepwise manner.

Here, for our visualization, we are going to use three attributes Sub-Category from the
dimensions and two measures i.e. Profit and Sales.

Open a new worksheet and add the Sub-category from the dimension pane to the Columns shelf.

Now pick Sales from the Measures pane and drop in the Row shelf below the Sub-Category.
Similarly, Select Profit measure and drop next to the Sales in Row shelf. After this step, your
visualization will look as shown in the image below.
Here we have two charts present on multiple axes. The next step is to convert these two different
charts into a dual axis chart. For this click on the triangle present on the profit pill in the rows
shelf.

Hereafter, you will have a drop-down menu just select the Dual axis option from that.
Once you select the Dual axis boom! your visualization changes completely. Like this

Although you have a dual axis visualization, they are on different scales. Now there is a need to

bring both measures on the same scale using synchronize axis. For this right-click on any axis

Profit or Sales and select synchronize axis from the menu. As shown in the following image.
Here is the result you have your Dual axis chart with synchronized axes.

To make it more interesting you can further play around with it. Like changing the shape of
Sales from Automatic to bar in the markets card or changing the respective colors, adding
borders.
Similarly, you can go to Profit and change its shape to a line. Your final
visualization will look like this. Interesting right!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy