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

Original


Source: The 27 worst chart of all time. Business Insider Australia.


Objective

This visualisation aims to tell the Americans that food imports have doubled in a decade, and it is also beneficial for the rest of the world to learn about the largest exporter of food to the US. Hence, the target audience includes not only Americans, but also the rest of the world. In this visualisation, percentage of how much each food are imported, and from which countries are they imported, are both included. Hence, Americans are able to figure out the origin of the food that they consume, whereas the rest of the world would be able to tell which country has been exporting most food to the US. With imports and exports of food, it also creates an economic opportunities to both the US and exporting countries, while allowing for cheaper, more variety, and better quality of food for the Americans.

The visualisation chosen had the following three main issues:

  • Deception in size - size and percentage are not scaled correctly
    e.g. The larger side of the lamb that the line points towards, depicts an approximate 80% of lamb import. However, the percentage shows that only 52% of lamb were imported.

  • Non-logical seqeunce of visualisation
    e.g. From the visualisation, we could see that highest percentage of food imported into USA is seafood (88%), followed by honey, lamb, fruits & nuts, and fresh vegetables/melon. However, percentages of largest food exporter for fruits, vegetables and seafood were shown, instead of the top 3 highest food imports. Hence, it makes more sense to (at least) include countries which exports most of seafood, honey, and lamb since they constitute largest percentage of food imports into the US.

  • Increased difficulty to compare which country exports most food to US based on percentage
    e.g. Without proper visualistion, it is hard for the audience to compare how much each countries are exporting food to US by relying solely on percentages. This is due to the fact that the audience will have to compare each of the percentages one-by-one, which takes up a lot of time and effort.

  • Non-informative/Inappropriate information
    e.g. 1) Unnecessary pictures of strawberry and lobster which does not provide any meaning to the visualisation was included.
    2) There was also an inappropriate use of a picture of onion to represent fresh vegetables and melon.
    3) Flags of countries are non-informative



Reference

Hickey. W., 2013. The 27 Worst Chart of all time. Business Insider Australia [Online]. Retrieved May 10, 2020, from https://www.businessinsider.com.au/the-27-worst-charts-of-all-time-2013-6?r=US&IR=T#theres-a-lot-going-on-with-this-bloomberg-chart-that-doesnt-seem-like-an-evenly-cut-lamb-chop-and-while-im-not-a-biologist-i-have-a-strong-feeling-an-onion-is-not-a-melon-4.

Code

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

library(ggplot2)
library(readxl)
library(tidyr)
library(dplyr)
library(RColorBrewer)
library(ggpubr)
library(knitr)
library(gridExtra)

# Input calculated data 
fruit <- data.frame(Type = rep('Fruit', 3), 
                    Country = c('Mexico', 'Chile', 'Others'), 
                    Percentage = c(26, 13, 61), 
                    stringsAsFactors = FALSE)

seafood <- data.frame(Type = rep('Seafood', 3), 
                     Country = c('Others', 'Canada', 'China'), 
                     Percentage = c(69, 16, 15),
                     stringsAsFactors = FALSE)

meat <- data.frame(Type = rep('Meat', 3), 
                   Country = c('Canada', 'Australia', 'Others'), 
                   Percentage = c(37, 26, 37), 
                   stringsAsFactors = FALSE)

sugar <- data.frame(Type = rep('Sugar', 3), 
                    Country = c('Mexico', 'Others', 'Brazil'), 
                    Percentage = c(44, 42, 14), 
                    stringsAsFactors = FALSE )

all4 <- bind_rows(fruit, seafood, meat, sugar)
all4$Type <- factor(all4$Type, levels = c('Seafood', 'Sugar', 'Meat', 'Fruit'), 
                       labels =  c('Seafood', 'Sugar (Honey)', 'Meat', 'Fruit'), ordered = TRUE)

  
# Calculate percentage of locally produced food according to percentages given in the original visualisation 
original <- data.frame(Food_type = c('Fruit/\n Nuts','Vegetables/\nMelons', 'Honey', 'Lamb', 'Seafood'), 
                  Imported = c(51, 20, 61, 52, 88), 
                  stringsAsFactors = FALSE)
original$Local <- 100 - original$Imported



# Convert original df from wide format into a long format 
original <- original %>% gather("Origin", "Percentage", 2:3)



# Overview plot
p1 <- ggplot(original, aes(x = Food_type, y = Percentage, fill = Origin)) +
  geom_bar(stat = 'identity', position = "dodge", color = 'grey30') + 
  scale_fill_manual(values = c('#c71616','#496ddb')) +
  scale_y_continuous(limits = c(0,100)) + 
  scale_x_discrete(limits = c('Seafood', 'Honey', 'Lamb', 'Fruit/\n Nuts', 'Vegetables/\nMelons'), 
                   name = NULL) +      
  annotate(geom = 'text', x = 'Honey', y = 96, label = 'More than 50% of Seafood, Honey, Lamb, \nFruit and Nuts are imported', 
           size = 2.5, color = 'grey30',hjust = 0.25, vjust =1) +
  theme_light() +
  theme(
    text = element_text(family = 'Georgia'),
    plot.title = element_text(size = 11.5), 
    plot.subtitle = element_text(size = 8, color = 'grey40', face = 'italic'), 
    panel.background = element_rect(fill = '#F0F8FF'), 
    panel.grid.major.x = element_line(colour = '#dffdff'),
    panel.grid.major.y = element_line(colour = '#dffdff'), 
    legend.title = element_blank(), 
    legend.position = 'bottom',
    ) +
  labs(title = "Food Imports have doubled from 2001-11" ,
       subtitle = "Percentage of Food Imported vs Local Produce in 2011") 

p1 <- p1 + theme(aspect.ratio = 0.8)
p1

# Plot a detailed plot (by faceting) of each food type which has ≥ 50% imported than local produce 

# Arrange the sequence of the data so that the biggest importer is on the left 
all4 <- all4 %>% 
  ungroup() %>% 
  arrange(Type, Percentage) %>% 
  mutate(.r = desc(row_number()))

all4$.r[8] <- -9
all4$.r[9] <- -8


# Fill to add to the bars
fill <- data.frame(Country = c('Canada', 'China', 'Australia', 'Mexico', 'Chile', 'Brazil', 'Others'), 
                   Fill = c('#00A9E2', '#eb5e28', '#f25f5c', '#2e933c','#fdb833', '#2ec4b6' ,'#c5c6c6'),
                   stringsAsFactors = FALSE)
all4 <- left_join(all4, fill, key = 'Country')
fill <- all4$Fill 


# Colour to add to the outline of the bar
color <- data.frame(Country = c('Canada', 'China', 'Australia', 'Mexico', 'Chile', 'Brazil', 'Others'), 
                    Color = c('#22577a', '#bc3908', '#370617', '#264653', '#f6aa1c', '#538d22', 'grey40'), 
                    stringsAsFactors = FALSE)
all4 <- left_join(all4, color, key = 'Country')
color <- all4$Color



# Facet Plots
p2 <- ggplot(all4, aes(.r, y = Percentage)) + 
  geom_bar(stat = 'identity', position = "dodge", width = 0.85, fill = fill, colour = color) +
  geom_text(aes(label = paste0(Percentage, '%'), vjust = 1.5), size = 2) +
  facet_wrap(. ~Type, scales = 'free') +
  scale_y_continuous(limits = c(0,100), name = NULL) + 
  scale_x_continuous(breaks = all4$.r, labels = all4$Country, name = NULL) +
  theme_light() +
  theme(
    text = element_text(family = 'Georgia'),
    plot.title = element_text(size = 10,  color = 'black', face = 'italic'), 
    plot.subtitle = element_text(size = 8, color = 'grey30', face = 'italic'),
    plot.caption = element_text(size = 8, color = 'grey40', face = 'italic'),
    panel.background = element_rect(fill = '#FFFAFA'), 
    panel.grid = element_line(colour = '#dffdff'), 
    strip.background = element_rect(fill = '#7CCDF4', colour = '#cccccc'),
    strip.text = element_text(colour = 'black')
    ) + 
  
  labs(title = "Where does Americans' food comes from?",
       subtitle = 'Food with ≥ 50% Imported than Local Produce',
       caption = '\n\nSource: USDA Economic Research Service')

p2 <- p2 + theme(aspect.ratio = 0.9)
p2

Data Reference

Reconstruction

The following plot fixes the main issues in the original.