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

Original


*(UCDP), U. C. D. P. Number of conflicts and incidences of one-sided violence. Retrieved from blob:https://ourworldindata.org/c6b57031-e80f-444c-ae7a-79f0e14092b2

*


Objective

The primay objective of this visualisation is to inform readers of the total number of conflicts occuring in the different types of conflict categories(Civil conflicts with foreign state intervention,Civil conflicts,Conflicts between states,Colonial or imperial conflicts).

The target audience of such a visualisation would be readers who are interested in uncovering historical data regarding conflicts since the end of world war 2 as the data for the visualisation starts from 1946

The visualisation chosen had the following three main issues:

  • The way that the graph depicts the category “Civil conflicts with foreign state intervention” in the plot deceives the viewer into thinking that it has the highest number of conglicts amongst other conflict types.This is not the case as the data shows the contrary.

  • The original visualisation misportrays the data as it represents most of its information in the form of a wave.As viewers, we have a tendenancy to start from the bottom and work our way up whenever we are calculating the number of conflicts at a certain time.But as the waves are stacked on top of each other,each wave begins where the other ended thus making it more difficult to calculate the number of conflicts at a certain point in time with every subsequent wave

  • The original visualisation also seems to demonstrate a sort of bias from the creator when arranging the conflict categories on the graph.For example, the conflict at the top of the stacked wave graph implicitly ives the feeling that it is the most concerning category of conflict whereas in reality all conflicts are equally important.Even the color scheme selected kinds of instill a fake sense of importance for the conflict with red and yellow commonly being associated with emergency situations while the conflict between states(shown in blue) presents itself as less of an urgent matter than afore mentioned

Code

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

library(ggplot2)
library(dplyr)
library(readxl)
library(tidyverse)
library(tidyr)
library(installr)
library(scales)
#Reading the Dataset from the directory
sbc <- read.csv("D:/RMIT Semester 2/Data Visualization/Assignment 2 DV/State_based_conflicts.csv")

#Reading the column names of the data
colnames(sbc)
## [1] "Entity"                                                  
## [2] "Code"                                                    
## [3] "Year"                                                    
## [4] "Number.of.conflicts.and.incidences.of.one.sided.violence"
#One data had a huge column name so I decided to rename it to make it short 
names(sbc)[names(sbc) == "Number.of.conflicts.and.incidences.of.one.sided.violence"] <- "number_of_conflicts"


#Removing unnecessary values from the columns
sbc2 <- subset(sbc,Entity=="Civil conflicts" | Entity=="Civil conflicts with foreign state intervention" 
               | Entity=="Colonial or imperial conflicts" | Entity=="Conflicts between states")

#Plotting the data as a bar chart and differentiating each bar on the basis of the different type of conflict
p1 <- ggplot(data=sbc2,aes(x=Year,y=number_of_conflicts,fill=Entity))+geom_bar(stat = "identity",color="black")
 
#Scaling the x axis
p2 <- p1+scale_x_continuous(breaks = c(0,1950,1960,1970,1980,1990,2000,2010,2016))
#Removing some grids to improve the graph
p3 <- p2+theme(panel.grid.major = element_blank())

#Improving the colors and sizes of the x and y labels
p4 <- p3+theme(axis.title.x = element_text(colour = "black",size = 16,face = "bold") )+
  theme(axis.title.y = element_text(colour = "black",size = 16,face = "bold"))

#Putting the label on top as well as changing the colours on the bars
p5 <- p4+theme(legend.position = "top")+scale_fill_manual(values = c("#00dfff","#067f89","#c7eff4","#2e0372"))

#Improving the text on the x and y axis
p6 <- p5+ theme(axis.text= element_text(size = 14,face = "italic"))+
  scale_y_continuous(breaks = c(0,5,10,15,20,25,30,35,40,45,50))

#Putting the title,subtitle,caption as well as x labels and y labels
p7 <- p6+ labs(title = "State Conflicts From 1946 till 2016",x="Year",y="Number of Conflicts",subtitle = "Only conflicts in which at least one party was the government of a state are included. Ongoing conflicts are represented
for every year in which they resulted in at least 25 battle-related deaths.",caption ="Source:UCDP/PRIO Armed Conflict Dataset")+
  theme(plot.title = element_text(colour = "black",size=20))      

Data Reference

*Data Visualisation Roser, M. State-based conflicts since 1946, 1946 to 2016. Retrieved from https://ourworldindata.org/grapher/number-of-conflicts-and-incidences-of-one-sided-violence

*Data Source for Visualisation (UCDP), U. C. D. P. Number of conflicts and incidences of one-sided violence. Retrieved from blob:https://ourworldindata.org/c6b57031-e80f-444c-ae7a-79f0e14092b2

Reconstruction

The following plot fixes the main issues in the original.