I’ve made the following county-level graphs of fatal police shooting rates by race using data from the Census and compiled from the data I’ve now made available on figshare:
Bradford, John Hamilton (2017): Fatal Police Shootings (2013-2016) & County Level Data. figshare.
Below is the graph. I. Loading Data 1. A function to retrieve state abbreviations getState.abb <- function(x){ ##remove punctuation and twim white space, convert to lower case x <- tolower(trimws(gsub("[[:punct:]]", "", x))) x[which(x == "washington dc")] <- "district of columbia" states.
Figure 1. SVG
Figure 2. SVG
Above are some new county-level heat maps of police shooting data, compiled from the Lott & Moody (2016) data for years 2013-2015, and the Washington Post for 2016. Below the graphs, the R code is provided. R Code 1. Load the Data. (I plan to upload these data sets to figshare shortly.) library(readr) library(tidyr) library(dplyr) vars <- fst::read.fst(path = "countyVars.csv") df_wapoLott <- dplyr::left_join(vars, readr::read_csv("killed_lott_wapo.