Skip to contents

OTIS c06 – Individuals by age category x region

Usage

morie_datasets_otis_c06_individuals_age_by_region(
  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_c06_individuals_age_by_region(offline = TRUE)
head(df)
#>   EndFiscalYear Region_MostRecentPlacement Age_Category
#> 1          2022                    Toronto     18 to 24
#> 2          2023                    Eastern     25 to 49
#> 3          2023                    Central     50 to 64
#> 4          2024                    Western  65 and over
#> 5          2024                   Northern     25 to 49
#>   NumberIndividuals_RestrictiveConfinement NumberIndividuals_Segregation
#> 1                                       45                            30
#> 2                                      200                           140
#> 3                                       80                            55
#> 4                                       20                            15
#> 5                                       90                            65