Skip to content

Instantly share code, notes, and snippets.

library(dplyr)
library(scales)
library(ggplot2)
shot <- read.csv("https://raw.githubusercontent.com/washingtonpost/data-police-shootings/master/fatal-police-shootings-data.csv",
stringsAsFactors = F)
# https://www.fbi.gov/about-us/cjis/ucr/crime-in-the-u.s/2014/crime-in-the-u.s.-2014/tables/table-8/Table_8_Offenses_Known_to_Law_Enforcement_by_State_by_City_2014.xls
crimes <- read.csv("us_crimes_2015.csv", stringsAsFactors = F)
head(shot)
head(crimes)
import pandas as pd
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("input", nargs="+")
ENSEMBLE_HEADER_LENGTH = 6
COLUMN_NAMES = ["depth", "magnitude", "direction", "east", "north", "up", "error",
"amplitude1", "amplitude2", "amplitude3", "amplitude4",