
Offence-distribution rollup for a TPS crime data.frame
Source:R/tps_all_analyze.R
morie_tps_offence_summary.RdTop-20 OFFENCE / UCR_CODE / CSI_CATEGORY tables (whichever are present).
Examples
# \donttest{
df <- try(morie_datasets_tps_assault(max_features = 200L))
if (!inherits(df, "try-error")) {
res <- try(morie_tps_offence_summary(df, ds_name = "assault"))
if (!inherits(res, "try-error")) str(res, max.level = 1)
}
#> List of 8
#> $ title : chr "TPS offences -- assault"
#> $ call : NULL
#> $ summary_lines :List of 2
#> $ tables :List of 3
#> $ warnings : chr(0)
#> $ interpretation: chr "Offence rollup over 5 incident(s) in the assault dataset."
#> $ payload : list()
#> $ sections : list()
#> - attr(*, "class")= chr [1:3] "morie_tps_result" "morie_rich_result" "list"
# }