Check the validity of a Content Group Identifier
Source:R/check_submission_helpers.R
check_content_group_id.Rd
check_content_group_id
checks to see if the provided value belongs to
one of nine currently accepted content group identifiers.
Data
Users are expected to wrangle, aggregate and otherwise implement the logic
expected by EPHT themselves. distiller
will not handle that step, though it
does provides some helpers: collapse_race()
, collapse_ethnicity()
, and
make_months_worse()
.
In order for distiller
to work properly there are some expectations about
the data that must be met:
The data must be a dataframe or tibble
For all
content_group_id
The data must have the following columns: (in any order):month: character - acceptable values: "01", "02", "03" ... "12"
agegroup: numeric - acceptable values: 1-19
county: character - string length of 5, unless unknown, then county = "U"
ethnicity: character - acceptable values: "H", "NH", "U"
race: character - acceptable values: "W", "B", "O", "U"
health_outcome_id: numeric - acceptable values: 1-5
sex: character - acceptable values: "M", "F", "U"
year: numeric - acceptable values: 2001-9999
monthly_count: numeric - acceptable values: >0 and no missing values
For
content_group_id
"CO-ED" and "CO-HOSP" the data must have the additional columns:fire_count: numeric - acceptable values: >0 and no missing values
nonfire_count: numeric - acceptable values: >0 and no missing values
unknown_count: numeric - acceptable values: >0 and no missing values
See also
Other checks:
check_data()
,
check_data_content()
,
check_jurisdiction_code()
,
check_mcn()
,
check_state_fips_code()
,
check_submission()
,
check_submitter_email()
,
check_submitter_name()
,
check_submitter_title()