Skip to contents

Population is an exposure. Unknown ethnicity has no Census population denominator and must have NA population. Additional age_band and sex columns identify disjoint strata. Counts may exceed exposure.

Usage

sl_exposure(
  data,
  geography,
  classification = c("5", "19"),
  source = "user_supplied"
)

Arguments

data

A data frame with geography_code, ethnicity and population.

geography

Geography type and vintage, for example msoa21.

classification

Self-defined classification, 5 or 19.

source

Description of a user-supplied exposure.

Value

A tibble with class sl_exposure and an exposure contract.

Examples

sl_exposure(data.frame(
  geography_code = "area1", ethnicity = "White",
  population = 1000
), geography = "example")
#> # A tibble: 1 × 3
#>   geography_code ethnicity population
#>   <chr>          <chr>          <dbl>
#> 1 area1          White           1000