Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new MOZ lookup table; fix #89; fix #90; fix #111; fix #112; fix #113; fix #114 #115

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/mirror-codeberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mirror to other git server
on:
push:
branches:
- main
tags:
- "*"
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: yesolutions/mirror-action@master
with:
REMOTE: https://codeberg.org/katilingban/ppitables
GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }}
GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
/revdep/library
/revdep/library.noindex
docs
README.html
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Authors@R: person("Ernest", "Guevarra",
Description: The Poverty Probability Index (PPI) is a poverty measurement tool
for organizations and businesses with a mission to serve the poor. The PPI
is statistically-sound, yet simple to use: the answers to 10 questions about
a households characteristics and asset ownership are scored to compute the
likelihood that the household is living below the poverty line or above by
only a narrow margin. This package contains country-specific lookup data tables
used as reference to determine the poverty likelihood of a household based
on their score from the country-specific PPI questionnaire. These lookup
tables have been extracted from documentation of the PPI found at
a household's characteristics and asset ownership are scored to compute the
likelihood that the household is living below the poverty line - or above by
only a narrow margin. This package contains country-specific lookup data
tables used as reference to determine the poverty likelihood of a household
based on their score from the country-specific PPI questionnaire. These
lookup tables have been extracted from documentation of the PPI found at
<https://www.povertyindex.org> and managed by Innovations for Poverty Action
<https://poverty-action.org/>.
License: MIT + file LICENSE
Expand Down
90 changes: 90 additions & 0 deletions R/00_mozambique.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#'
#' Poverty Probability Index (PPI) lookup table for Mozambique
#'
#' This PPI was created in April 2019 using Mozambique’s 2014/15 Inquérito Sobre
#' Orçamento Familiar Survey and was released in May 2019.
#'
#' @format A data frame with 15 columns and 101 rows:
#' \describe{
#' \item{\code{score}}{PPI score}
#' \item{\code{nl100}}{National poverty line (100)}
#' \item{\code{nl150}}{National poverty line (150)}
#' \item{\code{nl200}}{National poverty line (200)}
#' \item{\code{ppp190}}{Below $1.90 per day purchasing power parity (2011)}
#' \item{\code{ppp320}}{Below $3.20 per day purchasing power parity (2011)}
#' \item{\code{ppp550}}{Below $5.50 per day purchasing power parity (2011)}
#' \item{\code{ppp800}}{Below $8.00 per day purchasing power parity (2011)}
#' \item{\code{ppp1100}}{Below $11.00 per day purchasing power parity (2011)}
#' \item{\code{ppp1500}}{Below $15.00 per day purchasing power parity (2011)}
#' \item{\code{ppp2170}}{Below $21.70 per day purchasing power parity (2011)}
#' \item{\code{percentile20}}{Below 20th percentile poverty line}
#' \item{\code{percentile40}}{Below 40th percentile poverty line}
#' \item{\code{percentile60}}{Below 50th percentile poverty line}
#' \item{\code{percentile80}}{Below 60th percentile poverty line}
#' }
#'
#' @examples
#' # Access Mozambique PPI table
#' ppiMOZ2019
#'
#' # Given a specific PPI score (from 0 - 100), get the row of poverty
#' # probabilities from PPI table it corresponds to
#' ppiScore <- 50
#' ppiMOZ2019[ppiMOZ2019$score == ppiScore, ]
#'
#' # Use subset() function to get the row of poverty probabilities corresponding
#' # to specific PPI score
#' ppiScore <- 50
#' subset(ppiMOZ2019, score == ppiScore)
#'
#' # Given a specific PPI score (from 0 - 100), get a poverty probability
#' # based on a specific poverty definition. In this example, the national
#' # poverty line is used
#' ppiScore <- 50
#' ppiMOZ2019[ppiMOZ2019$score == ppiScore, "nl100"]
#'
#' @source \url{https://www.povertyindex.org}
#'
"ppiMOZ2019"


#'
#' Poverty Probability Index (PPI) lookup table for Mozambique
#'
#' The latest version of the PPI for Mozambique was created in June 2024 by
#' Innovations for Poverty Action (IPA) based on data from the 2022 Demographic
#' and Health Survey (DHS).
#'
#' @format A data frame with 6 columns and 101 rows:
#' \describe{
#' \item{\code{score}}{PPI score}
#' \item{\code{percentile20}}{Below 20th percentile poverty line}
#' \item{\code{percentile40}}{Below 40th percentile poverty line}
#' \item{\code{percentile50}}{Below 50th percentile poverty line}
#' \item{\code{percentile60}}{Below 60th percentile poverty line}
#' \item{\code{percentile80}}{Below 80th percentile poverty line}
#' }
#'
#' @examples
#' # Access Mozambique PPI table
#' ppiMOZ2024
#'
#' # Given a specific PPI score (from 0 - 100), get the row of poverty
#' # probabilities from PPI table it corresponds to
#' ppiScore <- 50
#' ppiMOZ2024[ppiMOZ2024$score == ppiScore, ]
#'
#' # Use subset() function to get the row of poverty probabilities
#' # corresponding to specific PPI score
#' ppiScore <- 50
#' subset(ppiMOZ2024, score == ppiScore)
#'
#' # Given a specific PPI score (from 0 - 100), get a poverty probability
#' # based on a specific poverty definition. In this example, the national
#' # poverty line is used
#' ppiScore <- 50
#' ppiMOZ2024[ppiMOZ2024$score == ppiScore, "percentile80"]
#'
#' @source \url{https://www.povertyindex.org}
#'
"ppiMOZ2024"
49 changes: 0 additions & 49 deletions R/04_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -2641,55 +2641,6 @@
################################################################################
"ppiGHA2019"

################################################################################
#
#' Poverty Probability Index (PPI) lookup table for Mozambique
#'
#' @format A data frame with 15 columns and 101 rows:
#' \describe{
#' \item{\code{score}}{PPI score}
#' \item{\code{nl100}}{National poverty line (100)}
#' \item{\code{nl150}}{National poverty line (150)}
#' \item{\code{nl200}}{National poverty line (200)}
#' \item{\code{ppp190}}{Below $1.90 per day purchasing power parity (2011)}
#' \item{\code{ppp320}}{Below $3.20 per day purchasing power parity (2011)}
#' \item{\code{ppp550}}{Below $5.50 per day purchasing power parity (2011)}
#' \item{\code{ppp800}}{Below $8.00 per day purchasing power parity (2011)}
#' \item{\code{ppp1100}}{Below $11.00 per day purchasing power parity (2011)}
#' \item{\code{ppp1500}}{Below $15.00 per day purchasing power parity (2011)}
#' \item{\code{ppp2170}}{Below $21.70 per day purchasing power parity (2011)}
#' \item{\code{percentile20}}{Below 20th percentile poverty line}
#' \item{\code{percentile40}}{Below 40th percentile poverty line}
#' \item{\code{percentile60}}{Below 50th percentile poverty line}
#' \item{\code{percentile80}}{Below 60th percentile poverty line}
#' }
#'
#' @examples
#' # Access Mozambique PPI table
#' ppiMOZ2019
#'
#' # Given a specific PPI score (from 0 - 100), get the row of poverty
#' # probabilities from PPI table it corresponds to
#' ppiScore <- 50
#' ppiMOZ2019[ppiMOZ2019$score == ppiScore, ]
#'
#' # Use subset() function to get the row of poverty probabilities corresponding
#' # to specific PPI score
#' ppiScore <- 50
#' subset(ppiMOZ2019, score == ppiScore)
#'
#' # Given a specific PPI score (from 0 - 100), get a poverty probability
#' # based on a specific poverty definition. In this example, the national
#' # poverty line is used
#' ppiScore <- 50
#' ppiMOZ2019[ppiMOZ2019$score == ppiScore, "nl100"]
#'
#' @source \url{https://www.povertyindex.org}
#'
#
################################################################################
"ppiMOZ2019"

################################################################################
#
#' Poverty Probability Index (PPI) lookup table for Myanmar
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
Loading
Loading