For each OTIS dataset, this function expects a list of column
specifications. By default it constructs the specs from the
columns in DATASET_REGISTRY (in R, these are stored on the
Python side via the dictionary parser; on the R side we fall
back to a minimal name-only list and rely on the heuristic
classifier when dtype/valid_values are unknown).
Usage
morie_audit_otis_variables(dataset_specs = NULL)
Arguments
- dataset_specs
Optional list keyed by dataset id, each entry
a list of list(name, dtype, valid_values) entries. When
NULL, the function uses a built-in minimal spec extracted
from the existing R-side OTIS metadata.
Value
A list with class morie_audit_result.
Details
For a richer audit that consults the bilingual XLSX dictionary,
use the Python module morie.audit_variables.
Examples
spec <- function(nm, dt, vv = NULL) list(name = nm, dtype = dt, valid_values = vv)
specs <- list(v1 = list(spec("UniqueIndividual_ID", "string"),
spec("NumberConsecutiveDays_Segregation", "int")))
res <- morie_audit_otis_variables(specs)
res$domain
#> [1] "otis"