51 Years of Data: K-12 School Shooting Statistics Everyone Should Know (2022). Available at: https://www.campussafetymagazine.com/safety/k-12-school-shooting-statistics-everyone-should-know/slideshow/5/ (Accessed: 15 May 2022). Staff, C. (2022) 51 Years of Data: K-12 School Shooting Statistics Everyone Should Know, Campus Safety Magazine. Available at: https://www.campussafetymagazine.com/safety/k-12-school-shooting-statistics-everyone-should-know/ (Accessed: 15 May 2022).
Objective
The data visualisation, originally taken from the K-12 school shooting database (Riedman, David and Desmond O’Neill (2020).**), in a slideshow from the website campus safety depicts the time of occurence for school shootings in all K-12 schools in America. These shooting include any instances where firearms were fired, brandished or a bullet hit any part of school property. As such the objective of this article and the visualisations that accompany it are to raise awareness of school shooting that occur in K-12 schools in America and to hightlight an array of statistics without clear objectives. The target audience is American students and parents with a wider target audience being all American peoples. All incidents reported only by blogs have been removed. The perceived bias portrayed by highlighting, in the legend, only time periods that fall under school hours with the graph title Time Period leads one to believe all these shootings happen during school hours. As such a second categorical value has been used to offer a visual guide to emphasise the shootings that occured during school hours and those that didn’t.
The visualisation chosen had the following three main issues: * Issues with data integrity (Although the data itself is considered a primary source the sources they cite include primary historic articles and blog posts which are considered secondary and unreliable sources of historical data). All shootings only sourced by blogs were removed from the dataset. * Perceived bias not correctly informing viewers that all these incidents haven’t occurred during school hours. * Pie Chart with too many labels including one repeated label (Unknown)
Reference
*Article piece: Staff, C. (2022) 51 Years of Data: K-12 School Shooting Statistics Everyone Should Know, Campus Safety Magazine. Available at: https://www.campussafetymagazine.com/safety/k-12-school-shooting-statistics-everyone-should-know/ (Accessed: 13 May 2022).
*Pie Chart taken from 51 Years of Data: K-12 School Shooting Statistics Everyone Should Know (2022). Available at: https://www.campussafetymagazine.com/safety/k-12-school-shooting-statistics-everyone-should-know/slideshow/5/ (Accessed: 13 May 2022).
The following code was used to fix the issues identified in the original.
library(dplyr)
library(readxl)
library(foreign)
library(tidyr)
library(ggplot2)
library(repr)
k12 <- read_excel("K_12_Merged.xlsx")
options(repr.plot.width = 10, repr.plot.height = 10)
data1 <- k12 # Replicate original data
data1 = subset(data1, Time_Period == "Before School" | Time_Period =="School Start"|Time_Period == "Morning Classes"|Time_Period == "Lunch"|Time_Period == "Afternoon Classes"|Time_Period =="Dismissal"|Time_Period =="After School"|Time_Period =="Evening"|Time_Period =="Night"|Time_Period =="Not a School Day"|Time_Period =="School Event"|Time_Period =="Sport Event")
data1$Time_Period <- factor(data1$Time_Period, # Change ordering manually
levels = c("Not a School Day","School Event","Sport Event","Night", "Evening", "After School","Dismissal","Afternoon Classes", "Lunch", "Morning Classes", "School Start","Before School"))
t1 <- ggplot(data = data1,aes (y = Time_Period, group = During_School))
t1 <- t1 + theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.border = element_blank(),
axis.line = element_line()) +
geom_bar(aes(fill = During_School), position = "dodge") +
scale_fill_manual(values = c("#B2D1E8", "#1569C7")) +
#geom_text(stat='count', aes(label=..count..), vjust=-1) +
xlab("Count") + ylab("Time of day/event") +
labs(title = "Time of day shooting occured (including events and non school days)",
caption = "Data source: Riedman, David and Desmond O’Neill (2020)",fill = "Occured during school")
Data Reference
** Riedman, David and Desmond O’Neill (2020). from K-12 School Shooting Database. Naval Postgraduate School, Center for Homeland Defense and Security, Homeland Security Advanced Thinking Program (HSx) Available at: www.chds.us/ssdb/ (Accessed: May 13, 2022)
The following plot fixes the main issues in the original.
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.