0% found this document useful (0 votes)
5 views

Unit - 2

The document provides a comprehensive guide on creating various types of charts in Tableau, including bivariate and univariate charts, and explains how to connect and merge multiple data sources. It includes step-by-step instructions for visualizing relationships between variables, such as scatter plots and dual-axis charts, as well as comparisons between tree maps and heat maps. Additionally, it covers techniques for customizing visualizations and swapping rows and columns in bivariate charts.

Uploaded by

datta58639
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 views

Unit - 2

The document provides a comprehensive guide on creating various types of charts in Tableau, including bivariate and univariate charts, and explains how to connect and merge multiple data sources. It includes step-by-step instructions for visualizing relationships between variables, such as scatter plots and dual-axis charts, as well as comparisons between tree maps and heat maps. Additionally, it covers techniques for customizing visualizations and swapping rows and columns in bivariate charts.

Uploaded by

datta58639
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
You are on page 1/ 14

keyboard_arrow_down UNIT - 2

keyboard_arrow_down Q) How to create bivariate charts in tableau with examples.


Creating bivariate charts in Tableau involves visualizing relationships between two variables to
understand correlations, patterns, or trends within data. Here's how you can create some
common bivariate charts in Tableau with examples:

keyboard_arrow_down 1. Scatter Plot :


Example: Visualizing Sales vs. Profit

1. Open Tableau and connect to your dataset.


2. Drag the "Sales" field to the Columns shelf and "Profit" to the Rows shelf.
3. Tableau will automatically create a scatter plot, plotting sales against profit.

2. Dual Axis Chart :


Example: Comparing Sales and Quantity Sold

1. Drag the "Sales" field to the Rows shelf.


2. Drag the "Quantity" field to the right side of the existing chart; it will create a second axis.
3. Right-click on the second "Quantity" axis and select "Dual Axis."
4. You'll have two measures (Sales and Quantity) visualized on separate axes in the same
chart.

3. Adding Trend Lines :


Example: Analyzing Trend between Discount and Sales

1. Create a scatter plot of "Discount" on the X-axis and "Sales" on the Y-axis.
2. Drag the "Discount" field again to the chart.
3. Right-click on the second "Discount" field and choose "Add Trend Line."
4. Tableau will add a trend line to the scatter plot, showing the relationship between discount
and sales.

4. Using Color Palettes :


Example: Visualizing Profitability by Region

1. Create a scatter plot of "Profit" on the Y-axis and "Region" on the X-axis.
2. Drag the "Region" field to the Color shelf.
3. Tableau will assign different colors to regions, allowing for the comparison of profitability
across regions.

5. Handling Dates in Bivariate Charts :


Example: Analyzing Sales over Time

1. Create a line chart with "Order Date" on the X-axis and "Sales" on the Y-axis.
2. Drag another measure like "Profit" to the chart.
3. Tableau will create a dual-axis chart, allowing comparison of sales and profit trends over
time.

Tips :
Customize bivariate charts by adjusting axis scales, adding reference lines, or formatting
colors and shapes based on specific data attributes.
Experiment with different chart types and settings to best represent the relationship
between variables.

These examples showcase how to create bivariate charts in Tableau to visualize relationships
between two variables, enabling better analysis and insights into your data.

keyboard_arrow_down Q) What is the difference between a tree and heat map.


Certainly! Here's a brief comparison between tree maps and heat maps in tabular form:
Aspect Tree Map Heat Map

Representation Displays hierarchical data as nested rectangles Uses colors to represent values in a matr

Hierarchy Visualization Effective for illustrating hierarchical structures Focuses on matrix-based data display
Purpose Emphasizes hierarchical relationships and categorical data Highlights patterns and variations in tabu

Data Encoding Uses size and color for data representation Relies solely on color intensity to represe
Example Use Case Visualizing hierarchical data like sales categories Analyzing data patterns in a matrix forma

This comparison summarizes the key differences between tree maps and heat maps, outlining
their distinct features, purposes, and typical use cases.

keyboard_arrow_down multiple data sources.


Q) How to connect data source and explain how to merge
To connect to a data source and merge multiple data sources in Tableau:

keyboard_arrow_down Connecting to a Data Source :


1. Open Tableau: Launch Tableau Desktop.
2. Connect to Data: In the "Connect" pane, select the type of data source you want to connect
to (Excel, CSV, Database, etc.).
3. Select Data File or Server: Choose the specific file or server where your data is located.
4. Authenticate: If required, provide credentials to access the data source.
5. Import Data: Tableau will display a preview of your data. Select the tables or sheets you
want to work with and import them into Tableau.

Merging Multiple Data Sources :


1. Open Tableau Desktop: Ensure you have already connected to at least one data source.
2. Data Pane: In Tableau, navigate to the "Data" pane.
3. Add New Data Source: Click on the "Add" button in the Data pane to connect to another
data source (can be of the same or different type).
4. Join or Union Data: After connecting to the new data source, you can:

Join: Drag and drop common fields between the data sources to create a join
relationship.
Union: Combine data from different tables or sheets into a single data source using
the Union option. Tables should have similar structures.

Steps for Joining Data :


1. Drag a field from one data source to a field from another data source.
2. Tableau automatically suggests the join type (Inner, Left, Right, etc.), or you can specify the
join type using the join options.
3. Define Join Clauses: Customize join clauses by clicking on the join line between tables,
selecting/editing join clauses, or adding new clauses if necessary.

Steps for Unioning Data :


1. Drag tables or sheets from different data sources to the Data pane.
2. Hold down the Ctrl (Command for Mac) key and click on the tables/sheets you want to
combine.
3. Right-click and select "Union."

Conclusion :
Connecting to a data source in Tableau involves selecting the type of data you want to import
and providing necessary credentials. Merging multiple data sources can be done through joins or
unions, enabling the combination of data from different sources for comprehensive analysis
within Tableau.

keyboard_arrow_down Q) Discuss about univariate charts in tableau with example.


Univariate charts in Tableau are used to visualize and analyze a single variable or a single
measure within your dataset. These charts are valuable for understanding the distribution,
frequency, and characteristics of a single variable. Here are some common types of univariate
charts in Tableau along with examples:

keyboard_arrow_down 1. Bar Chart :


Description: A bar chart represents data using rectangular bars, where the length or height
of each bar is proportional to the value it represents.
Example: Visualizing Sales by Product Category.

Drag the "Product Category" dimension to the Columns shelf and "Sales" measure to
the Rows shelf.
Tableau automatically generates a bar chart displaying sales for each product
category.

2. Pie Chart :
Description: A circular chart divided into slices to illustrate numerical proportions.
Example: Showing Market Share by Region.

Drag the "Region" dimension to the Pie chart on the Marks card and the "Market
Share" measure to the Angle option.
Tableau creates a pie chart displaying market share percentages for each region.

3. Histogram :
Description: A histogram displays the distribution of numerical data by splitting it into bins
or intervals and showing the frequency of values within each bin.
Example: Analyzing Age Distribution.

Drag the "Age" measure to the Columns shelf.


Right-click on the "Age" axis and select "Create Bins." Drag the created bins to the
Columns shelf to create a histogram showing the distribution of ages.

4. Line Chart :
Description: A line chart connects data points with lines to show trends over a continuous
period.
Example: Visualizing Stock Prices Over Time.

Place the "Date" dimension on the Columns shelf and the "Stock Price" measure on
the Rows shelf.
Tableau will generate a line chart displaying stock prices across different dates.

5. Stacked Bar Chart :


Description: Similar to a bar chart, but with multiple bars stacked on top of each other,
showing the total and component values for each category.
Example: Analyzing Quarterly Sales by Region.

Place "Quarter" on the Columns shelf and "Sales" on the Rows shelf.
Drag the "Region" dimension to the Color shelf to create a stacked bar chart
displaying sales for each region per quarter.

Conclusion :
Univariate charts in Tableau help in understanding individual variables or measures by providing
clear visualizations. They aid in exploring distributions, comparisons, and trends within a single
variable, assisting in gaining insights into specific data characteristics.

keyboard_arrow_down visualization with example using tableau.


Q) Explain univariate line charts and stacked bar graphs

Certainly! Let's explore how to create univariate line charts and stacked bar graphs in Tableau
with examples:

keyboard_arrow_down Univariate Line Chart Example :


Objective: Visualizing Quarterly Sales Over Time.

1. Data Setup:

Assume you have a dataset with columns: "Date" (with quarterly time periods) and
"Sales."

2. Creating the Line Chart:

Open Tableau and connect to your dataset.


Drag the "Date" field to the Columns shelf.
Drag the "Sales" field to the Rows shelf.
Tableau will automatically create a line chart, representing sales over time in
quarters.

3. Customization:

To refine the chart, you can format the axis, add tooltips, or adjust the color and style
of the line.

Univariate Stacked Bar Graph Example :


Objective: Analyzing Quarterly Sales by Region.

1. Data Setup:

Assume your dataset has columns: "Quarter," "Region," and "Sales."

2. Creating the Stacked Bar Graph:

In Tableau, drag the "Quarter" field to the Columns shelf.


Drag the "Sales" field to the Rows shelf.
Drag the "Region" field to the Color shelf to differentiate regions.

3. Convert to Stacked Bar:

Tableau might initially display a regular bar chart.


Right-click on the "Sales" axis and select "Stack Marks" > "Entire View" to stack the
bars by region.

4. Customization:

Adjust color schemes, labels, or tooltips for better visualization and interpretation of
quarterly sales for each region.

Example Scenario - Univariate Line Chart :


Suppose you have a dataset containing quarterly sales data for a company:
Date Sales

2022 Q1 5000

2022 Q2 6200

2022 Q3 4800
2022 Q4 5800

... ...

By following the steps mentioned earlier for the line chart, you can visualize these quarterly sales
figures over time using a line chart in Tableau.

Example Scenario - Univariate Stacked Bar Graph :


Imagine your dataset includes quarterly sales figures by region:
Quarter Region Sales

2022 Q1 North 3000


2022 Q1 South 2500

2022 Q2 North 3200


2022 Q2 South 3000

... ... ...

By following the outlined steps for the stacked bar graph, you can visualize the quarterly sales
for each region, stacked in a bar chart format in Tableau.

These examples illustrate how to create univariate line charts and stacked bar graphs in Tableau
to effectively represent and analyze data based on specific variables or measures.

keyboard_arrow_down Q) Explain bivariate scatter plots with example using tableau.


Certainly! A bivariate scatter plot in Tableau displays the relationship between two variables by
plotting their values as points on a Cartesian coordinate system. Each point represents an
observation with values on both variables. Here's an example of creating a bivariate scatter plot
in Tableau:

keyboard_arrow_down Example Scenario - Bivariate Scatter Plot :


Objective: Visualizing the Relationship between Sales and Profit.

1. Data Setup:

Assume you have a dataset with columns: "Sales" and "Profit."

2. Creating the Scatter Plot:

Open Tableau and connect to your dataset.


Drag the "Sales" field to the Columns shelf.
Drag the "Profit" field to the Rows shelf.
Tableau will automatically create a scatter plot with Sales on the X-axis and Profit on
the Y-axis.

3. Customization:

Format the axes as needed (e.g., scale, titles, axis labels).


You can adjust the size, color, or shape of the points to represent additional
dimensions if necessary.
Add trend lines or reference lines to visualize any trends or patterns in the data.

Steps to Create Bivariate Scatter Plot in Tableau :


1. Connect to Data: Import your dataset containing "Sales" and "Profit" columns.
2. Drag Fields: Drag the "Sales" field to the Columns shelf and "Profit" field to the Rows shelf.
3. Adjust Marks:

Tableau defaults to showing data as points (dots) on the scatter plot.


You can edit the properties of these points by adjusting size, color, or shape from the
Marks card.

Example Visualization :
Suppose you have a dataset with sales and profit data:
Sales Profit

100 20
200 30

150 15

300 40
... ...

By following the steps mentioned above, you can visualize the relationship between Sales and
Profit using a bivariate scatter plot in Tableau. Each point on the plot represents an observation
(e.g., a product, transaction) with its Sales and Profit values.

This scatter plot helps in analyzing how the two variables (Sales and Profit) are related. For
instance, observing if higher sales result in proportionally higher profits or if there's any
clustering or dispersion in the data points. The pattern or trend depicted by the scatter plot
provides insights into the relationship between these variables.

keyboard_arrow_down charts using tableau with example.


Q) How to perform swapping rows and columns in bivariate

In Tableau, swapping rows and columns in a bivariate chart can be done to change the
arrangement of the data fields on the visualization axis. Here's how you can perform swapping
rows and columns in a bivariate chart using Tableau:

keyboard_arrow_down Example Scenario - Swapping Rows and Columns in a Scatter Plot :


Objective: Swapping Sales and Profit on the Scatter Plot.

1. Data Setup:

Assume you have a dataset with columns: "Sales" and "Profit."


2. Initial Scatter Plot Setup:

Open Tableau and connect to your dataset.


Drag the "Sales" field to the Columns shelf and "Profit" field to the Rows shelf to
create a scatter plot.

3. Swapping Rows and Columns:

To swap the fields:

Click on the field names in the Rows or Columns shelf.


Drag the field you want to swap to the other shelf.
For instance, drag "Profit" from the Rows shelf to the Columns shelf, or vice
versa.
Tableau will update the scatter plot, swapping the fields on the respective axes.

Steps to Swap Rows and Columns in Tableau :


1. Open Worksheet: Access the worksheet where the bivariate chart is created.
2. Locate Rows and Columns Shelf: Identify where the respective fields are placed (e.g., Sales
on Columns, Profit on Rows).
3. Swap Fields:

Click and drag the field name from one shelf (Rows or Columns) to the other shelf.
Tableau will automatically adjust the visualization, swapping the placement of the
variables on the axes.

Example Visualization :
Suppose you initially create a scatter plot with Sales on the X-axis and Profit on the Y-axis:

Initial Setup:

Sales (X-axis)
Profit (Y-axis)

By swapping the rows and columns, you can switch the placement of Sales and Profit:

Swapped Setup:

Profit (X-axis)
Sales (Y-axis)

This swapping changes the orientation of the scatter plot, allowing you to observe the
relationship between Profit and Sales from a different perspective.

Swapping rows and columns in Tableau provides an alternative view of the relationship between
variables, aiding in the analysis and interpretation of bivariate data in your visualization.
keyboard_arrow_down Q) How to use polygon shapes for visualization using tableau.
In Tableau, polygon shapes can be used to create custom geographic visualizations or complex
shapes by defining their coordinates. However, Tableau's native functionalities do not directly
support creating arbitrary polygons. Instead, you can use data that includes latitude and
longitude coordinates to generate polygon shapes or custom maps.

Here's an overview of using polygon shapes for visualization using Tableau:

keyboard_arrow_down Using Polygon Shapes for Custom Maps :


1. Prepare Data:

Ensure your dataset contains latitude and longitude data for the vertices of the
polygons you want to visualize.

2. Connect to Data:

Open Tableau and connect to your dataset containing geographic coordinates.

3. Create Polygon Shapes:

Drag the latitude and longitude fields onto the Rows and Columns shelves,
respectively.
For creating polygons, arrange the fields such that they represent the coordinates of
the polygon's vertices in the correct order.

4. Edit Data Roles:

Tableau might not recognize the geographic nature of your data by default. To ensure
Tableau treats the data as geographic, assign geographical roles (e.g., Geographic
Role > Latitude/Longitude).

5. Use Polygon Data:

Once the latitude and longitude fields are set up, you can create a map visualization.
Drag a dimension field (e.g., a category or identifier) to the Detail or Color shelf to
differentiate between different polygon shapes.

6. Customize Visualization:

Adjust the formatting, colors, tooltips, and labels as needed for better visualization.

Example Scenario :
Suppose you have a dataset containing latitude and longitude coordinates defining the
boundaries of specific regions:
Region Latitude Longitude

A Lat1, Lat2, Lat3... Lon1, Lon2, Lon3...


B Lat1, Lat2, Lat3... Lon1, Lon2, Lon3...

... ... ...

By arranging latitude and longitude coordinates in the correct order and following the steps
mentioned above, you can create polygon shapes representing different regions or boundaries in
Tableau.

Important Note :
Creating custom polygons in Tableau often requires careful arrangement of latitude and
longitude coordinates in the correct order to form closed shapes.
It's also possible to import shapefiles or other geographic files into Tableau for more
complex polygon-based visualizations.

Tableau's capabilities for custom polygon shapes are often used in mapping geographical
regions, visualizing boundaries, or creating intricate shapes using the provided coordinate data.

keyboard_arrow_down Q) Write about marks card in tableau with example.


In Tableau, the Marks card is a fundamental feature that controls how data points (marks) are
displayed and visualized within a worksheet. It allows you to customize the appearance and
behavior of individual data points based on different dimensions and measures. The options
available on the Marks card vary depending on the visualization type and the fields used in the
view.

keyboard_arrow_down Overview of Marks Card :


1. Accessing the Marks Card:

In Tableau Desktop, the Marks card is located to the right of the visualization canvas
when a worksheet is active.

2. Functionality:

The Marks card enables you to control the characteristics of marks in the view,
including color, size, shape, label, tooltip, and other attributes.
It allows you to assign dimensions and measures to different properties of the marks
for better visual representation.

Example Usage of Marks Card :


Let's consider a simple scenario of visualizing Sales by Region using a bar chart:

1. Creating the Visualization:

Connect to your dataset that includes columns for "Region" and "Sales."
Drag the "Region" dimension to the Columns shelf and the "Sales" measure to the
Rows shelf to create a bar chart.

2. Utilizing the Marks Card:

When "Region" and "Sales" are placed in the view, the Marks card displays options
such as Color, Size, Label, and Tooltip.

Dragging dimensions or measures to these options on the Marks card will affect how
the data points (bars in this case) are represented.

For instance:

Dragging "Region" to the Color shelf on the Marks card will color each bar based
on its respective region.
Dragging "Sales" to the Label shelf will display the sales values on the bars.
Adjusting the properties on the Marks card allows you to customize the
appearance and information displayed within the visualization.

Common Options on Marks Card :


Color: Assigns colors to marks based on a dimension or measure.
Size: Adjusts the size of marks based on a measure's values.
Shape: Modifies the shape of marks (applicable to certain visualization types).
Label: Displays text labels associated with marks.
Tooltip: Determines the information displayed when hovering over marks.

Conclusion :
The Marks card in Tableau serves as a powerful tool for customizing visualizations by controlling
various attributes of individual data points. It allows users to enhance the clarity and depth of
analysis by effectively displaying and differentiating data within the visualization.

keyboard_arrow_down tableau with example.


Q) Explain how to merge excel and oracle data source in

To merge data from Excel and Oracle data sources in Tableau, you can perform data blending.
Data blending allows you to combine data from different sources based on a common field.
Here's a step-by-step guide with an example:
Example Scenario :

Suppose you have sales data in an Excel file containing order information and another set of
data related to customers in an Oracle database. Both datasets share a common field, such as
"Customer ID."

Steps to Merge Excel and Oracle Data Sources in Tableau :


1. Connect to Excel Data:

Open Tableau and click on "Connect" > "Excel."


Browse and select the Excel file containing the order data.
Click on the sheet/tab that contains the relevant data and drag it to the canvas or
choose "Sheet1" if there's only one sheet.

2. Connect to Oracle Database:

Click on "Connect" > "To a Server" > "Oracle."


Enter the necessary connection details (server, username, password, etc.) to connect
to the Oracle database.
Select the relevant tables/views that contain the customer information and drag
them to the canvas.

3. Define Relationships:

Identify the common field(s) between the Excel and Oracle datasets (e.g., "Customer
ID").
Ensure the field(s) have the same data type and contain matching values across both
datasets.

4. Create Blended Relationship:

Drag the common field ("Customer ID") from the Excel dataset to the Oracle dataset.
This action creates a relationship between the two datasets.

5. Build Visualization:

Create a new worksheet.


Drag fields from both data sources to the Rows or Columns shelf to visualize blended
data.
For instance, you might display order details from Excel and customer information
from Oracle in the same visualization based on the common "Customer ID."

6. Customize and Analyze:

Customize the visualization by adding filters, colors, labels, etc., to analyze the
merged data effectively.

7. Validate and Publish:


Review the visualization to ensure the data blending works as intended.
Save the Tableau workbook or publish it to Tableau Server or Tableau Online for
sharing.

Notes :
Ensure that the common field used for blending has consistent and matching data across
both datasets.
Data blending in Tableau does not perform SQL JOIN operations. It combines aggregated
data from different data sources based on relationships.

By following these steps, you can merge data from Excel and Oracle sources in Tableau using
data blending, providing you the ability to create comprehensive visualizations that leverage
information from multiple data sources.

You might also like