crime_correlate: Create a graph comparing L3 Offences in suburbs

Description Usage Arguments Value Examples

Description

crime_correlate This is a function designed to take to input from a crime data sheet, an offence description and two suburbs representing two suburbs. Then it will analyze and return a plot to show the number of incidents between the the suburbs for that year

Usage

1
crime_correlate(crime_data, offence_description, suburbs)

Arguments

crime_data

A data.table object with the following columns: "date" (POSIXct), "suburb" (chr), "postcode" (chr), "offence_level_1" (chr), "offence_level_2" (chr), "offence_level_3" (chr), "offence_count" (num).

offence_description

A character string of one of the level 3 Offence Description.

suburbs

A two-element character vector. Each element is an SA suburb.

Value

A ggplot object showing the correlation in offence count between the two input suburbs.

Examples

1
2
3
     crime_correlate(crime,'OFFENCES AGAINST PROPERTY', c('NORTH ADELAIDE', 'PROSPECT'))
   #This wiil return a correlation count graph indicating the overlap in the crime and the an
   #estimate of how many days that has happened in the fiscal year

MMGhazanfar/prfamghazanf documentation built on May 28, 2019, 1:45 p.m.