Learn R Programming

pipr

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.

Installation

The CRAN package is currently archived. Install the development version from GitHub until it is available on CRAN again:

# From GitHub
devtools::install_github("worldbank/pipr")

Example

This is a basic example that shows how to retrieve some key poverty and inequity statistics.

Retrieve statistics

library(dplyr)
library(pipr)

df <- get_stats(country = "ALB")
glimpse(df)

Access data dictionary

get_aux("dictionary")

Copy Link

Version

Install

install.packages('pipr')

Monthly Downloads

36

Version

1.5.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

R.Andres Castaneda

Last Published

September 30th, 2026

Functions in pipr (1.5.0)

parse_response

parse_response
rename_cols

rename columns in dataframe
pip_is_transient

pip_is_transient
get_versions

Get versions
retry_after

retry_after
unnest_ki

Unnest the key indicators
run_cli

whether or not to run cli or just to show code
set_aux

Set auxiliary table in .pip environment for later call
args_to_string

convert arguments and values of a function to a string to parse into other functions
call_aux

call a table from .pip env
datt_rural

Datt (1998) grouped data for rural india, 1983
check_api

Check internet connection and API status
build_request_old

build_request, OLD version
display_aux

Display available auxiliary tables
change_grouped_stats_to_csv

Convert a grouped-statistics result to a data frame
delete_cache

Deletes content of the cache folder
build_request

Build request version 2
parse_error_body

parse_error_body
get_pip_info

Get PIP info
get_cp

Get Country Profiles
get_cp_ki

Get Country Profiles Key Indicators
get_stats

Get poverty and inequality statistics
get_gd

Get grouped stats
get_aux

Get auxiliary data
datt_urban

Grouped data for urban india, 1983
get_cache_info

Provides some information about cached items