Tidies police outcomes, as given by load_police_outcomes, to a tidy data format, specified below.

tidy_police_outcomes(police_outcomes)

Arguments

police_outcomes

A dataframe containing the police outcomes open data.

Value

Returns a dataframe with columns

financial_yearThe financial year to which the data refers.
financial_quarterThe financial quarter (Q1 starting April) to which the data refers.
force_nameThe police force from which the data is acquired.
offenceThe name of the offence in HO format (same as ONS format).
offence_groupThe name of the offence group (does not include summary or other).
offence_subgroupThe name of the offence subgroup.
offence_codeThe categorical code used in HO and ONS publications for offences.
offence_code_expiredIndicates whether offence_code is still in use, character column.
outcomeName of police outcome at lowest level.
outcome_groupName of police outcome group.
outcome_codeCategorical code of police outcome.
number_offencesNumber of outcomes for offences recorded in quarter.
number_outcomesNumber of outcomes recorded in quarter.

Details

The police outcomes open data is already given in a tidy data format, as of writing this documentation, this function only changes the names of columns. It is expected that if the data format changes in future then this function will be updated consequently. We expect this data to be cleaned by clean_police_outcomes.