Evidence Synthesis for the MoDD Africa Project
# moddafricaes : MoDD Africa Evidence Synthesis
Tools to collate, analyse and communicate evidence for the **MoDD
Africa** project. The package currently focuses on a single end-to-end
pipeline for **ERA5-Land** climate reanalysis: derive a study-area
bounding box from a shapefile, download hourly NetCDFs from the
Copernicus Climate Data Store (CDS), and transform them into
analysis-ready Parquet (hourly or monthly) or GeoTIFF (monthly min / max
temperature).
## Installation
`moddafricaes` is not on CRAN. Pick whichever GitHub-install path
matches your tooling:
``` r
# 1. pak (recommended; resolves system deps too)
# install.packages("pak")
pak::pak("modd-africa/moddafricaes")
# 2. remotes
# install.packages("remotes")
remotes::install_github("modd-africa/moddafricaes")
# 3. devtools
# install.packages("devtools")
devtools::install_github("modd-africa/moddafricaes")
# 4. A specific branch, tag, or commit
pak::pak("modd-africa/moddafricaes@main")
pak::pak("modd-africa/moddafricaes@v0.1.0")
# 5. From a local clone (e.g. for development)
# git clone
github.com
# cd moddafricaes
# R -e 'devtools::install()' # or: pak::local_install(".")
```
You will also need a Copernicus CDS account and an API key exported as
`CDS_API_KEY` (see ).
## Functions
| Function | Stage | Output |
|----|----|----|
| `get_bounding_box()` | Setup | `c(N, W, S, E)` numeric vector (CDS) |
| `extract_era5land()` | Download | One NetCDF per (year, month) |
| `transform_era5land()` | Transform | One Parquet per year (hourly) |
| `transform_era5land_monthly()` | Transform | One Parquet (monthly means) |
| `transform_era5land_minmax()` | Transform | GeoTIFF stacks of monthly T2m min/max |
All bounding boxes throughout the package are in Copernicus CDS order
**`c(N, W, S, E)`**, not `sf::st_bbox()`’s `(xmin, ymin, xmax, ymax)`.
## End-to-end example
``` r
library(moddafricaes)
# 1. Derive a bounding box from any shapefile (zipped shapefiles …