This repository contains all code and configuration to reproduce the analyses in the paper:
Wu, X., Sverdrup, E., Mastrandrea, M.D., Wara, M.W., and Wager, S., 2023. Low-intensity fires mitigate the risk of high-intensity wildfires in California's forests. Science Advances, 9(45), p.eadi4123. DOI: 10.1126/sciadv.adi4123
We use a synthetic control approach to analyze twenty years of satellite-based fire activity data across 124,186 km² of forests in California, providing evidence that low-intensity fires substantially reduce the risk of future high-intensity fires.
data_processing/— Scripts to process and harmonize raw geospatial/tabular data for analysisbalancing/— Covariate balancing synthetic control (CBPS) and related utilitiesanalysis/— Outcome analysis, regression, and figure/table generationEmbeddings/scripts/— Embedding generation, K-selection, and integration with CBPS (Python & R)diagnostics/— Diagnostics scripts and results for pipeline validationconfig/— Central configuration files (editconfig/config.yamlfor all parameters)env/— Environment and dependency files for R and Pythoninfra/— Infrastructure utilities (e.g., HPC scripts)data/— Raw, processed, and output data directories (with README files for structure)figures/,tables/,docs/— Project documentation, figures, and tablestests/— Unit and integration tests for pipeline validation
- Clone the repository
- Install dependencies
- R:
env/environment-capstone-r-spatial.yml - Python:
env/requirements-extra.txt
- R:
- Edit configuration
- Set all parameters in
config/config.yaml
- Set all parameters in
- Run the pipeline
- Use
main.Rfor end-to-end execution
- Use
- Data preparation (
data_processing/) - Embedding extraction and K-selection (
Embeddings/scripts/) - CBPS with selected controls (
balancing/,Embeddings/scripts/) - Outcome analysis and figure/table generation (
analysis/,figures/,tables/) - Diagnostics and reporting (
diagnostics/)
| Data | Source | Spatial Resolution | Time Resolution | Time Periods |
|---|---|---|---|---|
| Active Fires | MODIS FIRMS | 1 km² | daily | 2000– |
| Meteorological | Daymet | 1 km² | daily | 2000– |
| Disturbance Agents | Dataverse | 30 m² | yearly | 2000– |
| Fractional Vegetation Cover | Dataverse | 30 m² | yearly | 2000– |
| Vegetation Class | CAL FIRE | 30 m² | one time | 1990–2014 |
| Topography | GMTED | 1 km² | one time | 2010 |
| Fire Severity | MTBS | 30 m² | yearly | 2000– |
| Fire Severity | RAVG | 30 m² | yearly | 2012– |
| Prescribed fires | Federal FACTS | unspecified | yearly | 2000– |
| Prescribed fires | CAL FIRE | unspecified | yearly | 2000– |
All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials and Online Repository. Those interested in the original data can contact the corresponding author.
- All scripts use logging/message for output (no print/cat)
- All scripts have module-level and function-level docstrings
- All configuration is centralized in
config/config.yaml - All data directories contain README files describing structure
.gitignoreexcludes large/intermediate data and outputs
Rscript Embeddings/scripts/04_run_cbps_with_selected_controls.R <year> <selected_units_csv> <output_prefix> <train_start> <train_end> <test_start> <test_end> [flags]Or run the full pipeline with:
Rscript main.RIf you use this code or data, please cite:
- Wu, X., Sverdrup, E., Mastrandrea, M.D., Wara, M.W., and Wager, S., 2023. Low-intensity fires mitigate the risk of high-intensity wildfires in California's forests. Science Advances, 9(45), p.eadi4123. DOI: 10.1126/sciadv.adi4123
See LICENSE file. Authors/funders retain copyright.
For detailed documentation, see the docs/ directory and in-script docstrings.