Cleans police recorded crime to specification for input to number_reoffences model. NOTE: This function is not to be used in preparing police_recorded_crime for use in the unit_costs model.

clean_police_recorded_crime(police_recorded_crime,
  fraud_offences = 67480)

Arguments

police_recorded_crime

tidy police recorded crime dataframe with following columns

offence_groupOffence group, does not include summary or other
offence_subgroupName of offence subgroup
offence_codeCategorical offence code
offenceName of offence
year_endingDate column reflecting 12 months ending to which the data refers
number_offencesNumber of specified offences in specified period.

As seen in data provided with package police_recorded_crime.

fraud_prc

Integer, default 67480, this is specified in the Home Office cost of crime report.

Value

Returns a tidy data frame with fraud figures reduced to specified sum

Details

Cleaning police recorded crime data takes two steps:

  1. Change number_offences column to numeric type

  2. Reduce 2015/16 fraud figures to total specified amount