0% found this document useful (0 votes)
5 views13 pages

Data Visualization Lab Manual: R & Power BI

The document provides an overview of data types, data sources, and the basics of data visualization using tools like R and Tableau. It explains structured and unstructured data, quantitative and qualitative data, and outlines steps for creating visualizations and connecting data to Tableau. Additionally, it covers Tableau's functionalities, including creating basic charts and using aggregate functions for calculations.

Uploaded by

angelharshini62
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)
5 views13 pages

Data Visualization Lab Manual: R & Power BI

The document provides an overview of data types, data sources, and the basics of data visualization using tools like R and Tableau. It explains structured and unstructured data, quantitative and qualitative data, and outlines steps for creating visualizations and connecting data to Tableau. Additionally, it covers Tableau's functionalities, including creating basic charts and using aggregate functions for calculations.

Uploaded by

angelharshini62
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

Mahaveer Institute of Science and Technology

Ex. No. : 1
Date:

Aim:Understanding Data, What is data, where to find data, Foundations for building
Data Visualizations, Creating Your First visualization?

Action

What is Data?
Data is a collection of raw facts gathered by observations, measurements,
research or analysis. It is stored in a structured or unstructured form. They may consist
of facts, numbers, texts, names, figures or even description of things.

Data can be categorized into two main types:


Structured Data: This type of data is organized into a specific format, such as
tables or databases, and is easily searchable and analyzable. Examples include
spreadsheets, relational databases, and CSV files.

Unstructured Data: Unstructured data lacks a specific format and can include
text documents, social media posts, images, audio recordings, and more. Analyzing
unstructured data often requires advanced techniques like natural language processing
and image recognition.

Quantitative data
Quantitative data can be expressed as a number or can be quantified. Simply put, it can
be measured by numerical variables.

Examples of quantitative data:


Scores on tests and exams e.g. 85, 67, 90 and etc.
The weight of a person or a subject.
Shoe size.
The temperature in a room.

Qualitative data
Qualitative data can’t be expressed as a number and can’t be measured.
Qualitative data consist of words, pictures, and symbols, not numbers.
Qualitative data is also called categorical data because the information can be
sorted by category, not by number.

Examples of qualitative data:


Colors e.g. the color of the sea
Names as John, Karthick,…..
Ethnicity such as American Indian, Asian, etc.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

Where to find Data


Internal data
Internal data is data captured by organizational processes.

Example:

 Transactional data (customer purchases and staff pay)


 Email marketing metrics (email opens, click rates)
 Information in customer profiles (names, addresses)
 Records of customer interactions (email queries, support calls)
 Online activity (placing items in an online shopping cart)

Third-party analytics
In some cases, may not have the capacity to capture data, in which case third-
party analytics can be used. Third-party web analytics services can provide cost-
effective collection and analysis and evaluate how your website performs over time or
against averages across the provider’s customer base.

Example:
Google Analytics is a popular tool and provides businesses with the ability to
analyze and better understand how users find and use their websites and pages

External data
External data can include almost anything from historical demographic data to
market prices, or weather conditions to social media trends. Organisations use external
data to analyze and model economic, political, social, or environmental factors that
influence their business.

Example:

Open sources ([Link])


Social media data (Twitter, Facebook, or LinkedIn)
Paid sources (Thomson Reuters or Westlaw)

Open data
Open data is accessible to everyone and free to use. However, if it’s high-level
data, or it’s heavily summarized and aggregated, it might not be very relevant to you.
It might also not be in the format you need, or it might be very difficult for you to
make sense of it. All of these challenges can require a lot of time to make the data
usable.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

Example:
Health and scientific data: World Health Organisation (WHO), [Link] scientific
data, Open Science Data Cloud (OSCDC), Center for Open Science.

Social media: Google trends (i.e. look at national trends on search terms), Yahoo
finance (great for stock market information), Twitter (allows you to search by tags and
users, which can be downloaded by using Twitter APIs).

IoT Devices: Internet of Things (IoT) devices generate vast amounts of data that can
be used for various purposes.

Creating Your First Visualization:


To create your first data visualization, follow these general steps:

 Select Your Data: Choose a dataset that aligns with your goals and interests.
Ensure that the data is clean and well-structured.
 Define Your Objective: Clearly define what you want to communicate or
explore with your visualization. Are you looking to show trends, comparisons,
or distributions?
 Choose the Right Visualization Type: Select a visualization type that suits
your data and objectives. Common types include bar charts, line charts, scatter
plots, histograms, and pie charts.
 Prepare and Transform Data: Preprocess the data as needed. This may
involve aggregating, filtering, or transforming the data to fit the chosen
visualization.
 Create the Visualization: Use a suitable tool or library to create the
visualization. Customize it with labels, colors, and other design elements.
 Interactivity (Optional): If appropriate, add interactive features to the
visualization to allow users to interact with the data.
 Publish or Share: Once you are satisfied with your visualization, publish it on
a platform, embed it in a report, or share it with your intended audience.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology
Ex. No. : 2
Date:

Aim: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.

1. Download and Install Tableau:

First, download and install Tableau Desktop or Tableau Public (a free version).
for the installed specific operating system.

2. Data formats:
Before connecting to data in Tableau, one should know the various formats that
Tableau supports include
Excel (.xlsx),
CSV (.csv),
Text files (.txt),
JSON
Microsoft Access etc .

3. Connect the Data to Tableau:


3.1 Launch Tableau Desktop.
3.2 Go to "File" Menu and then click on "Open".

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

3.3 Choose the data source type (e.g., Excel, CSV, text file) and Select the data file
and click "Open". (Ex. Sample – Superstore)

3.4 Drag any table (e.g. Orders) into working area.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

3.5 Click on Worksheet(Sheet1).

4. Data Source Pane

Once your data is connected, the Data Source Pane will appear on the left-hand
side of the Tableau interface.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

5. Creating Basic Charts


Procedure for creating various charts

A. Line chart

1. From the "Data Source pane", drag and drop the date field to the Columns
shelf and a numeric field (e.g., sales, revenue) to the Rows shelf.

2. Tableau will automatically create a line chart. Then it can be customized by


adding labels, titles, and formatting.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

B. Bar chart
1. Drag and drop a categorical field (e.g., product category, region) to the
Columns shelf and a numeric field to the Rows shelf.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

2. Then Tableau will create a bar chart. To display Labels on the bars click on
Lables and select "Show mark lables"

C. Tree Map
1. Drag and drop a categorical field to the Columns shelf.
2. Drag and drop a numeric field to the Size shelf.
3. Tableau will create a treemap visualization. It can further customize it by adjusting
colors and labels.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

6. Using the Show Me Panel


The Show Me panel in Tableau helps you explore various chart types based on the
data and the fields are selected. Here's how to use it:
1. After adding fields to the Rows and Columns shelves, click on the "Show Me"
panel located on the left side of the Tableau interface.
2. In the Show Me panel, a variety of chart options can be seen that Tableau
recommends based on the data. Click on a chart type to create it.
3. Tableau will automatically generate the selected chart type with the data. It can be
further customized as needed.
4. To go back to the regular worksheet view, click the "Clear" button in the Show Me
panel.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology
Ex. No. : 3
Date:

Aim: Tableau Calculations, Overview of SUM, AVR, and Aggregate features,


Creating custom calculations and fields.

Solution
Aggregate Function: Aggregate function can be a function where the values of
multiple lines are grouped together to form a single summative value. Typical
integration functions include: Measurement (e.g., arithmetic means), Count, etc.

The most commonly used functions in tableau are listed below:


1. SUM: sum of values
2. AVG: average of values
3. MIN: minimum of values
4. MAX: maximum of values
5. VAR: variance of sample population
6. VARP: variance of entire population
7. STDEV: standard deviation of sample population
8. STDEVP: standard deviation of entire population
9. COUNT: count of values

Procedure

1. Connect to the data source for example “Sample-Superstore” and move to


sheet-1.

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

2. Select Analysis >> Create Calculated Field .

3. In the Calculation Editor that opens, give the calculated field a name.

Step 2: Enter a formula

1. In this example, the calculated field is called Profit Ratio.


2. In the Calculation Editor, enter a formula.

This example uses the following formula:

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual


Mahaveer Institute of Science and Technology

Drop Here

DATA VISUALIZATION - R PROGRAMMING/ POWER BI Laboratory Manual

You might also like