UNIT-2
UNIT-2
Importance of Data Visualization
Data visualization is a graphical representation of quantitative information and data by using visual elements like graphs, charts, and maps.
➢ Data visualization convert large and small data sets into visuals, which is easy to understand and process for humans.
➢ Data visualization tools provide accessible ways to understand outliers, patterns, and trends in the data.
➢ In the world of Big Data, the data visualization tools and technologies are required to analyze vast amounts of information.
➢ Data visualizations are common in your everyday life, but they always appear in the form of graphs and charts. The combination of multiple visualizations and bits of information are still referred to as Infographics.
➢ Data visualizations are used to discover unknown facts and trends. You can see visualizations in the form of line charts to display change over time. Bar and column charts are useful for observing relationships and making comparisons. A pie chart is a great way to show parts-of-a-whole. And maps are the best way to share geographical data visually.
Today's data visualization tools go beyond the charts and graphs used in the Microsoft Excel spreadsheet, which displays the data in more sophisticated ways such as dials and gauges, geographic maps, heat maps, pie chart, and fever chart.
Steps to prepare data visualization:
Step-1: In the Tableau, connect to the databases.
The data source has three data (Coffee Shop) files – Fact Table, Location and Product. These are three different excel sheet present in one data file.
Open Product data file
Add fact table it contains the information about each product
Now we see the embedding of two data files
If you’ll float on the join then you can see that there is a inner join using the common key i.e. Product ID. Inner join simply means that there are two files have a field in common and it can be combined easily.
Next, add the Location file and it can be see that it is also joined.
Now, that data is completely ready for data visualization
Click Quantity and then at the top right corner of the screen, at the right edge of the tool bar, there is the Show Me button. Visualization can be obtained using the Show Me option.
So, click text table option then one can get 746, 160 is visible. So that’s not a very interesting visualization. Let us create new visualization with more fields.
Select multiple fields that aren’t next to each other. You will click quantity again and Product Category. Tableau will display a much wider variety of available visualizations that can be created.
How "Me" Works
When we are creating our first visualization in Tableau, it's essential to understand how the "Me" perspective works, referring to user interaction, customization, and personalization within Tableau.
1. Connecting to Data
- Open Tableau Desktop and click on Connect to import your dataset (Excel, CSV, SQL, etc.).
- Choose the required table and drag it into the data source workspace.
2. Understanding the Tableau Interface
- Data Pane: Displays all dimensions and measures.
- Sheets & Dashboard: Where visualizations are built.
- Show Me Panel: Suggests best-fit visualizations based on selected data.
3. Building the First Visualization
- Drag a dimension (e.g., "Category") to Columns.
- Drag a measure (e.g., "Sales") to Rows.
- Tableau automatically generates a bar chart.
4. How "Me" Works – Customizing the View
- Click on Show Me to explore different chart types.
- Drag another dimension (e.g., "Region") to Color under the Marks card.
- Change chart type to Pie Chart, Line Graph, or Scatter Plot as needed.
5. Interactivity & Filters
- Drag a field (e.g., "Region") to Filters to allow user-driven insights.
- Right-click and choose Show Filter to make it interactive.
6. Adding Tooltips & Labels
- Drag "Sales" to Label to display values.
- Click on Tooltip to customize pop-up information.
7. Saving & Sharing the Dashboard
- Go to File > Save As (Tableau Workbook format).
- Publish to Tableau Server or Tableau Public for sharing.
How to connect Text file to Tableau
Step-1: Open the Tableau window
Step-2: Import the Text file (from your drive) through the data source
Step-3: Select all order fields (Column fields) and then right click on the any selected filed the pop-up box appear, here select the pivot.
Step-4: Select New Sheet, you get like the below. Here you may observe the fields Pivot Field Names and Pivot Field Values.
Step-5: Select any customer by using filter option in the tableau interface and then select any one customer example: Julia.
By double click the Pivot Field Values and rename it as Order (Quantity)
After that drag and drop the Pivot Field names into columns, one will get (i.e., Pivot Field names represent Date) so change the name of Pivot Field Names as Date.

Now change the New Date into Months format by the following
- Right Click on Year (New data) and then pop-up box appear
- Select months
Chart Types
a) Creation of Bar Chart:
Step 1: Connect to Data
- Open Tableau and connect to your dataset (Excel, CSV, SQL, etc.). (Ex: Coffee Type data file)
- Go to Sheet 1 after loading the data.
Step 2: Drag Fields to Create a Bar Chart
- Drag a Dimension (Category, Product, Region, etc.) to the Rows shelf.
- Drag a Measure (Sales, Profit, Quantity, etc.) to the Columns shelf.
- Tableau will automatically generate a bar chart. If you need to customize
Step 3: (i) Simple Bar Chart
- Change Bar Direction: Swap fields between Columns and Rows to switch between vertical and horizontal bars.
- Color & Labels:
- Drag a field to the Color shelf in the Marks card to color bars by category.
- Click on the Label option to show values on bars.
- Change Bar Direction: Swap fields between Columns and Rows to switch between vertical and horizontal bars.
- (ii). Bar Chart with Aggregate and Disaggregate Data (Retail Sales data set from the Training Data sets)
- Step-1: Import the Retail Sales data set. Take new worksheet. Drag and drop Product Container to Column shelf and Sales to row shelf. Double click Sales then the resultant chart i.e, Bar represents the data in aggregate.
Step-2: If you need to represent the data in disaggregate level then go to Analysis tab (Ribbon on Top) and deselect Aggregate. You will get the chart i.e. each Bar at disaggregate.
(iii). Gantt Bar
(Retail Sales data set from the Training Data sets)
Step-1: Repeat the above two steps
Step-2: Open Automatic in Mark Pane, in the drop menu select Gantt Bar.
(iv). Bar in Bar
Step-1: Import the Retail Sales data set. Take new worksheet. Drag and drop Product Segment to Row shelf and Measure Names to row shelf, Double click Sales and Profits (Or Right click on Measure Names then select Sales and Profits in the drop button) then the resultant chart.
Step-2: Click side by side bar chart from the Show Me menu
Step-3: Drag and drop the Measure Names into Colors under Marks Pane. If you need to change the positions of Sales and Profits with in the Bar,
If you need to show in the other way then drag and drop the Measure Names in to Shapes.
(v) Stacked Bar
Step-1: Import the Retail Sales data set. Take new worksheet. Drag and drop Shipping Mode to Column shelf and Order date to row shelf, Double click Sales then the resultant chart
If you need to present each stack bar with a percentage, drag and drop the sales measure into the Marks Pane. Now Right Click on Sales then appear the pop-up box, select Quick Table Calculation and then select Percent of total. Now click and drag the Sales into the Label. The resultant as
Step-1: Import the Coffee Shop data set. After connecting the data file, take new worksheet. Drag and drop Product type and Product to Row shelf and Budget sales put into column shelf.
Step-2: Now drag and drop Sales into column shelf you will get side by side bar graph.
Step-3: Now expand the show me where select bullet bar chart, it clearly visualize the Budget Sales as color and Actual Sales in a st.line. If you place the cursor, observe the difference.
Step-1: Connect the Retail sales data
Step-2: Open New worksheet and drag and drop State into Column shelf, Discount and Profit into Row shelf.
Step-3: a) Right click on the Row shelf measure value i.e., Discount and Profit and then select the average rather than sum.
b) Right click on the measure axis, select dual axis in the popup box. Now you place the cursor anywhere its shows avg discount and avg profit.
d) Now click Profit under Mark Pane, in the drop button select line .Further more you need o show in a different way choose Area rather than line.
viii) Histogram Bar Chart:
Step-1: Connect the Retail sales data
Step-2: Open New worksheet and observe in the left side pane Customer Age converted into Dimension by right click and select the Convert to dimension in the po-up box. Double Click the Profit.
Step-3: Now right click on the Customer Age on the LHS pane, select create and then Bin.
Step-4: After open the Popup i.e., Edit Bin change the size of bins as 5 and then click Ok. Observe creation of new Customer Age (Bin).
Step-5: Drag and drop Profit into column shelf and Customer Age (Bin) into Row shelf. And swap the axis you will get histogram.
Step-6: Again, right click on the Customer age (Bin), select edit in the pop-up and then, then create new variable as Age Grouping and select drop in Size in Bin select create new parameter and click Ok, Now in the another popup select allowable values and then click Ok.
Now right click on the bottom Age Grouping select show parameter control in popup then RHS top corner Age Grouping tab appear with 5. If you can change the width, you are getting different histograms with different Class intervals.
Now you need to change colors, just drag and drop profit into color in Mark Pane. Now the resultant chart represents high profit with dark color and less profit with light color.
b) Creation of Line Chart: (Retail Sales data file)
i) Line Chart – Single axis
Step-1: Connect the Sales data
Step-2: Open new work sheet, drag and drop Order date into Column shelf and Profit into row shelf. Then Tableau immediately change the table into chart.
Step-3: Right click on Order date and select Continuous. After that you can select Quarte wise or Month wise etc.,
Step-4: If you need to create line chart for region wise, then drag and drop region into row shelf.
(ii). Line Chart (Blended Axis)
Step-1: Open the Tableau window import the Retail Sales data and connect.
Step-2: Open new work sheet, drag and drop Order date into Column shelf and Profit into row shelf. Then Tableau immediately change the table into chart.
Step-3: Right click on Order date and select Continuous.
Step-5: Let Right click on measures names select edit filters and select which ever you need in the popup box.
Step-1: Open the Tableau window import the Retail Sales data and connect.
Step-2: Open new work sheet, drag and drop Order date into Column shelf and Profit into row shelf. Then Tableau immediately change the table into chart.
Step-2: Let double click on Order quantity.
Step-3: Now right click on the lower axis and select dual axis on the popup box.
Step-4: If you need to show in a different way like Profits in bar. Just click on the Automatic drop box and select bar.
Step-5: Suppose you need to synchronize (Bothe the measures are in the same measure of axis) the both axis, then right click on the RHS axis and select the synchronize on popup box.
c) Maps – Filled Maps
Step-1: Open the Tableau window import the Retail Sales data and connect.
Step-2: Open new work sheet, now double click on states.
Step-3: Now we add, sales and right click then select average under measure (sum) in the popup box.
Step-4: Now select Maps under Show Me.
If you need to beautify the map then select colors under mark pane, select edit colors and then select Red Green Gold divergent in the drop button, click apply and then click ok. It is nothing but filled Maps.
Suppose you need to present the average sales in each of the states, just drag and drop the Sales into Label. Also you need to present the symbol of currency, simply right click on the (sales) Profits, select format in the popup box instead of default and made changes.
d) Heat Maps:
Step-1: Import the data set into tableau window (Retail sales) and connect the Orders by drag and drop.
Step-2: Open the New Work Sheet. Drag and drop Order Date into rows and Region into columns. Place the cursor on the Order Date you will see the ‘+’ button, if you will click the button the data broken up into quarter wise.
Step-3: Now drag and drop the ‘sales measure’ from the pane. Now click Automatic and select ‘squares’ then you observe all data points on right pane of Tableau window become as squares (Equal Size). After that drag and drop sales measure into squares or double click. Now you observe the shapes sizes as per the Sales quantity. For visibility you can click and drag.
Step-4: Let you need more visualize the data, just drag and drop the ‘sales measure’ into colors. Also, you need to incorporate profit, just drag and drop the ‘profit measure’ into ‘color’ Marks. For more attractive, click ‘color’ mark, select ‘edit colors’ and then choose red and green divergence in the drop button. Now circles represent Sales and Color represent the Profit.
If you need to improve the sizes, just click ‘size’ under ‘mark’ pane and select suitable size.
e) Pie Charts
Step-1: Open the Tableau window import the Retail Sales data and connect.
Step-2: Open new work sheet, now drag and drop the region into row shelf and double click on profit.
Step-3: Select Pie Chart from the Show Me. Add filters for better view.
f) Scatter Plots
Step-1: Open the Tableau window import the Retail Sales data and connect.
Step-2: Open new work sheet, now double click on profit and sales.
Step-3: Now you drag and drop the product category into colors under Mark pane.
For More visualization now drag and drop the city into detail under Mark Pane.
Step-4: Go to Analyze, apply trendline.
Comments
Post a Comment