Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
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:
Reference
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
The following plot fixes the main issues in the original.