/
README.Rmd
51 lines (37 loc) · 1.91 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# umbrella <img src="man/figures/umbrella_hex.png" align="right" width=30% height=30% />
<!-- badges: start -->
[![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: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
<!-- badges: end -->
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
<img src="man/figures/eq.png" />
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.