Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrc-ide/umbrella

☂️ Rainfall & Seasonality ☂️
https://github.com/mrc-ide/umbrella

Last synced: 7 days ago
JSON representation

☂️ Rainfall & Seasonality ☂️

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# umbrella

[![R build status](https://github.com/mrc-ide/umbrella/workflows/R-CMD-check/badge.svg)](https://github.com/mrc-ide/umbrella/actions)
[![codecov](https://codecov.io/gh/mrc-ide/umbrella/branch/master/graph/badge.svg)](https://codecov.io/gh/mrc-ide/umbrella)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

Umbrella facilitates access and extraction of CHIRPS rainfall data and fitting of seasonal profiles.

The package leans heavily on data and functionality from:

CHIRPS:
Please see the [CHIRPS website](https://www.chc.ucsb.edu/data/chirps) for more information, usage rights and
[citation infromation](http://legacy.chg.ucsb.edu/data/chirps/#_Citations).

## Installation

Please install from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("mrc-ide/umbrella")
```

We estimate the fourier series representing general seasonal profiles given rainfall in a setting
using the following equation

where `g0`, `g1`, `g2`, `g3`, `h1`, `h2`, `h3` are fitted parameters. This equation
can be fitted as a linear model using Rs `lm` function.

However, we impose an additional constraint when fitting: the rainfall floor. This sets a minimum
lower bound on the value of rainfall. With this constraint we fit the resulting model with the
`optim()` function.