Data visualization is an integral part of Data Science. A well-designed visualization is a great way for data exploration. It is also much more intuitive and efficient to deliver your findings through data visualization than plain numbers.
Tableau is a powerful and efficient tool to create data visualizations. It allows for creating highly informative plots without writing any code. Besides, multiple visualizations can easily be combined into a dashboard.
Tableau also provides Tableau Public which is a free platform to publicly share your dashboards. It is a great way to demonstrate your skills and creativity.
You can use Tableau for free by downloading the public edition of Tableau Desktop which is available for Windows and Mac. In this article, we will create a simple dashboard using the public edition. We will be using a dataset from Kaggle that contains medical insurance data.
The first step is to add a connection to a data source. It is important to emphasize the word "connect" here because Tableau connects to the data file and uses it to create visualizations. It does not edit the original file.
We select the appropriate format and then navigate to the file where the dataset is saved.
Once Tableau is connected to the file, it provides an overview of the data source and automatically creates a worksheet.
The worksheets are used to create visualizations in Tableau so we select the worksheet from the bottom left. It is called "Sheet 1" by default but we can rename it.
The column names are displayed on the left pane. We can drag and drop columns into the worksheet. We will create a dashboard with three data visualizations.
The first one is a histogram of the charges column which contains the cost of insurance. We drag the charges column to the rows section and select the histogram symbol on the right pane. Let’s also differentiate the rows based on the smoker column so that we can see the effect of smoking on the charges. It is done by adding the smoker column in the rows section.
The screen recording below shows the steps we have just mentioned.
That’s it! It is that simple to create a histogram in Tableau. You may have noticed the abbreviations next to the column names such as bin and CNT. They indicate the aggregation applied to the data. We can change or customize the aggregations from the drop-down menu on the name of the columns.
We clearly see that people who smoke are charged more for medical insurance in general.
It is better to give the worksheet a descriptive name which can be done by right-clicking on the name of the worksheet. In our case, I will rename it as "Distribution of charges".
The second visualization is a scatter plot. We create a new worksheet by clicking the icon next to the worksheet name on the bottom left.
Here is how we can create a scatter plot in Tableau:
We drag the charges column to the rows section. We do not want any aggregation in this case so we select it as a dimension. We do the same for the bmi column but in the columns section. Then Tableau automatically generates the scatter plot.
We can separate smokers and non-smokers using different colors by adding the smoker column in the color section under the Marks pane. The size of the circles representing data points can also be adjusted here.
The second visualization is completed. I will rename it as "Bmi vs Charges" and then create a new sheet for the next plot.
The third visualization is a box plot that displays the distribution of bmi column in different regions.
We put the bmi column in the rows section and the region column in the columns section. Then we change the bmi column to a dimension.
As we can in the screen recording when the columns are put in the sections, the plotting options are highlighted in the right pane.
I will rename the box plot as "Bmi vs Region". It provides an overview of the differences in the distribution of bmi values between regions. Southeast region has higher bmi values in general.
We have created three visualizations using the medical insurance cost dataset. The next step is to combine them in a dashboard. We create an empty dashboard by clicking on the new dashboard icon on the bottom left next to the worksheets.
The worksheets that contain the visualizations are shown on the left. We can now customize the dashboard using the worksheets.
There are many customizations we can do to make the dashboard more informative, functional, and appealing. For instance, we can add a title and set a particular visualization as a filter. We can also adjust the size.
Our dashboard is complete now. We can save it to our Tableau Public profile and share it with others. Here is the final version of the dashboard in my Tableau Public profile.
Conclusion
We have created a simple dashboard. Tableau is a highly versatile and functional tool so it can be used to create much more advanced dashboards. However, it is better to comprehend the basics first.
It takes lots of practice to become an advanced Tableau user. It is an important tool to have in your skillset if you are working or plan to work in the field of data science.
Thank you for reading. Please let me know if you have any feedback.