Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/worldbank/pipr

R client to the PIP API
https://github.com/worldbank/pipr

global-poverty poverty r worldbank

Last synced: about 2 months ago
JSON representation

R client to the PIP API

Awesome Lists containing this project

README

        

---
output: github_document
---

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

# pipr

[![R-CMD-check](https://github.com/worldbank/pipr/workflows/R-CMD-check/badge.svg)](https://github.com/worldbank/pipr/actions?workflow=R-CMD-check)
[![test-coverage](https://github.com/worldbank/pipr/workflows/test-coverage/badge.svg)](https://github.com/worldbank/pipr/actions)
[![pkgdown](https://github.com/worldbank/pipr/workflows/pkgdown/badge.svg)](https://github.com/worldbank/pipr/actions)
[![Codecov test coverage](https://codecov.io/gh/worldbank/pipr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/worldbank/pipr?branch=main)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#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](https://github.com/) with:

``` r
# 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

```{r example, warning=FALSE, message=FALSE}
library(dplyr)
library(pipr)

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

### Access data dictionary
```{r}
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/},
}
```