Checks: cells with no usable source population; cells whose exposure is
unavailable because a supplied Lexis-triangle death count is NA; no
other negative/NA exposures; exposure should not exceed 2x population (a
generous plausibility bound). Any of these makes passed = FALSE.
validate_exposure(exposure_df, population_df)Output of the data element of compute_exposure().
The population tibble originally passed in.
list(passed = logical, issues = named list of flagged tibbles).
exposure_df <- tibble::tibble(
nuts3_code = "ES611", year = 2020, age = c(0, 1),
female = c(495, 480), male = c(520, 500), total = c(1015, 980),
is_boundary_year = FALSE, is_missing_source_pop = FALSE
)
population_df <- tibble::tibble(
nuts3_code = "ES611", year = 2020, age = c(0, 1), total = c(1000, 970)
)
validate_exposure(exposure_df, population_df)
#> All exposure validation checks passed.
#> $passed
#> [1] TRUE
#>
#> $issues
#> list()
#>