Skip to contents

OTIS b09 – Individuals in segregation by number of times placed

Usage

morie_datasets_otis_b09_seg_n_times(
  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_b09_seg_n_times(offline = TRUE)
head(df)
#>   EndFiscalYear NumberPlacements_Segregation Gender
#> 1          2022                            1   Male
#> 2          2022                            2 Female
#> 3          2023                            3   Male
#> 4          2023                            4 Female
#> 5          2024                    5 or more   Male
#>   NumberIndividuals_Segregation
#> 1                           280
#> 2                            45
#> 3                            30
#> 4                            12
#> 5                            18