knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of pipload
is to provide a series of tools to load into memory the PIP microdata. You can load and update the inventory of PIP microdata, as well as find the data most recent version of each country-year-survey data point.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("PIP-Technical-Team/pipload")
Load library
library(pipload)
Load Two datasets for Paraguay for the Poverty Calculator tool:
# Find the data available. df <- pip_find_data( country = "PRY", year = c(2017, 2018), tool = "PC" ) df$filename # load the data df2 <- pip_find_data( country = "PRY", year = c(2017, 2018), tool = "PC" ) names(df2)
Load different types of auxiliary data
# Load CPI df <- pip_load_aux("cpi") head(df) # load PPP df <- pip_load_aux("ppp") head(df) # Load GDP df <- pip_load_aux("gdp") head(df) measure <- "cpi" # see versions available df <- pip_load_aux(measure, version = "available") df # Load version of "2020-08-07 10:15:48 EDT" df <- pip_load_aux(measure, version = "20220223154416") head(df) # Load one version before current one (i.e., load previous version) df <- pip_load_aux(measure, version = -1) head(df)
Check if inventory is up to data and udpate
# Update inventory of PRY # pip_inventory("update", country = "PRY") # Load inventory df <- pip_inventory() df$filename[1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.