knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

pipr

R-CMD-check test-coverage pkgdown Codecov test coverage Lifecycle: stable

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

You can install the development version from GitHub with:

# install.packages("devtools")
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_dictionary()

Citation

To cite package pipr in publications use:

  Tony Fujs, Aleksander Eilertsen, Ronak Shah and R. Andrés Castañeda (2022). pipr: Client for the PIP
  API. https://github.com/worldbank/pipr, https://worldbank.github.io/pipr/.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {pipr: Client for the PIP API},
    author = {Tony Fujs and Aleksander Eilertsen and Ronak Shah and R. Andrés Castañeda},
    year = {2022},
    note = {https://github.com/worldbank/pipr,https://worldbank.github.io/pipr/},
  }


worldbank/pipr documentation built on Dec. 22, 2024, 7:08 a.m.