This vignette tries to implement the SPSS code used by the Murder Accountability Project to look for serial killers.

Load libraries

library(murderdata)
library(dplyr)
library(magrittr)

Look at the data

We are using the supplementary data set since it has the most detail.

glimpse(md_supplementary)

As you can see there are plenty of data to look at. So lets get to it.

Do some data summarization

We will create a data set that summarizes the data for us. We will group by the sex of the victim, the country of the murder and the weapon used. Then we will summarize total murders, cases solved and the percentage solved.

serial_killers <- md_supplementary %>%
  mutate(solved = solved %>% factor() %>% as.numeric() %>% subtract(1)) %>%
  group_by(vicsex, cntyfips, weapon) %>%
  summarise(total = n(),
            solved = sum(solved),
            percentage = mean(solved)) %>%
  ungroup() 

serial_killers %>% head() %>% knitr::kable()

Possible uncaught serial killers

We want to find possible serial killers. We will focus on female victims only, then find counties where more than 33% of a specific type of murder (by choice of weapon) has gone unsolved.

possible_serial_killers <- serial_killers %>%
  filter(vicsex == "Female",
         percentage <= .33) %>%
  mutate(unsolved = total - solved) %>%
  arrange(desc(unsolved))

Lets have a look

possible_serial_killers %>% select(-vicsex) %>% head() %>% knitr::kable()

Here we see that in San Mateo County in California we have seven women burned to death and none of them have been solved... Is there a potential serial killer lurking?



mikkelkrogsholm/murderdata documentation built on May 14, 2019, 5:18 p.m.