Skip to contents

Year-over-year case volume plus charges-rate, parsed from the first four characters of date_of_incident_iso.

Usage

morie_siu_by_year(data = NULL)

Arguments

data

Either a data frame (e.g. the output of morie_fetch_siu() read in) or a path to SIU_by_case.csv. NULL (the default) looks in file.path(tempdir(), "morie", "siu", "SIU_by_case.csv").

Value

A morie_rich_result list.

Examples

df <- data.frame(
  date_of_incident_iso = c("2022-01-05", "2022-06-12", "2023-02-18",
                           "2024-03-01", "2024-11-11"),
  charges_recommended = c(TRUE, FALSE, FALSE, TRUE, NA))
r <- morie_siu_by_year(df)
r$payload$by_year
#> $`2022`
#> [1] 2
#> 
#> $`2023`
#> [1] 1
#> 
#> $`2024`
#> [1] 2
#>