Skip to contents

Load or update dataset with WDI countries. See details.

Usage

aux_country_list(
  action = c("update", "load"),
  maindir = getOption("pipaux.working_dir"),
  force = FALSE,
  detail = getOption("pipaux.detail.raw")
)

Arguments

action

character: Either "load" or "update". Default is "update". If "update" data will be updated on the system. If "load" data is loaded in memory.

maindir

character: Main directory of project.

force

logical: If TRUE data will be overwritten.

detail

has an option TRUE/FALSE, default value is FALSE

Value

logical if action = "update" or data.table if action = "load"

Details

This function creates a combined dataset of countries in WDI and their respective regional classification by querying wbstats::wb_countries(), as well as reading from the PovcalNet Masterfile to fetch PCN region codes.

The dependency on the PCN Masterfile should be changed in the future.