Description Usage Arguments Value Examples
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
1 | crime_correlate(crime_data, offence_description, suburbs)
|
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. |
A ggplot object showing the correlation in offence count between the two input suburbs.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.