
OTIS a01 – Restrictive Confinement (detailed per-individual)
Source:R/datasets_ontario_tps.R
morie_datasets_otis_a01_restrictive_confinement.RdOTIS a01 – Restrictive Confinement (detailed per-individual)
Usage
morie_datasets_otis_a01_restrictive_confinement(
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 with the canonical 10-col schema
(EndFiscalYear, UniqueIndividual_ID,
Region_AtTimeOfPlacement, Region_MostRecentPlacement,
Gender, Age_Category, MentalHealth_Alert,
SuicideRisk_Alert, SuicideWatch_Alert,
Number_Of_Placements).
Examples
df <- morie_datasets_otis_a01_restrictive_confinement(offline = TRUE)
head(df[, c("EndFiscalYear", "Gender", "Age_Category",
"Number_Of_Placements")])
#> EndFiscalYear Gender Age_Category Number_Of_Placements
#> 1 2022 Male 25 to 49 8
#> 2 2022 Female 18 to 24 1
#> 3 2023 Male 50 to 64 5
#> 4 2023 Male 25 to 49 2
#> 5 2024 Female 50 to 64 12