Tableau-Makeover 2

Refine of “Merchandise trade performance with major trade partner, 2020”

Jiayi Wang https://www.linkedin.com/in/jiayi-wang-smu/
06-15-2021

1. Introduction

This post is downloaded from Singapore Statistics Official Website, which is created by using data provided by Department of Statistics, Singapore (DOS). This visualization shows different countries’ merchandise trade with Singapore. The data are available under the sub-section of Merchandise Trade by Region.

However, this post was not well organized. There are several problems with this data visualization. In the following passage, I will explain the aspects where the post could improve and show how I can visualize this data.

2. Critique and suggestion

We were exposing that the correct type of presentation is essential in clarifying the information we need to convey. A good idea should guide the reader to the right conclusion as intended by the author. In addition, visual impairment is an essential role for the speaker and four to a joyful, positive experience concerning vision. It can be in the proper form and location, as well as reducing/eliminating dangerous “junk”.

Although the original animation post is easy to show circles when users hover mouse to them, it becomes hard to read when we turn this post into a still image.

3 Alternative Graphical Representation

Following pic shows the alternative graphical representation proposed for the makeover. Besides improving the original post, I will also take a new graph into the post, showing the time series of different partners with their merchandise trade. After joining them to the dashboard, I believe the new post will make good use of the original data.

4 Data preparation

After downloading the data set(in .xlsx format) from the official site. I opened it with Microsoft excel software. This file has 3 sheet pages, Content Page, Import Page, Export Page. Take a look at Import Data and Export Data. There are some irrelevant columns(columns 1~5 & columns after 127). So after selected them and deleted those columns, I saved it as a new file.

This time, instead of using Excel to manipulate cleanning process, I will use Tableau Prep to clean and extract data.

The whole Prep process would look like the following picture.

First, open Tableau Prep and import the new file which I have processed in Excel. Drag T1 and T2 from the sidebar and put them in the main window. If you have to look at the original file, you would know many columns we don’t need. Thus, I need to create a few clean steps to remove them. And this process will speed up following process steps as well. Select all the columns except the year of 2020 and right click-remove them. I only want data which between 01-01-2020 and 12-01-2020. In the column, which contains the country value, click the side icon and choose “Filter”-“Selected Values.” I choose 10 countries, the same countries as the original post.

Then, I use Pivot function to make the date value into a single column. Select all the “2020” values and drag to the middle window.

Check the Pivot result, change the columns to appropriate names, and type. Do the same thing to another table T2(copy clean step and pivot, paste, and link to T2).

Be noticed: T1-Trade Import/T2-Trade Export

Now your data should look like the following picture. Great! It’s time to join T1 and T2 together. Drag one of the pivot values and put it to the right side of another pivot value. In the settings, I match Country and Date. Noticed there are duplicate columns in the table, I removed those columns as well. Be cautious, if you take a close look at countries, you will notice that the European Union is in (Million Dollars). I create a new clean step and add new calculate fields to correct Import & Export values. Then, I delete the original wrong data.

IF CONTAINS([Country],'Million')
THEN [Import]*1000
ELSE [Import]
END

Pleases correct “Country” column after changing value by Split function. Finally, add Output at the end of flow. Change file setting and check data before clicking “Run Flow”. And you will get the cleaned data!

5 visualize data by Tableau

5.1 Build Circle Plot

The first target is to build a circle plot. This graph will present different countries’ trade performance with Singapore, like how much they trade and which kind of trade has a higher percentage in total merchandise trade. Create 2 calculate fields to get the total merchandise trade performance and whether Import is greater than Export.

Higher Value

IF SUM([Export])>SUM([Import])
THEN 'Export More'
ELSEIF SUM([Export])<SUM([Import])
THEN 'Import More'
ELSE 'Equal'
END

SumIE

SUM([Export])+SUM([Import])

After getting those two values, I can drag and drop Import and Export to x, y-axis separately. And put Country in Detail to differentiate each country.

Next, I place the SumIE, which I calculated in Size, and place Higher Value in Color. In order to let readers differentiate different types conveniently, I will add a diagonal line to separate the table to be two parts. The countries in the circles which belong to the above part are more likely to export their goods to Singapore. This also means Singapore will import much more goods from them than export goods to them. The countries in the circles that belong to the beneath part buy Singapore goods more than export goods to Singapore. To create this diagonal line, I put Import to columns. Then I remove the Size and color from Import Marks.

After making the Size smaller and change the color, I Dual Axis Import and make the 2 tables become 1. Finally, we could add a Trend Line to those transparent plots. You also could remove Tooltip from Trend Line to make it much more beautiful.

It suddenly hit me that I could get more information from this graph if I use the Filters function. So I put Time into Filters and make it visible. You also need to change the Time in the Filter into Month-Discrete. After you do this, you can change the filter type to Single Value (Slider).

Using Animations from Format will make the change quite frequent.

Last but not least, make some changes in:

To make the post clearer.

Well done~ Now, your chart should look like the following picture.

5.2 Build Line Plot

In this part, we will create a line graph to observe the volatility of Import and Export values of different countries in 2020. Please create a new sheet and bring Import and Export value into rows, make them into a dual axis. In the columns, put Time-month. Now, this post shows all countries’ Import and Export in 2020. Take Time into Filters and make it visible. Then I can display different counties separately by changing the filter. Remember to change your title. Your post should look like the following graph.

5.3 Build Box Plot

In order to have a clearer understanding of the overview, I decided to create a box plot to show the result. I use the in-build function to do this. Create a new sheet and choose box plot from “Show me”.

5.4 Build Dash Board

To put the above 3 posts together, I build a dashboard to gather them together. You can see this from the following picture.

6 Final Dashboard

Link to Tableau Public

7 Insights