top of page
Search

# Data Visualization with Tableau - Part I

Data visualization is a graphical representation of data in the form of tables, charts, graphs, plots, and maps. In this write-up, I discuss some of the more commonly used visualizations and the steps needed to get them in Tableau.

The first step for data analysis and visualization in Tableau is to obtain data. I have used a supermarket data. For this open Tableau Public on your desktop. Then follow the given steps:

1. Under the connect menu, choose the type of file in which you have the data. Here I have comma separated file.

2. Select file type (I chose text file).

3. Locate the file on your system and double click the file - the dataset is loaded into the Tableau public. The Connection Screen appears.

4. Create your first worksheet by heading to the Worksheets tab at the bottom of the page

The different types of charts and the steps for creating them have been discussed in the following sections.

1). Pie Chart - In pie chart, the data is displayed as a circle divided into wedges, with each wedge representing a portion of the total. The pie chart enables to visualize the breakdown of a measure or dimensions into its parts. The relative sizes of the wedges can be use to compare the different categories.

To create a pie chart to see the percentage share of the different product categories in the total revenue follow these steps:

1. Drag the 'Total' from the data pane and put it in the size card under the marks. It will take it as a sum.

2. Choose the chart to be pie chart under the mark card from the scroll down list.

3. Drag and drop the 'Product Line' from the data pane onto the colors card under the marks.

4. Now, drag the 'Sum (Total) ' in the angles card and convert it to a percentage by right clicking on the the sum(total) with the wedge sign. You can further format the number to two decimal places.

5. Now also drag and drop the 'Product Line' from the data pane onto the text card under the marks.

This will give you a pie chart with wedges colored according to the product line and their sizes corresponding to their percentage distributions to the total revenue. The third and fourth steps will display texts for the categories of the product line along with the percentage share of each besides the wedges for easy reference.

This analysis and visualization, it can be clearly seen that all the product lines almost equally contribute to the total revenue. This insight can also be shared as a note under the caption.

2). Bar Chart - Tableau gives the options of three types of bar charts which are as follows:

a). Standard horizontal bar charts - They are used to display the values of a single measures for different categories or groups. They help in the comparison of values across the categories.

b). Stacked bar charts - They are used to display the values of multiple measure for different groups, representing each category differently. They help to show the contribution of each measure to the total value for each category

c). Side-by-side bar charts- They are used to display the values of multiple measures for different categories or groups, with each measure displayed in a separate bar next to the other. This allows the comparison of values of multiple measures for each category.

To make a standard horizontal bar chart follow the given steps,

1. Drag the 'Payment' (mode) from the data pane to the column shelf on the top.

2. Drag the 'Total' from the data pane to the row shelf on the top.

3. Now drag the 'Total' from the data pane to the text card under the marks. This will allow the total revenue for each payment mode to be displayed above the corresponding bar for easy reference.

This analysis by bar chart shows that the highest revenue has been obtained from cash mode of payment followed by ewallets and then credit cards.

To make a stacked bar chart follow the given steps:

1. Drag the 'Total' from data pane to the rows shelf.

2. Drag the 'City' from data pane to the colors card under the marks.

3. Dark the 'Total' from data pane to the text card under the marks. This will allow you to see the revenue for each city in the stacked bar.

The analysis from this stacked bar chart shows that Naypyitaw city gives a higher revenue than the two other cities.

To make the side-by-side bar chart follow the given steps,

1. Drag and drop 'Invoice ID' from the data pane to the rows and convert it to a count.

2. Drag and drop 'Product Line' from the data pane to the columns shelf on the top.

3. Drag and drop 'Gender' from the data pane to the columns shelf on the top.

4. Drag and drop 'Gender' from the data pane to the colors card under the marks.

This analysis shows that in most of the product categories the female customers tend to order more stuff than the males except for in the health and beauty, electronics accessories, and home and lifestyle categories. Females tend to buy considerably more of fashion accessories as compared to males.

In the part 2 of this blog we will continue with other charts.