In this post, we use the same trade data use case over a 10 year period. We will critique the visualisation and propose an interative alternative, whereby users can interact with, to address the flaws.
The original visualisation (Figure 1) is created by Department of Statistics, Singapore (DOS) as an interactive infographic to showcase Singapore’s International Trade. The data are available under the sub-section of Merchandise Trade by Region/Market.
The initial sketch of proposed design is as follow (Figure 7).
The charts in the proposed design will help to answer some of the questions:
Please view the proposed visualisation on Tableau Public here.
| No | Step | Action |
|---|---|---|
| 1 | Unzip the output folder downloaded from the SingStat website. Load the outputFile excel file into Tableau Prep Builder. Drag the ‘T1’ and ‘T2’ worksheet into main pane. | ![]() |
| 2 | Use the Data Interpreter. Rename ‘T1’ and ‘T2’ to ‘Import’ and ‘Export’ respectively and initiate the cleaning node from each data node. | ![]() |
| 3 | Under the ‘Clean 1’ node, clean ‘Variables’ using ‘Split Values’ with ‘(‘ as the separator. Rename column as ‘Country’. Repeat for ‘Clean 2’. | ![]() |
| 4 | Under ‘Clean 1’ node, filter the rows under ‘Country’ to remove non-Country and total observations. Repeat for ‘Clean 2’. | ![]() |
| 5 | Add Pivot nodes after ‘Clean 1’ and ‘Clean 2’. Under ‘Pivot 1’, select all months under ‘Fields’ to the ‘Pivoted Fields’ panel. Repeat for ‘Pivot 2’. | ![]() |
| 6 | Under ‘Pivot 1’, rename ‘Pivot1 Names’ to ‘Month’ and change data type to ‘Date’. Rename ‘Pivot1 Values’ to ‘Import (Thousand Dollars)’. Remove ‘Variables’. Repeat for ‘Pivot 2’ but rename ‘Pivot1 Values’ to ‘Export (Thousand Dollars)’. | ![]() |
| 7 | Do a full join between ‘Pivot 1’ and ‘Pivot 2’ with ‘Country’ and ‘Month’ as the join clauses. | ![]() |
| 8 | Create a ‘Clean’ node after ‘Join 1’ to merge duplicated country and month variables. | ![]() |
| 9 | Create a ‘Pivot’ node after ‘Clean 3’ and change ‘Export (Thousand Dollars)’ and ‘Import (Thousand Dollars)’ from columns to rows. | ![]() |
| 10 | Split ‘Pivot1 Names’ and rename the field of ‘Split 1’ to ‘Trade Type’. Multiply ‘(Thousand Dollars)’ by 1000 and rename it ‘Trade Value’. Remove the unnecessary fields ‘(Thousand Dollars)’ and ‘Pivot1 Names’. | ![]() |
| 11 | Create a ‘Output’ node after ‘Pivot 3’ node and save output as ‘Monthly Singapore Merchandise Trade’. | ![]() |
| 12 | Set up a connection on Tableau Desktop to the ‘Monthly Singapore Merchandise Trade’ hyper’s extract. | ![]() |
| 13 | For the bubble chart, create a new worksheet and name it ‘Bubble Chart’. Click on ‘Analysis’ on the ribbon, and select ‘Create Calculated Field’ to create 2 calculated fields – ‘Export’ and ‘Import’ using the ‘IF X THEN X END’ formulas shown. | ![]() |
| 14 | Drag ‘Export’ to Columns and ‘Import’ to Rows and drag ‘Country’ to ‘Detail’ under Marks. Tableau will automatically present a scatter plot. | ![]() |
| 15 | Drag ‘Month’ to ‘Filters’ and select ‘Range of Dates’. Then input ‘1 Jan 2011’ as the start date and ‘1 Dec 2020’ as the end date. Next, drag ‘Country’ to ‘Filters’ and select ‘Top’ tab. We will select the top 10 partners by sum of the ‘Trade Value’. | ![]() |
| 16 | Drag ‘Trade Value’ to ‘Size’ under Marks and ‘Country’ to ‘Color’. Select on ‘Color’ under marks to change the default colors. Under ‘Select Color Palette’, select Tableau 20. Assign the partners as planned, East Asia markets with pink and purple hues, South East Asia markets in greenish hues, and Germany in Grey and US in brown. | ![]() |
| 17 | Change the type of charts under ‘Marks’ to ‘Circle’. Then select ‘Color’ to change the opacity of the bubbles to 65% and add a white border under ‘Effects’. | ![]() |
| 18 | To create a diagonal reference line in the bubble chart, create a new ‘Calculated Field’ called ‘Reference Line’ with ‘Export’ variable. Then drag the newly created ‘Reference Line’ to secondary Y-Axis position on the bubble chart as shown. | ![]() |
| 19 | Then click on the ‘SUM(Reference Line)’ section under ‘Marks’. Change the chart type from ‘Circle’ to ‘Line’ and only keep ‘Country’ under ‘Detail’. Next, change the ‘Size’ of the line to the thinnest and change the ‘Opacity’ to 0%. To bring out a nice reference line, right click on the reference line on the chart and select ‘Show Trend Lines’. | ![]() |
| 20 | Right click on the secondary Y-Axis to select ‘Synchronize Axis’ and uncheck ‘Show Header’. Right click on the trend line to format it to a light shade of grey and thinner profile. Discard ‘Measure Names’ under the ‘SUM(Import)’ section under ‘Marks’ to allow the colours of the markets to revert to initial selection. | ![]() |
| 21 | Drag ‘Month’ into ‘Pages’. Right click on the chart to add the year to the chart by selecting ‘Area’ under ‘Annotate’. Insert ‘ |
![]() |
| 22 | To shade the background diagonally to create ‘Net Importer’ and ‘Net Exporter’ segments, we create a simple square image with 2 triangles using powerpoint. We then load this image into Tableau using ‘Map’ > ‘Background Images’. Select the image created and position it on the chart carefully using the coordinates. Tweak the washout to avoid overwhelming the chart with colours. | ![]() |
| 23 | Add area annotations to the chart to mark the ‘Net Importer’ and ‘Net Exporter’ segments. Format each with the colour determined – orange for import and blue for export and remove the shading of the text. | ![]() |
| 24 | Drag ‘Country’ and ‘Trade Value’ to ‘Label’ under ‘Marks’. Format the labels – reduce font size to 8 and select ‘Match Mark Color’. | ![]() |
| 25 | Format all values on chart. Right click on the X-axis and select ‘Format’. A formatting pane will appear on the left. Under ‘Font’, change the font colour for X-Axis to blue. Under ‘Scale’, change the ‘Ticks’ to a darker grey and select ‘Currency (Custom)’ under ‘Numbers’ to format values to 1 decimal place in Billions. Repeat for Y-Axis (font colour in orange). Select ‘Label’ under ‘Marks’ to update the ‘Numbers’ format under ‘Pane’. | ![]() |
| 26 | Right click on the X-Axis and select ‘Edit Axis’. Under ‘General’ tab, uncheck ‘Include Zero’ and change ‘Title’ to ‘Export Value’. Switch to ‘Tick Marks’ tab and fix the ‘Major Tick Marks’ to $10B interval and remove minor tick marks. Repeat for Y-Axis with ‘Import Value’. | ![]() |
| 27 | Add the main insight title and functional title with the unit of measurement and granularity of data as shown. Allow the labels in the chart to be viewed by selecting ‘Always Show’ under ‘Mark Label’ for labels that are hidden. Shift the labels around the chart to ensure that can always be seen as the pages change. Under the pages’ control, check the ‘Show history’ box and show ‘All’ of ‘Trails’. | ![]() |
| 28 | Next, we prepare for charts that will provide more details of the partners under the tooltips when users explore the bubble charts. We create a new worksheet called ‘Tooltip Charts’. We want to feature 3 charts: i) annual trade value, ii) year-on-year change of annual trade value, iii) annual balance of trade. For chart iii), we create a new calculated field ‘Balance of Trade’ by taking sum of export minus sum of import as shown. Then, we add ‘Month’ to ‘Filters’ and select range like in Step 15. To set up the 3 charts, we drag ‘Month’ to ‘Columns’, ‘Trade Value’ and ‘Balance of Trade’ to ‘Rows’. Drag ‘Trade Value’ to ‘Rows’ again and select the drop down to do a quick table calculation – ‘Year Over Year Growth’. | ![]() |
| 29 | Change the chart type under ‘Marks’ to ‘Bar’ and ‘Line’ respectively as shown. For chart i) on total trade value, drag ‘Trade Type’ to ‘Color’. Export will be in blue and import will be in orange, similar for chart ii). For chart iii), drag ‘Balance of Trade’ to ‘Color’ and select ‘Custom Diverging’ with the center at 0, the negative end will be the orange selected for import and positive end will be the blue selected for export. | ![]() |
| 30 | Add values to the ‘Label’ section under each chart by dragging ‘Trade Value’ to ‘Label’ for chart i), ‘Trade Value YoY %’ to chart ii) and ‘Balance of Trade’ to chart iii). Next, format the labels to show them all at font size 8, allowing labels to overlap. Currency will be expressed in 1 decimal place in Billions and percentage in 1 decimal place using the same format procedure shown in step 25. | ![]() |
| 31 | Add the total trade value label by adding a reference line to chart i)’s Y-Axis. Select ‘Sum’ and indicate ‘Value’ under ‘Label’. Under ‘Formatting’, select ‘None’ for ‘Line’. | ![]() |
| 32 | After we are done with the tooltip charts, we will resize the chart by dragging the edges of the borders. We can continue to tweak after seeing how it fits under the bubble chart’s tooltip. | ![]() |
| 33 | As we want to indicate if the partner is a net exporter or net importer at the snapshot, we created new calculated fields ‘Net Exporter’ and ‘Net Importer’. Next, we also want to feature the rank of the partner by ‘Trade Value’, ‘Net Exporter’ and ‘Net Importer’, we created calculated fields to rank the partners as shown. | ![]() |
| 34 | Next, we will set up the tooltip content. Drag ‘Net Exporter’, ‘Net Importer’, ‘Rank by Trade Value’, ‘Rank by Net Exporter’ and ‘Rank by Net Importer’ all to ‘Tooltip’ under the ‘SUM(Import)’ section under ‘Marks’. Click on the ‘Tooltip’ icon to launch the editor and input the text interspersed with inserted variables as shown. Insert the ‘Tooltip Charts’ worksheet at the end of the text. Format the text by colouring all import related to be orange and export related to be blue. | ![]() |
| 35 | To start on the second chart on the dashboard to display rank, we create a new worksheet ‘Rank’. We then drag ‘Country’ and ‘Month’ to ‘Filters’ (similar to step 15) and ‘Month’ to ‘Pages’ to limit the country and years. We create the chart by dragging ‘Month’ to ‘Columns’ and ‘Rank by Trade Value’, ‘Rank by Net Importer’ and ‘Rank by Net Exporter’ to ‘Rows’. To have the ranking computed at country level, we drag ‘Country’ to ‘Color’ under ‘All’ section under ‘Marks’. Then, we can compute the rank using ‘Country’ ausing the dropdown option. | ![]() |
| 36 | To sync the animation with the bubble chart, we switch the chart type under ‘Marks’ to ‘Circle’ and reduce the size of the circle. Next, we will check the ‘Show history’ box for the control for ‘Pages’ on the right pane. To show the trails of the ranks, we will show history for ‘All’ and show ‘Trails’ marks only. | ![]() |
| 37 | To add tooltips to the rank charts, we drag the relevant variables to the ‘Tooltip’ icon under ‘Marks’ and insert them corresponding to the content we want to feature as shown. | ![]() |
| 38 | We will also need to refine the Y-Axes so that we show the ranking from top to bottom. To do that, we will edit all 3 axes so that the scales are reversed. To prevent the 0 from showing, we will format the scales using ‘Custom’ and adding a semi-colon and a space (‘;’) behind the custom number format. For the net exporter and net importer scale, we will also colour the fonts with blue and orange respectively to sync with the bubble chart. | ![]() |
| 39 | A final touch to the rank charts is to add a main title and a functional title as shown. | ![]() |
| 40 | We are finally ready to pull the 2 charts together to form a dashboard. Create a new dashboard and drag the ‘Bubble Chart’ and ‘Rank’ sheets to the panes as shown. Next, format the legend so that they are presented on the left side of the bubble chart. In order to prompt users to play the animation, we change the Pages header to ‘Play Animation’. Lastly, we add a main dashboard header and a footnote to point readers to the data source. | ![]() |
| 41 | Once completed, we hide the worksheets and proceed to publish the dashboard on Tableau Public. | ![]() |