Import historical distortions survey data from dp-data
Usage
read_distortions(
path = Sys.getenv("DP_DATA_ROOT", unset = "../dp-data"),
source_manifest = NULL
)Arguments
- path
Root of a dp-data checkout or release archive. Defaults to
DP_DATA_ROOT, or../dp-data.- source_manifest
Optional data frame with
fileandsha256columns pinning both benchmark files. Defaults to the bundled source manifest. Supply reviewed checksums explicitly when adopting a different snapshot.
Value
A validated survey-only bundle, with source hashes and an import ledger.
Source scales are already normalized to [0,1]; midpoint 0.5 follows the
replication's explicit convention. Source wave column names are retained.
Exact duplicates ignoring X are removed and logged. Missing source person
identifiers receive marked row IDs; conflicting nonmissing IDs are errors.
Examples
if (dir.exists("../dp-data/evidence")) read_distortions("../dp-data")