Skip to contents

Clean data to meet wbpip requirements and formats

Usage

wbpip_clean(df, ...)

Arguments

df

dataframe returned by pd_dlw_clean()

...

Other parameters

Value

dataframe

Examples

md   <- pipload::pip_load_dlw(country = "PRY", 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
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
cpfw <- get_country_pfw(md, pfw)
#> Error in uniqueN(pfw, by = keyVar): object 'pfw' not found
md   <- pd_split_alt_welfare(md, cpfw)
#> Error in pd_split_alt_welfare(md, cpfw): object 'cpfw' not found
x <- pd_dlw_clean(md, cpfw)
y <- wbpip_clean(x[[1]])
#> Error in UseMethod("wbpip_clean"): no applicable method for 'wbpip_clean' applied to an object of class "c('glue', 'character')"
summary(y$weight)
#> Error in summary(y$weight): object 'y' not found


gd   <- pipload::pip_load_dlw("CHN", 2015)
#> ! 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(gd, pfw)
#> Error in uniqueN(pfw, by = keyVar): object 'pfw' not found
gd   <- pd_split_alt_welfare(gd, cpfw)
#> Error in pd_split_alt_welfare(gd, cpfw): object 'cpfw' not found
x    <- pd_dlw_clean(gd, cpfw)
y    <- wbpip_clean(x[[1]])
#> Error in UseMethod("wbpip_clean"): no applicable method for 'wbpip_clean' applied to an object of class "c('glue', 'character')"
y[, unique(area)]
#> Error in eval(expr, envir, enclos): object 'y' not found

gd   <- pipload::pip_load_dlw("ARE", 2019)
#> ! 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(gd, pfw)
#> Error in uniqueN(pfw, by = keyVar): object 'pfw' not found
gd   <- pd_split_alt_welfare(gd, cpfw)
#> Error in pd_split_alt_welfare(gd, cpfw): object 'cpfw' not found
x <- pd_dlw_clean(gd, cpfw)
y <- wbpip_clean(x[[1]])
#> Error in UseMethod("wbpip_clean"): no applicable method for 'wbpip_clean' applied to an object of class "c('glue', 'character')"
y[, unique(area)]
#> Error in eval(expr, envir, enclos): object 'y' not found