Get grouped stats from the PIP API.

get_gd(
  cum_welfare = NULL,
  cum_population = NULL,
  estimate = c("stats", "lorenz", "params"),
  requested_mean = NULL,
  povline = NULL,
  popshare = NULL,
  lorenz = NULL,
  n_bins = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  simplify = TRUE,
  server = NULL
)

Arguments

cum_welfare

numeric: Cumulative welfare values, expressed in shares. Any length. They should be monotonically increasing, and sum to 1.

cum_population

numeric: Cumulative population values, expressed in shares. Any length. They should be monotonically increasing, and sum to 1.

estimate

character: One of "stats", "lorenz", "params".

requested_mean

numeric: Requested mean.

povline

numeric: Poverty line. Required for estimate = "stats".

popshare

numeric: Proportion of the population living below the poverty line

lorenz

character: Lorenz curve methodology. Either "lb" or "lq".

n_bins

numeric: Number of bins. Required for estimate = "lorenz".

api_version

character: API version

format

character: Response format either of c("rds", "json", "csv")

simplify

logical: If TRUE (the default) the response is returned as a tibble

server

character: Server. For WB internal use only

Examples