Skip to contents

Return aggregation of PIP statistics

Usage

pip_group(
  country = NULL,
  year = NULL,
  povline = 2.15,
  popshare = NULL,
  group_by = c("wb", "none"),
  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

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

year

(NULL | character() | numeric())
Years 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

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

group_by

(character(1))
Aggregate results by pre-defined sub-groups. Default "wb".

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

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

ppp_version

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

version

(NULL | 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_data(), pip_health_check(), pip_info(), pip_valid_params(), pip_versions()

Examples

# \donttest{
grp <- pip_group(c("AFE", "LAC"))
head(grp)
#>                   region_name region_code reporting_year reporting_pop
#> 1 Eastern and Southern Africa         AFE           1981     238043099
#> 2 Eastern and Southern Africa         AFE           1982     245822010
#> 3 Eastern and Southern Africa         AFE           1983     253644643
#> 4 Eastern and Southern Africa         AFE           1984     261458202
#> 5 Eastern and Southern Africa         AFE           1985     269450407
#> 6 Eastern and Southern Africa         AFE           1986     277621771
#>   poverty_line headcount poverty_gap poverty_severity     watts     mean
#> 1         2.15 0.4334075   0.1719340       0.09085693 0.2585860 4.749965
#> 2         2.15 0.4382125   0.1755735       0.09347570 0.2654330 4.686368
#> 3         2.15 0.4449174   0.1804650       0.09713139 0.2751745 4.607832
#> 4         2.15 0.4542198   0.1854066       0.10015009 0.2836250 4.551052
#> 5         2.15 0.4628249   0.1897055       0.10265539 0.2903940 4.481283
#> 6         2.15 0.4562020   0.1866324       0.10107654 0.2861349 4.506459
#>   pop_in_poverty       spr       pg estimate_type
#> 1      103169662 0.6065094 15.32568    projection
#> 2      107722286 0.6093514 15.58490    projection
#> 3      112850912 0.6137755 15.95051    projection
#> 4      118759502 0.6218635 16.25541    projection
#> 5      124708352 0.6277353 16.48575    projection
#> 6      126651611 0.6229176 16.36742    projection
# }