WASH survey analysis for IDP camps in Tawila, North Darfur, Sudan — R tidyverse project for the Global WASH Cluster
# Sudan WASH Survey Analysis
Analysis of WASH (Water, Sanitation, and Hygiene) survey data from IDP camps in Tawila region, North Darfur, Sudan.
## Project Overview
**Assessment Location:** Tawila, North Darfur, Sudan
**Target Population:** IDP Camps A, B, C, D
**Total Population:** 95,696 individuals
**Survey Design:** Stratified systematic cluster sampling
**Sample Size:** 652 households across 35 clusters
**Expected Precision:** ±5.4% overall, ±9-14% per camp (95% CI)
## Data Collection
**Survey Platform:** KoboToolbox
**Data File:** `data/Kobo version_*.xlsx`
**Reference Documents:** `reference/` directory
## Kobo Data Processing
### Quick Start
```r
source("wash_survey_analysis_v3.R")
```
This downloads the latest data from KoboToolbox using the Kobo Export API and creates household-level analysis-ready files.
### Current Approach (v3)
Uses the **Kobo Export API** (`/api/v2/assets/{id}/exports/`) with the following configuration:
- `type = "xls"` - Excel export format
- `lang = "English (en)"` - English labels for values
- `hierarchy_in_labels = FALSE` - Flat column structure
- `multiple_select = "both"` - Creates summary + boolean columns automatically
- `fields_from_all_versions = FALSE` - Latest version only
**Benefits:**
- ✅ Automatic multiple_select processing (no manual code needed)
- ✅ English labels in values (not XML codes)
- ✅ Simplified codebase (~80 lines vs ~264 lines)
- ✅ Uses official Kobo API (more reliable than direct httr calls)
### Outputs
**Household-Level Dataset** (`output/wash_survey_hh_level.xlsx`)
- **371 rows** - One row per household
- **255 columns** - All questions + boolean indicators for multiple_select
- Use for: Demographics, overall WASH indicators, camp comparisons
**Note:** Container repeat groups are NOT expanded in v3. Container-level analysis will be implemented separately.
### Multiple_Select Questions
The Kobo Export API automatically creates boolean columns for each multiple-choice question:
- Values ar …