Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.

Original


Source: The World Bank (2019).


Objective

The main objective of the visualisation is to picture how big stock markets are in different countries around the world. The visualisation shows how much the stock market of each country is worth (in Trillion US Dollars) and what percentage it covers compared to markets in other countries. The visualisation takes into consideration 22 countries for the year 2018. Currently the United States stock market is the largest by value and it covers just under half of the total global equity value. The US stock market is so large that it is 5 times bigger than it closest competitor ie China.

The visualisation chosen had the following three main issues:

  • The first main issue that could be seen straightaway is the uncustomary representation of the data in the shape of a globe. Even though the countries are represented in the shape of a globe, the positioning of the countries cannot be compared to how it actually is on a real globe or a map. Although the appearance can be deceiving, it is difficult to search for a particular country or to make comparisons among countries in terms of value.

  • The use of Area for different country is irrelevant. As the original visualisation is in the form of a globe, ideally the countries size should be proportional to the actual size of the country. But here, we can see the area used by countries is based on the stock market value. For example, if we need to make a comparison between Switzerland and an other country based on equity value, we will have to look through all the countries perhaps starting from the top and check for the closest competitor. It can be more difficult if more countries or variables were present in this form of visualisation.

  • The color codes given in the original visualisation is based on which continent the country belongs to. It doesn’t pose much relevance as the countries are already grouped together based on the which continent they belong to. Also the country flag which printed behind each country block is not clearly visible because of the text present in each area block.

Reference

Code

The code shown below is used to create a barplot which fixes all the issues mentioned earlier with the original visualisation.

library(ggplot2)
library(readr)
library(readxl)
library(dplyr)
library(tidyr)
setwd("/Users/siddharthjacob/Desktop/RMIT/Semester 2/Data Visualisation/Assignment 2")
countries <- read_excel("data file.xls", sheet = "Sheet2", skip = 3)
countries$`Year_2018` <- countries$`Year_2018`/1000000000000
countries$`Year_2018` <- round(countries$`Year_2018`,2)
countries$Percent <- round(countries$Percent,2)
countries1 <- countries[order(-countries$`Year_2018`),]
countries1$Percent <- as.character(countries1$Percent)
countries1$val <- paste(countries1$Year_2018, "(", countries1$Percent, "%)")

plot<-ggplot(data = countries1, aes(x = `Year_2018` , y = reorder(`Country_Name`, `Year_2018`))) +
  geom_bar(position="dodge", color = "black", width =.8, fill = "turquoise3", stat="identity") +
  ggtitle ("All Stocks Capitalization around the World (2018)") +
  ylab("Countries") +
  xlab("Value in Trillion $ (Percentage of global stock market value)")  + 
  theme_minimal() + 
  geom_text(aes(label = val, hjust = -0.07) , size=5)

 a <- theme(axis.title = element_text(size = 20),
         plot.title = element_text(face="bold",size = 30),
         axis.text = element_text(size = 15)) 

 plot1 <- plot+a

Data Reference

Reconstruction

The plot shown below fixes the issues mentioned above from the original visualisation. The barplot is in descending order with the country having largest equity value (in this case United States) coming first. Here it is easy to make comparision among countries by equity value. The total equity value of each country is given in trillion dollars. We can easily visualise the size of each market. For example, we can see how big the United States stock market is compared to China much better than the original visualisation.