DataViz Makeover 1
Figure 1 below shows the original visualisation for the top six trading countries with Singapore in 2019 to 2020 using the data provided by Department of Statistics, Singapore (DOS).
Before looking at the visualisation aesthetics and clarity, it is important to have a clear understanding of the context and objective of the visualisation.
What does merchandise trade constitutes?
Clarity is the visualisation “Fit”: How the visualisation matches and tell reality.
Aesthetics is the visualisation “Form”: How the visualisation looks.
From Ben’s (Jones 2012) Data Visualisation chart of Clarity vs. Aesthetics shown in Figure 2, the current visualisation would fall under Quadrant III and the proposed visualisation would aim to be in Quadrant I.
To improve the visualisation, the time series could be changed to yearly instead of monthly. Merchandise trade of each country fluctuates heavily and certain goods are seasonal. Utilising a monthly interval for the x-axis clutters the graph with the line plot peak and trough that might not provide useful information. Aggregating the data into years might be clearer for interpretation for the change over year.
An additional plot can be added to summarize and rank the top 6 countries. This plot displayed will include background information that the top six country are selected based on the total trade in 2020. The bar plot can also be arranged in descending order to showcase the ranking of the six countries.
Figure 3 would be an alternative presentation of the visualisation.
The dataset used was retrieved from Deparment of Statistics Singapore under the sub-section of Merchandise Trade by Region/Market.
Tableau Prep Builder 2021.1 software is used for data preparation and Tableau 2021.1 is used for data visualisation.
Upload the dataset into Tableau Prep Builder.
Refer to Figure 4 to import the dataset by following the steps below.
1. Tick the box circled in red on the left. This option allows the Tableau Prep Builder to perform preliminary cleaning of the data.
2. Drag the T1 worksheet in orange into the middle box.
3. Change the name in green to Import.
4. Click the + button and create a Clean Step node in purple.
Refer to Figure 5 to exclude the rows for regions and total imports by following the steps below.
1. Select the first 7 rows (Total Merchandise Imports, America, Asia, Europe, Oceania, Africa, European Union) in red from the Variables column and click the Exclude button in orange.
Refer to Figure 6 to pivot the Months from the columns into rows.
1. Select the + button and create a Pivot node in red.
2. Drag all the months column header and drop to the Pivoted Fields section as per the orange arrow.
3. Rename the column headers to Date, Import and Country accordingly in blue box.
4. Change the data type of Date column to Date in green.
Refer to Figure 7 to aggregrate the import by year
1. Select the + button and create an Aggregate node in red.
2. Drag column Country and Date and drop them in Grouped Fields as per the orange arrow.
3. Drag column Import and drop it in Aggregated Fields as per the green arrow to aggregate the sum of import by year.
3. Group the column Date by Year following the steps in the blue boxes.
Repeat the steps from Figure 4 to Figure 7 for Export using the T2 worksheet.
Refer to Figure 8 to Join both table
1. Drag the Aggregate 3 node from T2 flow to the + button on the right of T1 flow as shown in the red arrow in Figure 8.
2. Add two Applied Join Clauses to match variables Date and Country shown in orange box.
3. Select the Join Type to full in the green box to include all countries into the final list.
4. Select the columns Country(Country-1) and Date(Date-1) and Remove Fields in the blue box. These are duplicate or repeated columns after performing the Join.
Refer to Figure 9 to create new column for total sum of export and import
1. Select the Create Calculated Field button in red.
2. Change the Field Name to Total in orange.
3. Input the equation of [Export] + [Import] in green and save the new column.
Refer to Figure 10 to Pivot the columns
1. Create a new Pivot node in the red box.
2. Drag and drop the columns Export, Import and Total into the Pivoted Fields in orange.
Refer to Figure 11 to Ouput file into csv
1. Create a new Ouput node in the red box.
2. Select the Browse button to change the directory and filename and change the Output type to Comma Separated Values (.csv) in orange.
The data prepared earlier is uploaded into Tableau for Visualisation.
The data contains all countries that trades with Singapore from 1976 to 2021. Hence, the columns Year and Country is added to the Filter section on the worksheet to align with the original visualisation parameters. Refer to step 1 and 2 together with Figure 12 to filter the 6 countries for 2019 and 2020.
The final line plot is shown in Figure 16.
The final visualisation is available on my Tableau Public page.
There is a saying: “Statistics are like bikinis. What they reveal is suggestive, but what they conceal is vital.” Visualisation should be designed to be factual and clear for interpretation.
A positive trade balance is termed when Singapore export value is greater than import value with a country. This signifies an inflow of cash to Singapore from the country. Conversely, an negative trade balance is termed when Singapore import value is greater than export value with a country. This signifies an outflow of cash from Singapore to the country.
COVID-19 was an unprecedented event in 2020 which led to countries locking down their cities or closing their borders globally and Singapore is no exception. Trade is integral to Singapore’s success and the decrease in trade activities in 2020 was a major impact on it’s growth. However, the makeover from the original visualisation showed meaningful insights for interpretation.
The total trade value with Malaysia fell 8.4% in 2020, the largest decrease among the six countries. The Import value with Malaysia was similar for 2020 whereas the Export value took a major hit and fell by 18.2% from 2019. This resulted in a negative trade balance with Malaysia in 2020.
The total trade with the United States marginally fell by 2.5%. However, there was a large change in Export (grew 19.2%) and Import (fell 18.9%) in 2020. In 2019, Singapore had a negative trade balance with the United States and it was the reversed in 2020 where there was a positive trade balance.
Trade with Taiwan performed the best among the six countries where the total trade value grew by 13.0% in 2020. Both export and import grew significantly in 2020.
Hong Kong is the fifth largest trade country with Singapore among the six country. Interestingly, export value is much larger than import value where the exports value is around 90% of the total trade value.
Mainland China and Japan total trade value had marginal change. Imports and exports are also consistent and equal in 2020.
The top six countries total trade stands at around 57% of Singapore’s total trade in 2020.
In light of COVID-19 pandemic affecting countries economy, the changes in trade might be unique in 2020. A better representation would be to use a longer time frame to show the general trend of the trade value.
Jones, Ben. 2012. “Data Visualization: Clarity or Aesthetics?” 2012. https://dataremixed.com/2012/05/data-visualization-clarity-or-aesthetics/.
For attribution, please cite this work as
Lim (2021, May 29). Yong Kai: DataViz Makeover 1. Retrieved from https://limyongkai.netlify.app/posts/2021-05-22-dataviz-makeover-1/
BibTeX citation
@misc{lim2021dataviz, author = {Lim, Yong Kai}, title = {Yong Kai: DataViz Makeover 1}, url = {https://limyongkai.netlify.app/posts/2021-05-22-dataviz-makeover-1/}, year = {2021} }