-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
76 lines (56 loc) · 2.45 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
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%"
)
```
# HBVr <img src='man/figures/logo.webp' align="right" height="139" />
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/atsyplenkov/HBVr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/atsyplenkov/HBVr/actions/workflows/R-CMD-check.yaml)
[![](https://img.shields.io/github/last-commit/atsyplenkov/HBVr.svg)](https://github.com/atsyplenkov/HBVr/commits/master)
[![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)
[![codecov](https://codecov.io/gh/atsyplenkov/HBVr/branch/master/graph/badge.svg?token=8OF8L07CTG)](https://codecov.io/gh/atsyplenkov/HBVr)
<!-- badges: end -->
The goal of HBVr is to ease the accessebility of HBV Global Parameter maps created by Beck et al. ([2020](http://www.gloh2o.org/hbv/)). Therefore this one-function package allows to download any of the cross-validation folds for your particular area of interest (AOI).
## Installation
You can install the development version of HBVr from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("atsyplenkov/HBVr")
```
## Disclaimer
While `HBVr` does not redistribute the data or provide it in any way, we encourage users to cite original papers when using this package:
> Beck HE, Pan M, Lin P, Seibert J, van Dijk AIJM, Wood EF. 2020. Global Fully Distributed Parameter Regionalization Based on Observed Streamflow From 4,229 Headwater Catchments. Journal of Geophysical Research: Atmospheres 125 : e2019JD031485. DOI: 10.1029/2019JD03148
## Example
You can download mean zonal statistics
```{r message=FALSE, warning=FALSE}
library(HBVr)
# Locate the shapefile
f <- system.file("ex/lux.shp", package="terra")
# Read it as SpatVector
v <- vect(f)
zonal_stat <-
hbv_get_parameters(
aoi = v,
folds = 1,
mean = TRUE
)
zonal_stat
```
or retrieve a `SpatRaster` objects:
```{r}
rasters <-
hbv_get_parameters(
aoi = v,
folds = 1,
mean = FALSE
)
plot(rasters[[1]])
```