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

Original


Source: Office for National Statistics (2013).


Objective

The purpose of this visualisation is to identify the immigration patterns of residents who were born outside the UK over the past 60 years. The targetted audience is relevant to those who want to improve their understanding of how historical changes in the UK’s foreign born residents have contributed to the 2011 population structure of England and Wales including policy makers, members of Parliament, journalists, researchers and academics, etc.

The visualisation chosen had the following three main issues:

  • Ineffective use of colour - the visualisation uses 9 colours to differentiate the year. There is a lot looking back and forth between the bar chart and the colour legend.
  • Inappropriate choice of mapping aesthetics - While it is still able to see the distribution of migrants spreads across the time by country, it is overplotted, and difficult to make accurate comparisons between countries.
  • Deceptive issue - the year interval is not constant, for instance, between 1961 and 2000 have a 10 years’ interval, however, before 1961 and after 2001 have a 2 years’ one either more. It is possible to mislead the reader.

Reference

Code

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

library(readr)
library(ggplot2)

immigrant <- read_csv("C:/Users/Lisa/Downloads/MATH2270 Data Vis/Assignment 2/original.csv")

immigrant$year <- factor(immigrant$year, levels=c("pre 1961", "1961-1970", "1971-1980", "1981-1990", "1991-2000", "2001-2003", "2004-2006", "2007-2009", "2010-2011"), ordered = TRUE)

# plot the distribution of migrants
# by country using line/point plots

ggplot(immigrant, aes(x = year, y = percent, color = factor(country))) +
  geom_line(aes(group = country))+
  geom_point() +
  labs(title = "When did Immigrants first arrive in the UK(England and Wales)?",
       subtitle = "Before 1961 to 2011",
       x = "Year",
       y = "Percent",
       caption = "Source: Nomis, Office for National Statistics (2013)\n*After 2001, the data was collected every 2 years." ) +
  scale_y_continuous(n.breaks = 8) +
  facet_wrap(. ~ country, ncol = 3) +
  geom_label(aes(label = country), x = Inf, y = Inf, hjust = 1, vjust = 1, size = 3) +
  theme(
    legend.position = "none", 
    plot.title = element_text(hjust = 0.5,
                              size = 14,
                              face = "bold"),
    plot.subtitle = element_text(hjust = 0.5),
    plot.caption = element_text(hjust = 0, 
                                face = "italic"),
    axis.text.x = element_text(angle = 45,
                               vjust = 1,
                               hjust = 1,
                               size = 6.5),
    strip.background = element_blank(),
    strip.text = element_blank()) +
  scale_color_manual(values = c("#6D6875", "#d18066", "#d18066","#d18066","#d18066","#d18066", "#d18066", "#d18066", "#d18066", "#d18066", "#d18066"))

Data Reference

Reconstruction

The following plot fixes the main issues in the original.


The visualisation addresses the main issues in the original:

  • Use colour with purpose - color is used to differentiate between two different statistical summaries - share of migrant by country vs . all countries.
  • Faceting - by using faceting, the visualisation breaks small multiple. Furthermore, it allows us to use only 2 colours.
  • Deceptive issue - to avoid the misleading, we noted the year interval has been changed since 2001 at the caption. Yet we tried to combine the data to make it to a 10 years’ interval, we believe keeping the data is more constructive. This could be the limitation of this visualisation.