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

Original


Source: Research Article by University of Sheffield, UK (2018).


Objective

The 2016 UK EU referendum and the US presidential election, among other later political occasions, have drawn attention to the expanding control of social media utilization to influence major worldwide results. Such media significantly influence our society, in ways which are however to be completely caught on. One direction for this is often the exposure of politicians to online abuse.

This chart centre’s on abusive replies to tweets by UK politicians within the run-up to the 2015 and 2017 UK common elections. For this research, 1.4 million tweets from the months before the 2015 and 2017 UK general elections was utilized to explore the abuse directed at politicians. This chart makes a difference us to reply the address “What is the trend in abusive replies to tweets by UK politicians in the above between the two time periods studied?”.

The target audience to this graph is general public. As politicians increasingly talk about their unwillingness to expose themselves to this abuse and intimidation, we see that there’s an awfully genuine threat that they may not select to do this work, and the portion they play in making a reasonable representation of the voters will be lost. For this reason, it is critical to lock in with this viewpoint of the way the internet is influencing our society

The visualisation chosen had the following three main issues among many others:

  • Overlaping bars and Missing legend makes it difficult to identify which bars are referring to 2015 and 2017.
  • Few bars referring different political parties have same colour.
  • Varying width of the inner bars fails to explain the reason for being so.

Reference

  • Research Article by Genevieve Gorrell, Mark Greenwood, Ian Roberts, Diana Maynard and Kalina Bontcheva University of Sheffield, UK (2018). Online Abuse of UK MPs in 2015 and 2017: Perpetrators, Targets, and Topics. which is available at: https://arxiv.org/pdf/1804.01498.pdf

Code

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

library(ggplot2)
library(reshape2)
values <- data.frame(parties = c("Conservative Party Male","Conservative Party Female","Democratic Unionist Party Male","Green Party Female","Labour Party Male","Labour Party Female","Liberal Democrats Male","Plaid Cymru Male","Scottish National Party Male","Scottish National Party Female"),
                      "2015" = c(5.18,1.74,1.48,0.67,3.91,1.75,3.09,1.22,1.56,0.60),
                      "2017" = c(6.36,4.01,3.13,1.50,3.48,2.32,4.40,2.06,2.07,1.88))

data.m <- melt(values, id.vars='parties')


p1 <-ggplot(data.m, aes(parties, value)) + geom_bar(aes(fill = variable), 
   width = 0.75, position = position_dodge(width=0.76), stat="identity") + 
   theme(legend.position="right")  + scale_fill_discrete(name = "Year", labels = c("2015","2017"))+   ggtitle("Rise in Abuse from 2015 to 2017") +
  theme(plot.title = element_text(hjust = 0.5))+ labs(x = " Party Names", y = "% of replies which are abusive")+
 theme(
    axis.title.x = element_text(size = 10, face = "bold"),
    axis.title.y = element_text(size = 10, face = "bold"))+coord_flip()+
  scale_x_discrete(
  limits=c("Conservative Party Male","Liberal Democrats Male","Conservative Party Female","Labour Party Male","Democratic Unionist Party Male","Labour Party Female","Scottish National Party Male","Scottish National Party Female","Plaid Cymru Male","Green Party Female")
  , 
    labels=c("Conservative Party \nMale","Liberal Democrats \nMale","Conservative Party \nFemale","Labour Party Male","Democratic Unionist \nParty Male","Labour Party Female","Scottish National \nParty Male","Scottish National \nParty Female","Plaid Cymru Male","Green Party Female")   
    )

Data Reference

Research Article by Genevieve Gorrell, Mark Greenwood, Ian Roberts, Diana Maynard and Kalina Bontcheva University of Sheffield, UK (2018). Online Abuse of UK MPs in 2015 and 2017: Perpetrators, Targets, and Topics.

http://greenwoodma.servehttp.com/data/buzzfeed/sunburst-data-2015.json

http://greenwoodma.servehttp.com/data/buzzfeed/sunburst-data-2017.json

Reconstruction

The following plot fixes the main issues in the original.