Compute the main PIP poverty and inequality statistics.

pip(
  country = "all",
  year = "all",
  povline = 1.9,
  popshare = NULL,
  fill_gaps = FALSE,
  group_by = c("none", "wb"),
  welfare_type = c("all", "consumption", "income"),
  reporting_level = c("all", "national", "rural", "urban"),
  ppp = NULL,
  lkup,
  debug = FALSE,
  censor = TRUE
)

Arguments

country

character: Country ISO 3 codes

year

integer: Reporting year

povline

numeric: Poverty line

popshare

numeric: Proportion of the population living below the poverty line

fill_gaps

logical: If set to TRUE, will interpolate / extrapolate values for missing years

group_by

character: Will return aggregated values for predefined sub-groups

welfare_type

character: Welfare type

reporting_level

character: Geographical reporting level

ppp

numeric: Custom Purchase Power Parity value

lkup

list: A list of lkup tables

debug

logical: If TRUE poverty calculations from wbpip will run in debug mode

censor

logical: Triggers censoring of country/year statistics

Value

data.table

Examples

if (FALSE) {
# Create lkups
lkups <- create_lkups("<data-folder>")

# A single country and year
pip(country = "AGO",
    year = 2000,
    povline = 1.9,
    lkup = lkups)

# All years for a single country
pip(country = "AGO",
    year = "all",
    povline = 1.9,
    lkup = lkups)

# Fill gaps
pip(country = "AGO",
    year = "all",
    povline = 1.9,
    fill_gaps = TRUE,
    lkup = lkups)

# Group by regions
pip(country = "all",
    year = "all",
    povline = 1.9,
    group_by = "wb",
    lkup = lkups)
}