Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.

Original


Source: espncricinfo.com (2019).


Objective This visualization is that of the performance of the batsmen in the World Cup 2015. The visualization was meant for the fans of the game of cricket and a deeper insight into the performance of the top players. The objective of the original visualization was to show the best batsmen in the World Cup 2015 and their respective share of runs in their teams. This visualization does not do justice to it with the pie chart shown above. The mistakes identified from here are:

  • The circular alignment of the pie chart doesn’t clearly convey the ranking amongst the top 10 players.
  • The width of the section of the pie, meant to show the difference in the percentage of team’s runs amongst the batsmen, doesn’t clearly explain who has a larger share in comparison.
  • Despite the presence of their respective percentage values, the absence of an axis makes it harder for the viewers to read the information conveyed easily. A bar graph would better do justice in such a scenario.

Reference

Code

The following code was used to fix the issues identified in the original.

library(ggplot2)

cric <- data.frame(Player = c("Williamson","Rohit","Shakib","Warner","Babar","Du Plesis","Pooran","Root",
                              "Kusal P.","Rahmat S."),
                   Perc_team_score = c(30.23, 29.05, 28.25, 25.02, 24.51, 21.06, 20.01, 19.07, 18.16,
                                       14.8))
cric <- cric[order(-cric$Perc_team_score),]
cric$Player <- factor(cric$Player, levels = cric$Player[order(-cric$Perc_team_score)])

p1 <- ggplot(data = cric, aes(group=1, x=Player, y=Perc_team_score))
p1 <- p1 + geom_bar(stat = 'identity', colour = "black", fill = "grey") + 
  geom_text(aes(label = paste(Perc_team_score, "%", sep = '')), nudge_y = 2, nudge_x = 0.05) + 
  labs(
    title = "Players having the highest % of their team's score",
    y = "% of team's score") + theme(plot.title = element_text(hjust = 0.5),
                                     panel.background = element_rect(fill = "white", colour = "#6D9EC1",
                                size = 2, linetype = "solid"),
                                panel.grid.major = element_line(size = 0.5, linetype = 'solid',
                                colour = "grey"), 
  panel.grid.minor = element_line(size = 0.25, linetype = 'solid',
                                colour = "grey")) + 
  scale_y_continuous(limits = c(0,35))

** Data Reference**

Reconstruction

The following plot fixes the main issues in the original.