data_check_sa: Check std. data formatting rules for Southwick dashboards

Description Usage Arguments See Also

View source: R/history.R

Description

This is a variation on data_check that has some differences in required variables and allowed values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_check_sa(
  cust,
  lic,
  sale,
  cust_vars = c("cust_id", "sex", "birth_year", "county_fips"),
  lic_vals = list(type = c("fish", "hunt", "combo", "trap", "other"), duration = 1:99),
  sale_vals = list(year = c(2000:substr(Sys.Date(), 1, 4)), month = 0:15, res = c(1, 0,
    NA)),
  cust_vals = list(sex = c(1, 2, NA), birth_year = c(1870:substr(Sys.Date(), 1, 4),
    NA))
)

Arguments

cust

data frame: customer table (primary key = "cust_id")

lic

data frame: license types table (primary key = "lic_id")

sale

data frame: transactions table (foreign keys = "lic_id", "cust_id")

cust_vars

cust required_vars

lic_vals

lic allowed_values

sale_vals

sale allowed values

cust_vals

sale allowed values

See Also

Other functions for producing license history: drop_na_custid(), load_license(), remove_table(), write_history()


southwick-associates/sadash documentation built on Jan. 6, 2022, 5:17 p.m.