Original


Source: World Economy - 2017


Objective

The latest estimate from the World Bank puts global GDP at roughly $80 trillion in nominal terms for 2017.This chart from HowMuch.net uses above information to show all major economies in a visualization.This visualization highlights exactly how big the U.S. economy is compared to the every other country in the world. The graph above is a pie chart; each slice represents the total economic output, or GDP, of a country in 2017. The colour corresponds to its geographic location, and included the percentage of the world’s economy each country for references. This lets us immediately see which countries and continents dominate the world economy, and which ones lag way behind.Main audience considered here are economic experts or individuals who track the GDP and word economy seriously.This helps the finance and marketing people to see the impacts of decisions made by world leaders.

The visualisation chosen had the following three main issues:

  • Looking at the visualization, you can only easily pick out countries with booming economies which include the United States, China, Japan, Germany, France, etc. If your country doesn’t have a major economy, it’s difficult to find it.
  • Another thing wrong with the chart is positioning. It’s represented in a circle which can be associated with the Earth’s spherical shape. However, the countries are placed just anywhere which doesn’t mean anything.
  • Countries of the same continent are positioned close to each other but the sizes are not relative.The shapes representing the countries are unusual. Although the size of a country’s economy determines its size, nothing relates the shape’s size to the size of the full circle.

Reference

Code

library(readxl)
library(ggplot2)
library(tidyr)
library(dplyr)
library(scales)
library(RColorBrewer)

GDP <- read_excel("C:/Users/bijo/Desktop/RMIT - Study/Data Visualization/Assignment2/GDP.xlsx")
df <- as.data.frame(GDP)

colnames(df) [1] <- "rank"
colnames(df) [2] <- "country"
colnames(df) [3] <- "dollar"
colnames(df) [4]  <- "region"

vec <- c(24.4,15.4,7.45,6.13,4.63,3.3,3.27,3.25,2.59,2.44,
         2.08,1.99,1.93,1.67,1.65,1.45,1.28,1.07,1.04,0.86,
         0.85,0.8,0.68,0.66,0.62,0.57,0.55,0.52,0.5,0.48,
         0.47,0.44,0.44,0.43,0.42,0.41,0.41,0.4,0.39,0.39,
         0.38,0.35,0.32,0.31,0.3)
df$percentage <- vec


p <- ggplot(data=df,aes(country , percentage)) + 
  theme_classic()+
  geom_bar(stat='identity',aes(fill = region),position = "dodge")+

  
  facet_grid(rows = vars(region), scales = "free_y", space = "free_y", switch = "y")+
 geom_text(aes(label =paste0('(',percentage,'%',')')),size = 3,hjust=-1.44,vjust = 0.3)+

  scale_y_continuous(expand = c(0.2,0))+
 
  coord_flip() +
  theme(strip.placement = "outside",
        plot.title = element_text(color="black",hjust=0.3, size = 15, face = "bold"),
        axis.title.x = element_text(face = "bold"),
        axis.title.y = element_text(face = "bold"),
        strip.background  = element_blank(),
        panel.border = element_blank(), 
        strip.text.y = element_text(angle = 180))+

  geom_text( aes(label = dollar), position = position_dodge(width= 1), 
            size = 3,  vjust = 0.3,hjust=-0.11, color= 'black') +
  
  guides(fill = FALSE) + labs(x="Countries by Region",y="% of Global GDP",title = "World Economy - 2017",caption = "Data Source: World Economy-2017 from howmuch.net")

Data Reference * Visualize the Entire Global Economy Gross Domestic Product(GDP) by Country 2017 in One Chart.Retrieved September 21, 2017, from GDP numbers from world bank. Available at:Data table(https://howmuch.net/sources/the-world-economy-2017)

Reconstruction

The following plot fixes the main issues in the original.