Skip to contents

OTIS b02 – Segregation total days per individual

Usage

morie_datasets_otis_b02_segregation_total_days(
  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_b02_segregation_total_days(offline = TRUE)
head(df)
#>   EndFiscalYear UniqueIndividual_ID Gender Region_MostRecentPlacement
#> 1          2022  2022-SYNTH-001-SEG   Male                    Toronto
#> 2          2023  2023-SYNTH-002-SEG   Male                    Eastern
#> 3          2023  2023-SYNTH-003-SEG Female                    Western
#> 4          2024  2024-SYNTH-004-SEG   Male                   Northern
#> 5          2024  2024-SYNTH-005-SEG Female                    Central
#>   Age_Category TotalAggregatedDays_Segregation
#> 1     25 to 49                              14
#> 2     18 to 24                              30
#> 3     50 to 64                              45
#> 4     25 to 49                               7
#> 5     50 to 64                              60