Repository for investigating the effects of ASM on child health using DHS data across Africa.
This project will combine:
- Hydrologic watershed data (i.e., spatial hydrologic linkages across space)
- DHS socioeconomic and health data (household-level demographics and health outcomes)
- Artisanal and small-scale mining predictions estimated following Christensen et al. (2025), with extensions
- Regression analysis to estimate the relationship between hydrologic conditions and socioeconomic outcomes
Primary languages: R (analysis, visualization, regression), Python (geospatial preprocessing).
asm-dhs/
├── code/
│ ├── cleaning/ # Data ingestion and cleaning scripts
│ ├── analysis/ # Analysis and modeling scripts
│ └── utils/ # Shared helper functions
├── output/
│ ├── figures/ # Generated plots and maps
│ ├── tables/ # Regression tables, summary statistics
│ └── models/ # Saved model objects (.rds, .rda)
├── docs/ # Project documentation and codebooks
│ └── data-dictionary.md
├── .gitignore
├── .Rprofile
├── asm-dhs.Rproj
├── renv.lock # R package lock file (generated by renv)
└── README.md
Note on data: Raw and processed data should be stored outside github. Recommended structure:
data/raw/data/temp/data/processed/
- R ≥ 4.3.0
- renv for R package management
- (Optional) Python ≥ 3.10 with
geopandas,rasterio,pandas
# 1. Clone the repository
git clone https://github.com/<your-username>/asm-dhs.git
cd asm-dhs
# 2. Open asm-dhs.Rproj in RStudio (or start an R session here)
# 3. Restore the R package environment
Rscript -e "renv::restore()"
# 4. (Optional) Set up Python environment
python -m venv .venv
source .venv/bin/activate
pip install -r python/requirements.txt- Cleaning scripts live under
code/cleaning/and are numbered in run order. - Analysis scripts live under
code/analysis/. - Shared helpers live under
code/utils/. - Runnable scripts should bootstrap with:
source(here::here("code", "utils", "config.R")) source(here::here("code", "utils", "project_paths.R"))
Scripts should be numbered within subdirectory following the order in which they should be run.
This project uses renv to snapshot R package versions. After any package install or update, run:
renv::snapshot()and commit the updated renv.lock.
See docs/data-dictionary.md for the current data layout.
Please read CONTRIBUTING.md before submitting changes. Use task-based branching and tag other contributors for review when merging a branch back to main.