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

Original


PixlParade (2020)


Objective

Explain the objective of the original data visualisation and the targetted audience.

The data visualisation was originally published on the website of pixlparade.com, an online publisher with a mission to ‘celebrate infographics, design and beautiful data’ (PixlParade 2020). The stated goal of the visualisation is to uncover the spending priorites of 46 nations by comparing their military vs. healthcare expenditure.

The visualisation seeks to challenge commonly held assumptions with the source article declaring that ‘the average American’s perception of violence is way off the mark’. We can gain some clues into the potential targeted audience by looking at the visualisation itself. The use of a facetted, two-segment coxcomb diagram provides an easy enough high-level interpretability to the uninitiated, and there is a clear focus on drawing the user in through the use of colour, imaging and slick fonts. This points toward a very visual target audience who are drawn to interpretable imagery whilst also being interested in the data behind it.

A further indication of the target audience can be found in the PixlParade ‘About Us’ section which flags a ‘by the people, for the people’ approach to their content by identifying themselves as a “small but mighty bunch of geeks, gamers, designers, and writers”, casting themselves as a band of tech oriented visualists producing for like-minded individuals who are interested in both the data AND the design. The choice of a politically contentious topic, military vs. health care spending also indicates a target audience with an interest in public policy along with an open mind as the visual seeks to challenge established pre-conceptions.

The visualisation chosen had the following three main issues:

  • Failure to answer a practical question: The visualisation attempts to answer the question ‘How do countries prioritise healthcare vs. military spending?’. However this objective is not achieved due to the use of a GDP per capita figure for health and military expenditure which makes comparison of spending priorities between countries exceeding difficult, with countries total GDP and population both serving to dilute the comparitive relevance of each facet. An example is China, which despite spending a proportionately average amount on healthcare compared to military is barely visible due to its massive population, thereby obsuring the ability to make reasonable inferences from the data.
  • Perceptual or colour issues: The use of a polar coordinate system (in the form of a two-segment Coxcomb diagram) to compare the expenditures of individual countries reduces the accuracy of comparison greatly due to humans innately poor ability at comparing area with precision.
  • Deceptive Methods: The ordering of facets by Healthcare expenditure per capita serves to deceive the audience and undermine the stated objective of comparing spending priorities between nations. This ordering overemphasizes countries with a high GDP per capita and ignores the proportionate spend on military as a % of health care expenditure, which is what the visual seeks to understand.

Reference

Code

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

library(ggplot2)
library(dplyr)
library(readr)
library(showtext)

# set the relevant working directory
setwd("C:\\Users\\wmayne\\Uni - Data Visualisation\\Assignment 2")

# read in the dataset using the read_csv function of the readr package
data <- read_csv('healthcare_vs_military.csv')

# add google font
font_add_google("Raleway")

# use the showtext_auto() function to display font in the graph
showtext_auto()

# update the data type of the health_spend and military_spend variables from currency to numeric
data$health_spend <- data$health_spend %>% parse_number()
data$military_spend <- data$military_spend %>% parse_number()

# add a new 'ratio' variable using the mutate function to display %
data <- data %>% mutate(ratio=military_spend/health_spend*100)

# below will reorder the first variable by ratio
data$country <- data$country %>% 
  factor(levels=data$country[order(data$ratio)]) 

# create the plot and aesthetic
p1 <- data %>% ggplot(aes(y=country, x=ratio))

# add the layers to the plot
p1 <- p1 + 
  geom_point(colour="tomato3") +
  geom_segment(aes(x=0, y=country, xend=ratio,yend=country),linetype=3) +
  labs(title="What Countries Spend on Health Care vs. Military", 
       subtitle="Military spending as a % of Health Care spending",
       x="Percent",
       y="Country", caption="Source: Health resources - Health spending - OECD Data (2019) & SIPRI Military Expenditure Database (2020)") +
  geom_text(aes(label=paste(round(ratio,1),"%",sep="")), hjust=-.5,size=5) +
  scale_x_continuous(limits=c(0,125)) +
  theme_void() +
  theme(axis.text=element_text(size=13),
        axis.title=element_text(size=20, face='bold'), 
        plot.caption=element_text(size=13,face='italic'), 
        plot.title=element_text(size=30, vjust=2, face='bold'),
        plot.subtitle=element_text(size=25, vjust=3, face='plain'), 
        text=element_text(family="Raleway"),
        panel.grid.minor.x= element_line(colour="grey95"),
        panel.grid.major.x=element_line(colour="grey95"), 
        axis.text.y=element_text(hjust=1))

Data Reference

Reconstruction

The following plot fixes the main issues in the original.