Original


Source: Howmuch.net (2018).


Objective

The objective of this graph is to highlight the inequality in the value of exports between the major export economies of the world. The target audience would be educated readers looking for evidence on the value of exports of major exporting countries. They would be more interested in seeing a quick intuitive comparison than looking at a fancy map that makes comparisons difficult.

The visualisation chosen had the following three main issues:

  • Choice of Visual: The visualization consists of a deconstructed map. Since the map is deconstructed, the viewer is unable to get a geographic comparison. Additionally the sizes of the Countries are indicative of the amount of exports which is confusing as it clashes with the actual relative size and shape differences of the countries. For example, countries like Japan, whose shape is stretched like a rectangle looks much larger than France, which is a more circular even though they fall under the same bracket. Since the objective of the visualization is to highlight the inequality, and not necessarily tell the exact numbers, a simple bar chart would work better.

  • Choice of Scale: Since it is a deconstructed graph there is a colour scale used to map the difference export brackets. The color scale makes it hard to compare countries and we need to read the numbers to understand the quantitative difference, which takes away from the point of the visualization. As there is no scale (axis), we need to read numbers causing the visualization to look extremely cluttered and not be intuitive at all. Since we are using a colour scale we also need to create brackets and the relative information is lost in the process. For example, Singapore has export value of 373 Billion USD but it looks the same size and colour as Denmark whose export value is 103 Billion, which is less than a third of Singapore’s.

  • Poor Choice of data: The data only studies the goods exported and not the services. This could lead to misleading interpretation as some countries export more services than goods. As the title of the graph claims to highlight the inequality of exports in general, we should use both goods and services data. For example, India is a large exporter of services and adding that data to the chart changes the arrangement completely. Additionally this data studies information of too many countries for a single year. It would be much more comprehensive to study the export contributions of just the major exporting nations (Export value greater than 200 Billion) and over a three year period for incremental evaluation.

Reference

Code

The following code was used to fix the issues identified in the original.

library(dplyr)
library(tidyr)
library(ggplot2)
library(forcats)
library(readxl)
library(viridis)

# Import the data
Export_file <- read_excel("C:/Users/Joshua/Downloads/API_BX.GSR.GNFS.CD_DS2_en_excel_v2_1351778.xls", skip = 2)

# Remove years 1960 to 2016
Export_data <- Export_file[,c(1,62:64)]

# Remove data sets with NA values
Export_data <- Export_data[complete.cases(Export_data),]


# Gather the years into a year column
Exports <- Export_data %>% gather("Year","Value",`2017`,`2018`,`2019`)

# Convert Year to Factor
Exports$Year <- as.factor(Exports$Year)

# Convert Export to Number
Exports$Value <- as.numeric(as.character(Exports$Value))

# Convert the value in billions of dollars
Export1 <- Exports %>% mutate(Value_m = Value/1000000000)

#Converting the number format to scientific=FALSE
Export1$Value_m <- format(Export1$Value_m, scientific = FALSE)

# Convert to Numeric
Export1$Value_m <- as.numeric(Export1$Value_m)

# Filter the countries with Value of exports greater than 200 Billion 
Export3 <- Export1 %>% filter(Value_m > 200)


# We now reorder the Countries
Export3$`Country Name` <- fct_reorder(Export3$`Country Name`,Export3$Value_m)


# Plotting the graph 
exp1 <- ggplot(Export3, aes(y=Value_m, x= `Country Name`, fill=`Country Name`))

exp1 <- exp1 + scale_color_viridis(discrete = TRUE,direction = -1) + 
  scale_fill_viridis(discrete = TRUE, direction = -1) + 
  theme(axis.title.x = element_blank()) 

exp1 <- exp1 +coord_cartesian(ylim = c(0, 2700))

background <-  "#EFF1F0"

exp1 <- exp1 + labs(title = "Export Comparison of the Top exporting Countries",
       subtitle  = "China, USA and Germany are by far the largest exporters of Goods and Services",
       caption = "Source: World Bank Data(2020) - https://data.worldbank.org/indicator/BX.GSR.GNFS.CD")

exp1 <- exp1 +  theme(plot.background = element_rect(fill = background),
                      panel.background = element_rect(fill = background),
                      legend.background = element_rect(fill = background),
                      text=element_text(family="Georgia"),
                      title = element_text(face = "bold"),
                      axis.title.x = element_blank(),
                      axis.title.y = element_blank(),
                      legend.title = element_blank()) +
theme(panel.grid.major = element_line(colour = "#D3D3D3"),
      panel.grid.minor = element_line(colour = "#D3D3D3"))

exp1 <- exp1 + geom_bar(stat = 'identity') + facet_grid(Year~.) + 
  theme(axis.text.x= element_text(angle=45, hjust = 1)) +
  theme(legend.position = "none", 
   legend.title = element_blank())

Data Reference

Reconstruction

The following plot fixes the main issues in the original.