Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The original visualization had been sourced from the subreddit known as ‘DataIsBeautiful’. The objective of the visualisation was to highlight a disproportional increase in the price of Freddos (a popular chocolate bar, manafactured by Cadbury) and the national living wage (NLW) per hour, in the United Kingdom between April 1999 and April 2020. The disproportionality between the two variables suggested that the number of Freddos affordable had decreased despite an increase in minimum wages due to an increase in the price for Freddos above the appropriate increase caused by inflation. The targetted audience were fellow data visualisation-enthusiast.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(ggplot2)
library(readr)
#the following line of code had been used to set our working directory.
setwd("~/Desktop/Data Visualisation/assignment 2/working/reconstruction in R.")
#import data set
freddos <- read_csv("datavis.csv")
#recreation of the original visualisation
p <- ggplot(freddos, aes(x=time))
p1 <- p + geom_line(aes(y=scaled_NLW_per_hour),colour="dodgerblue",group=1) +
geom_line(aes(y=scaled_freddos_affordable),colour="red",group=1) +
geom_vline(xintercept=22,linetype="dashed",colour="darkgrey") +
geom_text(aes(x=28.5, y=2.5, label=paste("Probable Intervention Effect")),
colour="darkgrey",angle=0) +
geom_text(aes(x=37.75, y=1.65, label=paste("scaled_NLW_per_hour")),
colour="dodgerblue", angle=45, size=2.5, alpha=0.05) +
geom_text(aes(x=37.75, y=-0.45, label=paste("scaled_freddos_affordable")),
colour="red", angle=0, size=2.5, alpha=0.05) +
theme_bw() +
labs(title="No. of Freddos Affordable with NLW/Hour, Across Time",
x="Semi-Annual Time Points (1999 April-2020 April)",
y="Scaled: No. of Freddos Affordable & the NLW/Hour") +
scale_x_discrete(breaks = freddos$time[seq(1, length(freddos$time), by = 5)])
Data Reference
ifollowthestats. The History of Freddo Prices vs National Minimum Wage [OC]. Retrieved April 30, 2020, from Reddit (subreddit: DataIsBeautiful): https://www.reddit.com/r/dataisbeautiful/comments/g9bkpq/the_history_of_freddo_prices_vs_national_minimum/
Low Pay Commission. (2019). 20 years of the National Minimum Wage-Data. Retrieved April 30, 2020, from UK Government’s Research and Analysis website: https://www.gov.uk/government/publications/20-years-of-the-national-minimum-wage
Vouchercloud. (2017). The Freddo Index - The History of Freddo Prices Since 2000. Retrieved April 30, 2020, from the Vouchercloud website: https://www.vouchercloud.com/resources/the-freddo-index
The following plot fixes the main issues in the original.
As can be observed in the reconstructed visualisation, the number of Freddos affordable increases with an increase in NLW/hour in the UK (perhaps due to inflation). However, following the intervention effect, despite an increase in the NLW/hour, the number of Freddos affordable reduced drastically and stayed at a relatively lower value. This suggests that the increase in the actual price of a Freddo was more than the increase in the price caused by inflation. The deviation of the two lines from each other represents this disproportionality.