Skip to contents

OTIS b07 – Segregation placements: alerts + hold by gender

Usage

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

Arguments

offline

If TRUE (default), read the included synthetic fixture. If FALSE, hit Ontario CKAN (resource_id required).

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 in inst/extdata/, error if absent), or "synth" (return a deterministic set.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_b07_seg_alerts_by_gender(offline = TRUE)
head(df)
#>   EndFiscalYear          Alert_Type Gender
#> 1          2022 Mental Health Alert   Male
#> 2          2023  Suicide Risk Alert Female
#> 3          2023 Suicide Watch Alert   Male
#> 4          2024 Mental Health Alert Female
#> 5          2024                None   Male
#>   Number_Segregation_Placements_Without_Alert
#> 1                                          80
#> 2                                          30
#> 3                                          12
#> 4                                          45
#> 5                                         200
#>   Number_Segregation_Placements_With_Alert
#> 1                                       40
#> 2                                       15
#> 3                                        8
#> 4                                       20
#> 5                                       60