| Title: | Explore Published Household Indicators from a Gaza Housing Study |
|---|---|
| Description: | Read nine published aggregate household indicators and their bilingual question dictionary from a Gaza housing study. Reconcile denominators with recorded exclusions and check reported percentages against the released counts. The included records are aggregate data; the package does not contain individual participant records. |
| Authors: | Sulaiman M. S. Allouh [aut, cre] |
| Maintainer: | Sulaiman M. S. Allouh <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-11-12 13:39:00 UTC |
| Source: | https://github.com/SulaimanAllouh/gaza-resilient-homes-research |
Check whether the reported percentages agree with the published counts to one decimal place and each denominator plus exclusions sums to the 302 households in the original study. This checks internal arithmetic only; it does not validate the original field records or data collection.
check_indicators(indicators = home_indicators(), dictionary = home_dictionary())check_indicators(indicators = home_indicators(), dictionary = home_dictionary())
indicators |
Data frame with character key |
dictionary |
Data frame with the same set of unique keys and numeric
columns |
A difference of up to 0.05 percentage points is allowed, with a small
floating-point tolerance. At an exact rounding midpoint either adjacent
one-decimal value is accepted, as in the upstream release. Invalid input
such as duplicate or unmatched IDs, missing numeric inputs, non-integral
counts, or a numerator greater than its denominator raises an error.
Arithmetically inconsistent but otherwise valid rows return FALSE.
The function does not test whether edited data are identical to the release.
A data frame in the order of indicators. Each row contains the ID,
counts and exclusions, the reported and unrounded calculated percentages
(reported_pct, calculated_pct), and three logical columns:
rounding_ok, denominator_ok, and ok (both).
home_indicators, home_dictionary
checked <- check_indicators() all(checked$ok) checked[checked$excluded_unknown > 0, c("indicator_id", "excluded_unknown")]checked <- check_indicators() all(checked$ok) checked[checked$excluded_unknown > 0, c("indicator_id", "excluded_unknown")]
Read the two unchanged CSV tables from the Gaza Resilient Homes Research companion, version 0.1.0. Each table has nine rows, one per indicator.
home_indicators() home_dictionary()home_indicators() home_dictionary()
The non-probability household survey included 302 participating households. These marginal counts describe the participating households, not population prevalence. They cannot be joined into household records, combined into a general resilience score, or used to estimate the causal effect of an intervention. Unknown answers and structurally inapplicable answers have different meanings. A single household can contribute to multiple indicators. Use the dictionary before interpreting a denominator.
home_indicators() returns a data frame with indicator_id,
English domain and bilingual labels (domain, label_en,
label_ar), counts (numerator, denominator), the
reported percentage (reported_pct), and the thesis reference
(source_table, printed_page, pdf_page).
home_dictionary() returns a data frame with indicator_id,
question_id, domain_ar, response_category, counts of
excluded answers (excluded_unknown, excluded_structural),
English and Arabic denominator rules and interpretation notes
(denominator_rule_en, denominator_rule_ar,
interpretation_en, interpretation_ar), and questionnaire
page references (instrument_printed_page, instrument_pdf_page).
Use indicator_id to join them.
Sulaiman M. S. Allouh, Gaza Resilient Homes Research: selected household indicators, version 0.1.0. https://github.com/SulaimanAllouh/gaza-resilient-homes-research/releases/tag/v0.1.0
a <- home_indicators() d <- home_dictionary() q37 <- d[d$question_id == "Q37", ] a[a$indicator_id == q37$indicator_id, c("label_en", "numerator", "denominator", "reported_pct")] q37[, c("excluded_unknown", "denominator_rule_en")]a <- home_indicators() d <- home_dictionary() q37 <- d[d$question_id == "Q37", ] a[a$indicator_id == q37$indicator_id, c("label_en", "numerator", "denominator", "reported_pct")] q37[, c("excluded_unknown", "denominator_rule_en")]