https://github.com/mrc-ide/umbrella
☂️ Rainfall & Seasonality ☂️
https://github.com/mrc-ide/umbrella
Last synced: 3 months ago
JSON representation
☂️ Rainfall & Seasonality ☂️
- Host: GitHub
- URL: https://github.com/mrc-ide/umbrella
- Owner: mrc-ide
- License: mit
- Created: 2020-03-13T10:12:44.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T16:51:42.000Z (4 months ago)
- Last Synced: 2025-04-14T11:07:32.921Z (3 months ago)
- Language: R
- Homepage: https://mrc-ide.github.io/umbrella/
- Size: 3.24 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
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
[](https://github.com/mrc-ide/umbrella/actions)
[](https://codecov.io/gh/mrc-ide/umbrella)
[](https://www.repostatus.org/#active)
[](https://app.codecov.io/gh/mrc-ide/umbrella)
[](https://github.com/mrc-ide/umbrella/actions/workflows/R-CMD-check.yaml)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.