Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The objective of the data visualisation is to portray which players of the Chicago Bulls earned how much throughout each season during the 1990-1998 period. The visualisation is aimed at the casual basketball fan, as well as the viewers of the recently released 10-part documentary “The Last Dance”, which looked deeply into the 1990’s Chicago Bulls basketball team.
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(rmarkdown)
library(ggplot2)
library(magrittr)
library(scales)
library(grid)
library(readxl)
AxPSalary <- read_excel("/Users/codyshipp/Desktop/AxPSalary.xlsx")
View(AxPSalary)
AxPSalary$Player_l = factor(AxPSalary$Player, levels = c('Michael Jordan', 'Scottie Pippen', 'Horace Grant',
'BJ Armstrong', 'Steve Kerr', 'Toni Kukoč',
'Dennis Rodman', 'Other Players'))
p1 <- ggplot() + geom_line(data = AxPSalary, aes(x = Year, y = Value, color = Type)) +
geom_point(data = AxPSalary, aes(x = Year, y = Value, color = Type)) +
scale_color_manual(values = c("black", "red"), name = "Salary Type") +
facet_grid(Player_l ~., scales = "free_y", labeller = label_value) +
labs(title = "Chicago Bulls Player Salary vs Salary Based on Performance 1991-1998", y = "Salary") +
scale_x_continuous(n.breaks = 8) + coord_cartesian(xlim = c(NA,NA)) +
scale_y_continuous(labels = unit_format(unit = "M", scale = 1e-6)) +
theme(panel.spacing.y = unit(1,"lines"), strip.text.y = element_text(size = 7),
plot.title = element_text(hjust = 0.5))
Data Reference
The following plot fixes the main issues in the original.