Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The objective of the original data visualisation was to highlight patterns in consumer spending attributed to superannuation withdrawals as a result of the Federal Government’s COVID-19 early release scheme. The intended audience is government, business, economists and public policy professionals. Illion is a credit ratings agency whilst Alpha Beta is an economics consultancy.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(dplyr)
library(tidyr)
library(magrittr)
library(ggplot2)
library(readxl)
super <- read_excel("super.xlsx")
super$round %<>% factor( c("Round 2: $3618", "Round 1: $2855"), ordered = T)
super$agg_group %<>% factor()
super$per_labels <- c("13.76%", "16.95%", "18.45%", "12.98%", "14.75%", "8.20%", "14.91%", "12.43%", "13.90%", "22.62%", "10.70%", "16.22%", "12.07%", "12.05%")
#Graph
s <- ggplot(data = super, aes(x = per_spend, y = round, fill = agg_group))
s1 <- s + geom_bar(stat = "identity") +
scale_fill_manual(values = c('#66c2a5','#fc8d62','#8da0cb','#e78ac3', '#a6d854','#ffd92f','#e5c494')) +
theme_minimal() +
theme(legend.position = "top", legend.title = element_blank()) +
labs(title = "The second round of superannuation withdrawals were less of a hangover!",
subtitle = "Share of extra spending in the fortnight after superannuation withdrawal by category,\ninset with % of total",
x = "Percentage",
y = NULL,
caption = "Source: Illion & Alpha Beta Australia (2020)") +
geom_text(aes(label = per_labels), size = 2, position = position_stack(vjust = 0.5))
Data Reference
The following plot fixes the main issues in the original.