Skip to contents

Clean data from datalibweb structure (High level)

Usage

pd_dlw_clean(lf, cpfw)

Arguments

lf

List of data frames or single dataframe. In pipeline, the data frames come from pd_split_alt_welfare()

cpfw

data frame with Price framework data for country/survey in df. It is loaded with get_country_pfw(df, pfw). pfw is loaded in pipload::pip_load_aux("pfw")

Value

list with data.tables

Examples

pfw  <- pipload::pip_load_aux("pfw")
#> ! root_dir is not defined. Directory paths will lack network-drive root
#> directory
#> Error: [ENOENT] Failed to search directory '/pip_ingestion_pipeline/pc_data/cache/clean_survey_data': no such file or directory
md   <- pipload::pip_load_dlw(country = "PHL", 2012)
#> ! root_dir is not defined. Directory paths will lack network-drive root
#> directory
#> Error: [ENOENT] Failed to search directory '/pip_ingestion_pipeline/pc_data/cache/clean_survey_data': no such file or directory
cpfw <- get_country_pfw(md, pfw)
#> Error in uniqueN(pfw, by = keyVar): object 'pfw' not found
lf   <- pd_split_alt_welfare(md, cpfw)
#> Error in pd_split_alt_welfare(md, cpfw): object 'cpfw' not found
l    <- pd_dlw_clean(lf, cpfw)
names(l)
#> NULL