Skip to contents

Wraps the Ontario "Data on Inmates in Ontario" d01 resource. Schema: Year, UniqueIndividual_ID, Region_AtTimeOfDeath, HousingUnit_Type, MedicalCauseofDeath, MeansofDeath.

Usage

morie_datasets_otis_d01_deaths_in_custody(
  offline = TRUE,
  resource_id = NULL,
  source = NULL
)

Arguments

offline

If TRUE (default), read the bundled synthetic fixture from inst/extdata/otis_d01_deaths_in_custody_sample.csv (5 rows). If FALSE, hit the live CKAN datastore-dump JSON endpoint for resource id 89e3b63f-5679-4fa4-b98a-fdd2dc486f29.

resource_id

Optional CKAN resource id override.

source

One of NULL (default, ships an empty 0-row frame with the documented schema when no real CKAN row is bundled), "real" (force the real CKAN sample bundled in inst/extdata/, error if absent), or "synth" (return a deterministic set.seed() synthetic for didactic examples).

Value

A data.frame.

References

Ontario Open Data Catalogue, "Data on Inmates in Ontario" (https://data.ontario.ca/dataset/data-on-inmates-in-ontario); Open Government Licence – Ontario.

Examples

df <- morie_datasets_otis_d01_deaths_in_custody(offline = TRUE)
table(df$Region_AtTimeOfDeath)
#> 
#>  Central  Eastern Northern  Western 
#>        2        1        1        1