Process datalibweb data: merge PFW data and clean variables
process_data.RdProcess datalibweb data: merge PFW data and clean variables
Arguments
- inv
A one-row
data.frameordata.tablefrom the completed DLW validation inventory containingsurvey_id,status == "valid", anddata_available == "Yes". Rows missing validation fields or havingstatus != "valid"ordata_available != "Yes"are rejected before loading.- aux_list
Named list of auxiliary data frames; expected keys:
"pfw","cpi","ppp","pop","gdp","pce".- recode_spec
Optional pre-resolved recode spec (as returned by
sync_recode_spec()) threaded topd_dlw_clean()/apply_recode_spec()so the spec is read once upstream rather than once per survey. DefaultNULL.- verbose
Logical. Print progress messages. Default
TRUE.- ...
other parameters
Value
Invisibly, a list with element pip_names (character vector of saved
clean pip_id names) when cleaning, post-format validation, and saving
succeed, or NULL when an error or validation failure is logged and caught.
Examples
if (FALSE) { # \dontrun{
release <- "20250203"
pipfun::setup_working_release(release)
pfw <- pipload::load_aux_data("pfw")
gd <- pipload::load_aux_data("CHN", 2015)
gd <- survey_id_to_attr(gd, unique(gd$survey_id))
process_data(gd, pfw)
md <- pipload::load_aux_data(country = "PRY", 2012)
md <- survey_id_to_attr(md, unique(md$survey_id))
process_data(md, pfw)
} # }