The pipr package allows R users to compute poverty and inequality
indicators for more than 160 countries and regions from the World Bank’s
database of household surveys. It does so by accessing the Poverty and
Inequality Platform (PIP) API. PIP is a computational tool that allows
users to estimate poverty rates for regions, sets of countries or
individual countries, over time and at any poverty line.
pipr 1.5.0 is available on
CRAN. Install the released
version with:
install.packages("pipr")
You can also install the development version from GitHub:
# devtools::install_github("worldbank/pipr")
install.packages("pipr", repos = c('https://worldbank.r-universe.dev', 'https://cloud.r-project.org'))
This is a basic example that shows how to retrieve some key poverty and inequity statistics.
library(dplyr)
library(pipr)
df <- get_stats(country = "ALB")
glimpse(df)
get_aux("dictionary")