Get Country Profiles

get_cp(
  country = "all",
  povline = 2.15,
  version = NULL,
  ppp_version = 2017,
  release_version = NULL,
  api_version = "v1",
  format = c("arrow", "rds", "json", "csv"),
  simplify = TRUE,
  server = NULL
)

Arguments

country

Uppercase, three-letter country ISO codes or "all".

povline

One finite, non-negative numeric poverty line, or NULL. With ppp_version = 2011, NULL sends 1.9; otherwise the API applies its default poverty line.

version

Data version in YYYYMMDD_PPP_XX_YY_IDENTITY format, or NULL. See get_versions().

ppp_version

One integer-valued numeric PPP year, a four-digit year string, or NULL.

release_version

A valid publication date in YYYYMMDD format, or NULL.

api_version

API version. Currently only "v1" is supported.

format

Response format: "arrow", "rds", "json", or "csv".

simplify

One non-missing logical value. If TRUE (the default), return simplified data.

server

One non-empty server name, or NULL for the production server. For World Bank internal use only.

Value

A tibble of country profile data when simplify = TRUE, or a pip_api list when simplify = FALSE.

Examples

if (interactive()) {
# One country, all years with default ppp_version = 2017
res <- get_cp(country = "AGO")

# All countries, povline = 1.9
res <- get_cp(povline = 1.9)

# All countries and years with default values
res <- get_cp()
}