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

Original


Source: HowMuch.net, a financial literacy website (16 May, 2018)
Source: HowMuch.net, a financial literacy website (16 May, 2018)).


Objective

  • The main objective of the data visualization is to demonstrate and compare the military expenditure of different countries across the world. The data visualization is protrayed in the form of a pie chart and the countries are allocated as pieces in the pie chart, which is resembling a globe. The size of the pieces are representing the military expenditure of that country. The expenditure of each country has also been calculated as a percentage of GDP and percentage of global military spending.

  • Since this data visualization has been published on “Howmuch.net”, the target audience of the plot includes a wide range individuals such as potential clients, ecnomists, politicians and government officials, financers, investors, news readers and researchers.

The visualization chosen had the following three main issues:

  • The visualization is created in the form of a pie chart. And the size of each piece of country are supposed to reflect the financial expenditure. But the size of each piece focus more on the structure on the globe rather than showing the authentic size as per the expenditure amount. Fro example, If we compare Japan with expenditure amount $45 Billion and Russia with expenditure amount $66.3 Billion. The size is not reflecting this scenario appropriately. The way the peices are plotted do not indicate which country is smaller. This may cause readers to be deceived at first glace as to which of the 2 countries is placed higher.

  • Annotation is very important in a plot. In the pie chart, we can see that the author has used 2 different colors (black and white) for mentioning the countries, their expenditure amount and percentage of world share. While most of the annotation has been done in white, there are 2 countries (South Korea and Japan) that are annotated with black. And since these 2 countries are only annotated with black, they are more prominent are thus can cause readers to be deceived that the expenditure appears to be the lowest. But this is not the case. The author may have had the intention to annotate these 2 countries in black either because the the flags of Japan and South Korea are white and thus would not be as visible or that the overall background is white and in the case of South Korea, the amount and percentage were going outside to the white background. But the fact is that it is deceiving the audience as a result.

  • The visualization uses different shades of red to show different percentages of national GDP. Also on each piece of country, the flag is of that particular country is added. This combination of country flag, which includes many colors for each country, and the different shades of red make it slightly hard for the read to differentiate which country comes under which shade. As a result, the reader will have to take some extra time to understand and interpret the information.

Reference

Code

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

library(readr)
library(ggplot2)
library(magrittr)
library(dplyr)
library(forcats)
library(tidyverse)

#Importing dataset into R 

War <- read.csv("C:/Users/hp/Documents/War.csv")

#Converting 1 of the variables "Spending" from character to numeric

War$Spending <- as.numeric(War$Spending)

#Arranging the spending amount in descending order
War$Country <- War$Country %>% 
  factor(levels = War$Country[order(-War$Spending)]) 

#Creating bar chart with labels showing GDP %

p1 <- ggplot(War, aes(x=Country, y=Spending))
p1 + geom_bar(stat="identity", fill = "indianred3") + theme(axis.text.x=element_text(angle=45,hjust=1)) +
  labs(title = "Total Spending per country and % of GDP Spending",
       x = "Country",
       y = "Spending Amount (in Billion)") +
  geom_text(aes(label=round(`X..of.GDP`,2)), vjust = -0.1,size = 3)

#Creating bar chart with labels showing World Share %

p2 <- ggplot(War, aes(x=Country, y=Spending))
p2 + geom_bar(stat="identity", fill = "indianred3") + theme(axis.text.x=element_text(angle=45,hjust=1)) +
  labs(title = "Total Spending per country and % of Worldwide Spending",
       x = "Country",
       y = "Spending Amount (in Billion)") +
  geom_text(aes(label=round(`X..of.World.share`,2)), vjust = -0.1,size = 3)

Data Reference

*Raul. (2018, May 16) - HowMuch.net, a financial literacy website. “This Graph Shows That No Other Country Competes with the U.S. Military”. Accessed September 20, 2021 from https://howmuch.net/articles/worlds-spending-war

*Original Data source - Nan Tian, Aude Fleurant, Alexandra Kuimova, Pieter D. Wezeman and Siemon T. Wezeman (May 2018). “TRENDS IN WORLD MILITARY EXPENDITURE, 2017”. Accessed September 20, 2021 from https://www.sipri.org/sites/default/files/2018-04/sipri_fs_1805_milex_2017.pdf

Reconstruction

The following plot fixes the main issues in the original.