https://github.com/atsyplenkov/hbvr
https://github.com/atsyplenkov/hbvr
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/atsyplenkov/hbvr
- Owner: atsyplenkov
- License: other
- Created: 2022-08-11T14:11:00.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T13:13:28.000Z (over 2 years ago)
- Last Synced: 2025-03-07T18:12:06.025Z (3 months ago)
- Language: R
- Homepage: https://atsyplenkov.github.io/HBVr/
- Size: 5.96 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
- Citation: CITATION.cff
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%"
)
```# HBVr
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://github.com/atsyplenkov/HBVr/actions/workflows/R-CMD-check.yaml)
[](https://github.com/atsyplenkov/HBVr/commits/master)
[](https://www.repostatus.org/#active)
[](https://codecov.io/gh/atsyplenkov/HBVr)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]])
```