-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
81 lines (60 loc) · 2.39 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# pipr
<!-- badges: start -->
[![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)
<!-- badges: end -->
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/},
}
```