Unit - 2
Unit - 2
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.
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.
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.
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.
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.
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.
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.
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.
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.
Certainly! Let's explore how to create univariate line charts and stacked bar graphs in Tableau
with examples:
1. Data Setup:
Assume you have a dataset with columns: "Date" (with quarterly time periods) and
"Sales."
3. Customization:
To refine the chart, you can format the axis, add tooltips, or adjust the color and style
of the line.
1. Data Setup:
4. Customization:
Adjust color schemes, labels, or tooltips for better visualization and interpretation of
quarterly sales for each region.
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.
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.
1. Data Setup:
3. Customization:
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.
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:
1. Data Setup:
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.
Ensure your dataset contains latitude and longitude data for the vertices of the
polygons you want to visualize.
2. Connect to Data:
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.
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).
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
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.
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.
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.
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.
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.
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."
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.
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:
Customize the visualization by adding filters, colors, labels, etc., to analyze the
merged data effectively.
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.