Data processing, spatial cluster analysis, and metapopulation modelling of PPR 2008 epizootic in Morocco.
# PPR Morocco Metapopulation Model
This repository contains data-processing workflows, spatial analyses, and metapopulation modelling tools for studying peste des petits ruminants (PPR) in Morocco.
The project combines outbreak records, administrative boundaries, sheep and goat population estimates, contact-network data, and simulation-based inference to investigate the spatial and temporal dynamics of PPR.
## Workflow
The numbered directories represent the main analysis workflow:
1. **WAHIS outbreak geocoding**
2. **Livestock-population extraction from GLW3 data**
3. **Outbreak and commune preprocessing**
4. **Spatial and temporal cluster analysis**
5. **Case-fatality-rate estimation**
6. **Metapopulation modelling and simulation-based inference**
## Repository layout
``` text
.
├── 1_wahis_geocoding/
│ ├── README.md
│ ├── regeocode_2026.py
│ └── outbreak geocoding data
├── 2_population_glw3_extraction/
│ ├── README.md
│ ├── GIS_data/
│ ├── dataverse_files_Gt_2010/
│ ├── dataverse_files_Gt_2015/
│ ├── dataverse_files_Sh_2010/
│ ├── dataverse_files_Sh_2015/
│ └── sheep_all_communes.R
├── 3_preprocessing_inputs/
│ ├── adding_region_geocoded_outbreaks.R
│ ├── ppr_2008_outbreak_agg.R
│ └── prep_commune_status.R
├── 4_cluster_analysis/
│ ├── 1_Data/
│ ├── 2_Scripts/
│ └── 3_Outputs/
├── 5_cfr_estimation/
│ ├── Case_fatality_rate.ipynb
│ ├── data_commune.csv
│ └── data_province.csv
├── 6_metapopulation_model/
│ ├── data/
│ ├── diagnostics/
│ ├── outputs/
│ ├── run_calibration.py
│ └── src/
├── requirements.txt
├── r_environment.md
└── README.md
```
## Main components
### WAHIS outbreak geocoding
`1_wahis_geocoding/` contains the outbreak-record geocoding workflow, including the original geocoding data, Nominatim results, and re-geocoding script.
### GLW3 livestock-population extraction
`2_population_glw3_extraction/` contains sheep and goat population inputs, spatial boundary data, raster files, and the R …