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

Original


Source: Loesche (2018).


Objective

This data visualisation is to show the number of people arriving across the Mediterranean in Europe between 2014 and 2017. The targeted audiences are those who are interested in the change of the number fleeing across the Mediterranean.

The visualisation chosen had the following three main issues:

  • Wrong choice of visualisation. This visualisation uses area to present number, which is less capable to compare, especially when the numbers are similar. In addition, this visualisation intended to demonstrate the trend throughout the years, while the form of presentation is not a good choice.
  • Data accuracy problem. The numbers in this visualisation are rounded without acknowledgement or intention.
  • Incomplete data. This visualisation meant to show all number of people fleeing, while it only included “Total sea arrivals” and “Dead & missing”, excluding land arrivals.

Reference

Code

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

library(tidyverse)
flee.sea <- read.csv("./sea_arrivals.csv")
flee.sea <- flee.sea %>% filter(year %in% 2014:2017) %>% group_by(year) %>% summarise( sea_arrivals=sum(individuals))
flee.land <- read.csv("./land_arrivals.csv")
flee.land <- flee.land %>% filter(year %in% 2014:2017) %>%  group_by(year) %>% summarise(land_arrivals=sum(individuals))
flee.dnm <- read.csv("./death_and_missing.csv")
flee <- flee.sea %>% left_join(flee.land, by="year") %>% left_join(flee.dnm, by="year")
flee <- flee %>% gather(type, individuals, c(sea_arrivals, land_arrivals, death_and_missing))
p <- flee %>% ggplot(aes(x=year, y=individuals, colour=type)) + 
  geom_line(size=0.75,alpha=0.75) + 
  geom_point(size=1.25, alpha=0.9) + 
  geom_text(aes(label=individuals), nudge_x = 0.25, vjust="inward", colour="black") +
  facet_grid(type~., scales = "free_y") +
  labs(
    title = "Fleeing Across the Mediterranean",
    subtitle = "Number of people registered fleeing across the Mediterranean",
    caption = "Source: UNHCR",
    colour = "",
    x = "Year",
    y = "Number of individuals"
  ) +
  theme_minimal() +
  theme(
    strip.text.y = element_blank(),
    legend.position = "top"
  ) +
  scale_color_manual(
    values = c("#2976DE", "#E3C08A", "#0E293D"),
    breaks = c("sea_arrivals", "land_arrivals", "death_and_missing"),
    labels = c("Total sea arrivals", "Total land arrivals", "Dead & missing")
  )

Data Reference

Reconstruction

The following plot fixes the main issues in the original.