
OTIS b03 – Segregation placements: alerts + hold by institution
Source:R/datasets_ontario_tps.R
morie_datasets_otis_b03_seg_alerts_by_institution.RdOTIS b03 – Segregation placements: alerts + hold by institution
Usage
morie_datasets_otis_b03_seg_alerts_by_institution(
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_b03_seg_alerts_by_institution(offline = TRUE)
head(df)
#> EndFiscalYear Region_AtTimeOfPlacement Institution_AtTimeOfPlacement
#> 1 2022 Toronto SYNTH Institution 1
#> 2 2023 Eastern SYNTH Institution 2
#> 3 2023 Central SYNTH Institution 3
#> 4 2024 Western SYNTH Institution 4
#> 5 2024 Northern SYNTH Institution 5
#> Alert_Type Alert_Presence Number_SegregationPlacements
#> 1 Mental Health Alert With Alert 8
#> 2 Suicide Risk Alert With Alert 4
#> 3 Suicide Watch Alert With Alert 2
#> 4 Mental Health Alert Without Alert 12
#> 5 None Without Alert 25