Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
This lovely line visualisation (mess) is intended to be informative on the pandemics insistence within the UK, to a sub region specificity. The target is anyone who is interested or has the same interests as Danny, it is a personal website of which he has accessed very easy to obtain open Covid data published by the UK Office for National Statistics. From his bio page it is revealed that he has an interest in the disillusion of common world map projections.
The visualisation chosen had the following three main issues:
Text: The current title is to long and does not explain the information within the visualisaton adequately, there is no Y-axis label and the foot note is confusing “1m” is one month but I interpreted it at first as a number. The line labels are also not of much value given the mess it is particularly hard to surmise which line it is referencing.
Clarity: There is to much information for the plot to be of value, by focusing into the sub regions of the country he has only devalued his work and created problems
Colour: There are 116 colours within this jumble of lines and is problematic to people with colour blindness, or anyone with eyes really.
Reference
The following code was used to fix the issues identified in the original.
Danny had collated at the time monthly releases from the ONS that are no longer accessible to the public online. However due to the new normal lucky for me there will, for the foreseeable, be new monthly data. The following was built on a month of collected regional data as the sub region option that Danny used must of been collected by him over many months and it was not possible to replicate his depth.
For consideration the sub-region tab within the broader excel sheet has a column titled “geography code” I would have liked to know how to create a spatial data set from those figures but I could not figure that out. Ultimately that is the best way to achieve what Danny was trying to represent. What has been created below is a relief to the eye and clearly shows the Covid trends in England curing their current summer by region.
It is simple it tells of current trends and also has the same sentiment of a continuous problem to modern society.
# create plots that are displayed together
library(ggplot2)
library(openxlsx)
library(tidyverse)
library(magrittr)
library(janitor)
library(lubridate)
library(tidyr)
# Tidy data
england_df <- read.xlsx("data/datadownload.xlsx",fillMergedCells = TRUE, startRow = 3, colNames = FALSE)
england_df %<>%
janitor::row_to_names(1)
colnames(england_df)[1]<-"Date"
england_clean <- england_df[-c(1, 44:50),]
england_clean_sub <- england_clean[,c(1:2,5,8,11,14,17,20,23,26)]
england_clean_sub_convert <- janitor::convert_to_date(england_clean_sub$Date, character_fun = lubridate::dmy)
england_clean_sub$Date <- england_clean_sub_convert
england_clean_sub %<>%
pivot_longer(cols = 2:10,
names_to = "Region",
values_to = "Percentage_of_covid_cases")
england_clean_sub$Percentage_of_covid_cases <-as.numeric(england_clean_sub$Percentage_of_covid_cases)
england_clean_sub$Percentage_of_covid_cases <- round(england_clean_sub$Percentage_of_covid_cases, 2)
# Plot data
p1 <- ggplot(data = england_clean_sub, aes(x = Date, y = Percentage_of_covid_cases,
cex.lab = 3)) +
geom_line() +
facet_wrap(Region ~ ., scales = "fixed",
labeller = label_value,
nrow = 3) +
theme_classic()+
theme(panel.grid.minor = element_blank(),
text = element_text(size = 14),
plot.title = element_text(size=18),
plot.subtitle = element_text(size=12),
plot.caption = element_text(size = 8))+
labs(title = "England Regional recent covid case percentage ", subtitle = "Modelled daily percentage of the population testing positive for COVID-19 on nose and throat swabs by \n region, England, 2 June to 13 July 2022",
caption = "Data sourced from the Office of National Statistics (ONS) UK",
x = "Date", y = "Projected % confirmed cases ")
Data Reference
The following plot fixes the main issues in the original.
p1