Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The purpose of this visualisation was to demonstrate the increase in Koala sickness in recent years, with a target audience of the Moreton Bay Region public, from interested citizens, environmental activists or academics.
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(RColorBrewer)
library(magrittr)
data <- read.csv("SourceData.csv")
newHeadings <- c("Record","Year", "Percent")
colnames(data) <- newHeadings
data[,1]<- factor(data[,1], levels = c("Sightings","Sick","Hit By Car", "Dog Attack", "Other"))
data[,2]<- factor(data[,2], levels = c("2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019","2020*"))
data2 <- data[data$Record == 'Sick',]
p1 <-ggplot(data, aes(x=Year, y=Percent, fill= Record )) +
geom_bar( stat="identity", position = position_dodge(), width = 0.7)+
geom_line(data=data2,linetype = "dashed", color = "orange3", aes(x=Year, y=Percent, group=1, color=Record, label = "Sick Trend" ))+
scale_fill_brewer(palette="Set2")+
labs(title="Koala Callouts \n 2009-2020",
x= "Year",
y= "Percent of Koala Records")
Data Reference
The following plot fixes the main issues in the original.