crime_file: Postcode correlation ggplot 'crime_file' : Gets crime data of...

Description Usage Arguments Value Examples

View source: R/hw2_sonalv.R

Description

Postcode correlation ggplot crime_file : Gets crime data of year 2012 to 2017, filter it and generates ggplot between 2 postcode

Usage

1
crime_file(crime_data, offence_description, postcodes)

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 "offence_level_1"

postcodes

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

Value

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

Examples

1
crime_file(data1,"ACTS INTENDED TO CAUSE INJURY", c(5000, 5006))

Sonal28/prfasonalv documentation built on May 28, 2019, 3:16 p.m.