Converts raw counts to either percentage or proportion formats.

mv_reformat(.data, statistic, format, output = "long")

Arguments

.data

A tbl created with mv_get_agency

statistic

The statistic to reformat

format

Either "pct" for percentages or "prop" for propotions.

output

Either "long" or "wide"

Value

A tibble with the reformatted data

Details

The statistics that can be reformatted are as follows:

"Stops" or "Stop Rate"

"Searches" or "Search Rate"

"Arrests" or "Arrest Rate"

"Contraband", "Hit Rate", or "Contraband Hit Rate"