
OTIS c07 – Individuals: alerts + hold flags
Source:R/datasets_ontario_tps.R
morie_datasets_otis_c07_individuals_alerts.RdOTIS c07 – Individuals: alerts + hold flags
Usage
morie_datasets_otis_c07_individuals_alerts(
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_c07_individuals_alerts(offline = TRUE)
head(df)
#> EndFiscalYear Alert_Type Gender NumberIndividuals_InCustody
#> 1 2022 Mental Health Alert Male 1200
#> 2 2023 Suicide Risk Alert Female 200
#> 3 2023 Suicide Watch Alert Male 150
#> 4 2024 Mental Health Alert Female 600
#> 5 2024 None Male 4000
#> NumberIndividuals_RestrictiveConfinement NumberIndividuals_Segregation
#> 1 80 55
#> 2 15 10
#> 3 12 8
#> 4 40 28
#> 5 220 150