
OTIS d07 – Deaths in custody alerts x housing unit
Source:R/datasets_ontario_tps.R
morie_datasets_otis_d07_alerts_by_housing_unit.RdOTIS d07 – Deaths in custody alerts x housing unit
Usage
morie_datasets_otis_d07_alerts_by_housing_unit(
offline = TRUE,
resource_id = NULL,
source = NULL
)Arguments
- offline
If
TRUE(default), read the included synthetic fixture. IfFALSE, hit Ontario CKAN (resource_idrequired).- resource_id
Optional CKAN resource id (required for live).
- source
One of
NULL(default, ships an empty 0-row frame with the documented schema when no real CKAN row is included),"real"(force the real CKAN sample included ininst/extdata/, error if absent), or"synth"(return a deterministicset.seed()synthetic for didactic examples).
Value
A data.frame of the requested dataset (a 0-row typed frame when the data is unavailable offline).
Examples
df <- morie_datasets_otis_d07_alerts_by_housing_unit(offline = TRUE)
head(df)
#> Year Alert_Type Housing_Type Number_CustodialDeaths
#> 1 2022 Mental Health Alert General Population 2
#> 2 2022 Suicide Risk Alert Segregation 1
#> 3 2023 Mental Health Alert Health Care Unit 5
#> 4 2023 None General Population 7
#> 5 2024 Suicide Watch Alert Segregation 1