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

Original


*Source: https://preview.redd.it/g0x5r3enysv81.jpg?width=1125&format=pjpg&auto=webp&s=b685b38f2bda2be8aa2ca1962d0ec05ac5ad56c9


Objective

  • The original data visualisation was made by an analyst at 3KCRA, a United States news station based in Sacramento California that is affiliated with NBC. The visualisation’s target audience are most likely educated Americans, aged 16+ that recide in the city of Sacramento California. The objective of the visualisation is to scare the target audience and get a reaction from seeing them the recent increase of mass shootings in the United States. The use of data shows for the news station to present a more valid point, furthermore getting a bigger reaction from the target audience which leads to the television stations’ viewership to go up.

The visualisation chosen had the following three main issues:

  • There is inconsistancies in the graph, with the last four numbers in the bar chart showing ‘336’.

  • The visualisation is not not use a colour blind friendly pallette. Also the lower numbers in the graph have a redish colour representing danger while the higher numbers have greenish colours representing potitivity. In reality, mass shootings are not a good thing at all, let alone a high number of them.

  • The graph is presented in a bar-chart form, as it goes over time, it should be done in lineplot form.

Reference

Code

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

# generate packages

library(ggplot2)
library(readxl)
library(grid)
library(ggthemr)


# Create the data for the chart

 Year <- c(2014, 2015, 2016, 2017, 2018, 2019, 2020)
`Total Mass Shootings` <- c(269, 385, 383, 346, 336, 417, 617)

data <- data.frame(Year, `Total Mass Shootings`)

print(data)
##   Year Total.Mass.Shootings
## 1 2014                  269
## 2 2015                  385
## 3 2016                  383
## 4 2017                  346
## 5 2018                  336
## 6 2019                  417
## 7 2020                  617
# plot data

ggthemr('grape')
p <- ggplot(data = data, aes(x= Year, y=`Total Mass Shootings`, group = 1)) +
  geom_line(size = 1.2, alpha = 0.9) + geom_point(size = 3)
p <- p + geom_text(aes(label = `Total Mass Shootings`), size = 4, vjust = -2)
p <- p + ylim(0,800) 
p <- p + labs(title = "Number of Mass Shootings per From 2014 to 2020",
              subtitle = "(At least 4 people affected)",
              caption = "Data source: https://www.gunviolencearchive.org/", 
              size = 2)

Data Reference

Gunviolencearchive.org. 2022. Gun Violence Archive. [online] Available at: https://www.gunviolencearchive.org/ [Accessed 30 April 2022].

Reconstruction

The following plot fixes the main issues in the original.