Few advocate for mass shootings or gun violence, except the perpetrators of such acts. It’s easy to blame the prevalence of guns as the cause – no guns, no mass shootings, right? Some estimate that 300+ million guns are owned by Americans, though the number of gun owners appears to be declining. The relationship between gun ownership and gun deaths is more complicated than it may appear, and there is a lot of misinformation being peddled in the mass media these days as legitimate data science.

Irresponsible data analysis and pushing political narratives based on misleading visualizationsis is a huge pet peeve of mine. Regardless of your position on gun control and related issues, we all need to be honest with our analysis of the available data, and to demand evidence-based policies.

Mass Shootings and Gun Ownership

Let’s now bring in some data on mass shootings per state (2013-2015 data), and note that the gun ownership data is from 2010 (finer-grained data was hard to find). Mass murder is presumably relatively difficult without guns, though there are significant cases of mass murder with knives in places with very tight gun control, and examples of mass murders like the Boston Marathon bombing that did not involve guns. Nevertheless, in the US, most mass murders seem to involve guns. Does the gun ownership prevalence in a state explain the number of mass shooting deaths in the state?

mass_shootings <- read.csv("~/repos/data/2013MASTER.csv")
mass_shootings_by_state <- data.frame(gun_data$State.Abbv)
mass_shootings_by_state <- aggregate(mass_shootings$killed, by=list(mass_shootings$State), FUN=sum)
colnames(mass_shootings_by_state) <- c("State.Abbv", "Mass.Shooting.Deaths.2013")

ms <- merge(gun_data, mass_shootings_by_state, by.x="State.Abbv", by.y="State.Abbv", all=TRUE)
# Toss PR (Puerto Rico)
ms <- ms[-c(52),]
# Fill in zero for the states with no shooting deaths
ms[is.na(ms)] <- 0
ms <- transform(ms, Mass.Shooting.Deaths.per.capita.2013 = Mass.Shooting.Deaths.2013 / Population)

ggplot(ms, aes(Gun.ownership, Mass.Shooting.Deaths.per.capita.2013)) +
    geom_point(size=3, color="blue") + ylim(-12e-6, 30e-6) +
    geom_text(aes(label=State.Abbv), size=3, vjust=3) +
    labs(x="Gun Ownernship %", y="Mass Shooting Deaths (per capita)",
         title="Mass Murders (per capita) versus Gun ownership by State, 2013")

Again we’ve got a large DC outlier, so let’s take that out.

# Toss DC outlier for the correlation
ms2 <- ms[-c(8),]

ggplot(ms2, aes(Gun.ownership, Mass.Shooting.Deaths.per.capita.2013)) +
    geom_point(size=3, color="blue") + ylim(-1e-6, 6e-6) +
    geom_text(aes(label=State.Abbv), size=3, vjust=3) +
    labs(x="Gun Ownernship %", y="Mass Shooting Deaths (total)",
         title="Mass Murders (per capita) versus Gun ownership by State, 2013")