Skip to contents

Return main poverty and inequality statistics

Usage

pip_data(
  country = NULL,
  year = NULL,
  povline = 2.15,
  popshare = NULL,
  fill_gaps = FALSE,
  welfare_type = c("all", "consumption", "income"),
  reporting_level = c("all", "national", "rural", "urban"),
  additional_ind = FALSE,
  release_version = NULL,
  ppp_version = NULL,
  version = NULL
)

Arguments

country

(character()) countries for which statistics are to be computed, specified as ISO3 codes. Default NULL.

year

(character() | numeric()) year(s) for which statistics are to be computed, specified as YYYY. Default NULL.

povline

(numeric(1)) poverty line to be used to compute poverty mesures. Poverty lines are only accepted up to 3 decimals. Default 2.15.

popshare

(numeric(1)) proportion of the population living below the poverty line. Will be ignored if povline is specified. Default NULL.

fill_gaps

(logical(1)) whether to fill gaps in the data. Default FALSE.

welfare_type

(character(1)) type of welfare measure to be used. Default "all".

reporting_level

(character(1)) level of reporting for the statistics. Default "all".

additional_ind

(logical(1)) whether to include additional indicators. Default FALSE.

release_version

(character(1)) version of the data release in YYYYMMDD format. Default NULL.

ppp_version

(character(1) | numeric(1)) version of the data. Default NULL.

version

(character(1)) version of the data. Default NULL.

Value

A data.frame() with the requested statistics.

See also

Other poverty and inequality statistics: pip_aux(), pip_citation(), pip_group(), pip_health_check(), pip_info(), pip_valid_params(), pip_versions()

Examples

# \donttest{
pip_data(c("ZAF", "ZMB"))
#> Error in req_perform(req_url_query(req_error(req_url_path_append(req_user_agent(request("https://api.worldbank.org/pip/v1"),     "worldbank (https://m-muecke.github.io/worldbank)"), resource),     body = pip_error_body), format = format, ...)): HTTP 502 Bad Gateway.
# }