View source: R/fn_prepare_input_crime.R
fn_prepare_input_crime | R Documentation |
Checks that the minimum necessary variables are present and calculates additional attributes needed for fn_gpsmart()
.
fn_prepare_input_crime(input_crime_raw)
input_crime_raw |
A data frame with 1 row and 9 columns:
|
The function will return an error if the input does not contain the correct columns in the correct format.
Season variables are based on Southern Hemisphere.
A data frame the same as the input with 7 additional columns:
offence_subtype_ic
The subtype of input crime, abbreviated (resburg, nonresburg, comrob, persrob, sex).
daypart_ic
The day part of the input crime (daytime, evening, night).
weekpart_ic
The week part of the input crime (Weekday, weekend).
spring_ic
Whether the input crime occurred in spring (1 = yes, 0 = no).
summer_ic
Whether the input crime occurred in summer (1 = yes, 0 = no).
autumn_ic
Whether the input crime occurred in autumn (1 = yes, 0 = no).
winter_ic
Whether the input crime occurred in winter (1 = yes, 0 = no).
Sophie Curtis-Ham
fn_prepare_suspect_data()
checks that the minimum necessary variables are present and creates the input_suspects
data frame for use in fn_gpsmart()
.
fn_gpsmart()
filters and ranks input_suspects
based on their probability of committing the input_crime
.
data(example_input_crime_raw) fn_prepare_input_crime(example_input_crime_raw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.