drugCrimes: crime data from San Francisco classified as drug crimes

Description Usage Format Details Source Examples

Description

data downloaded from url

Usage

1

Format

A data frame with 97248 observations on the following 17 variables.

Category

crime category

Date

date

DayOfWeek

day of week

Descript

description of crime

HourOfWeek

hour of week, ranging from 0 to 168

HrOfDay

hour of day

IncidntNum

Incident Number

Location

address

MATCH

logical flag indicating drug keyword match

PdDistrict

police district

PhaseOfWeek

phase of week

Resolution

Outcome

Time

time

TimeOfDay

time of day

X

latitude

Y

longitude

violent

logical indicating violent crime

Details

crime data from San Francisco filtered by drug category. The keywords searched for in the Descript field are: drugPhrases=c("opium","methadone","marijuana","hallucinogenic","heroin", "opiates","cocaine","amphetamine","drugs", "narcotics","controlled substance")

table(drugCrimes$MATCH)

years: 2007:2013 35K additional rows randomly sampled.

The call is: #source('H:/DropboxHWR/myPapers/JSS2015/FinalSubmission/RcodeForFigures/InterestingClusters.R')

drugCrimes = FilterCrimes(2007:2013, KeyWords=drugPhrases, file = "data/drugCrimes.rda")

Source

http://www.datasf.org

Examples

1
2
3
 data(drugCrimes)
 plot(Y~X,data=drugCrimes,col=MATCH+1,pch=20,cex=0.6)
 

TreeHotspots documentation built on May 2, 2019, 5:17 p.m.