https://github.com/atsyplenkov/rusler
An R package for soil erosion modeling
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 9 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com, nature.com, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.4%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
An R package for soil erosion modeling
Basic Info
- Host: GitHub
- Owner: atsyplenkov
- License: other
- Language: R
- Default Branch: master
- Homepage: https://atsyplenkov.github.io/rusleR/
- Size: 10.3 MB
Statistics
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 1
- Releases: 2
Created about 4 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "50%",
warning = FALSE,
message = FALSE
)
```
# rusleR
[](https://doi.org/10.5281/zenodo.6992394)
[](https://github.com/atsyplenkov/rusleR/actions)
[](https://cran.r-project.org/package=rusleR)
[)`-yellowgreen.svg)](/commits/master)
[](https://www.tidyverse.org/lifecycle/#experimental)
[](https://www.repostatus.org/#concept)
This package offers an `R` implementation of Universal Soil Loss Equation ([USLE](https://en.wikipedia.org/wiki/Universal_Soil_Loss_Equation)). You can find here a collection of functions to estimate main factors: R-factor, K-factor, LS-factor and C-factor. The package uses[ `terra`](https://github.com/rspatial/terra) and [`Rsagacmd`](https://github.com/stevenpawley/Rsagacmd/) in the background. [`SAGA GIS`](https://sourceforge.net/projects/saga-gis/) need to be installed on your machine as well.
> __Disclaimer!__ This package is under development right now. It was tested on Windows 10 only. However, its operability fully depends on `terra` and `Rsagacmd` packages. Therefore it is expected that `rusleR` should work on Linux-based machines as well.
## Installation
You can install the development version of rusleR from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("atsyplenkov/rusleR")
```
## Example
The brief introduction to the `rusleR` package were made at the [IAHS-WasWac workshop](https://megapolis2022.netlify.app) in December 2022. You can see it on YouTube:
[](https://youtu.be/B2ian7Gmodc?t=5578)
### LS-factor
This is a basic example which shows you how to calculate LS_alpine ([Schmidt et al., 2019](https://www.sciencedirect.com/science/article/pii/S2215016119300056)):
```{r ls_alpine}
library(rusleR)
library(Rsagacmd)
library(terra)
# initiate a saga object
saga <- saga_gis(raster_backend = "terra")
# load DEM
f <- system.file("extdata/dem.tif", package="rusleR")
DEM <- rast(f)
# calculate LS-alpine
ls <- ls_alpine(dem = DEM)
```
As a result of `ls_alpine()` you receive a `SpatRaster` object:
```{r summary}
ls
```
```{r pressure, echo = FALSE}
plot(ls)
```
### R-factor
With the help of `get_glored()` function you can quickly download and crop to AOI a Global Rainfall Erosivity Database map ([GLORED](https://esdac.jrc.ec.europa.eu/content/global-rainfall-erosivity)). It was created by [*Panagos et al.* (2017)](https://www.nature.com/articles/s41598-017-04282-8) based on *in-situ* measurements from 3,625 stations. This GLORED was used to develop a global erosivity map at 30 arc-seconds(~1 km) based on a Gaussian Process Regression(GPR).
```{r glored}
library(rusleR)
library(terra)
f <- system.file("extdata/extent.shp", package="rusleR")
v <- vect(f)
r_factor <- get_glored(v)
```
As a result of `get_glored()` you receive a `SpatRaster` object:
```{r summary_r}
r_factor
```
```{r r_plot, echo = FALSE}
plot(r_factor)
```
## Citation
While `rusleR` does not redistribute the data or provide it in any way, we encourage users to cite original papers when using this package. E.g. to cite Panagos et al. (2017) when using GLORED, Hengl et al. (2017) when using SoilGrids and Schmidt et al. (2019) when using LSalpine:
> Panagos, Panos, Pasquale Borrelli, Katrin Meusburger, Bofu Yu, Andreas Klik, Kyoung Jae Lim, Jae E. Yang, et al. “Global Rainfall Erosivity Assessment Based on High-Temporal Resolution Rainfall Records.” Scientific Reports 7, no. 1 (June 23, 2017): 4175. https://doi.org/10.1038/s41598-017-04282-8.
> Hengl, Tomislav, Jorge Mendes de Jesus, Gerard B. M. Heuvelink, Maria Ruiperez Gonzalez, Milan Kilibarda, Aleksandar Blagotić, Wei Shangguan, et al. “SoilGrids250m: Global Gridded Soil Information Based on Machine Learning.” PLOS ONE 12, no. 2 (February 16, 2017): e0169748. https://doi.org/10.1371/journal.pone.0169748.
> Schmidt, Simon, Simon Tresch, and Katrin Meusburger. “Modification of the RUSLE Slope Length and Steepness Factor (LS-Factor) Based on Rainfall Experiments at Steep Alpine Grasslands.” MethodsX 6 (2019): 219–29. https://doi.org/10.1016/j.mex.2019.01.004.
## To-do list
- [x] K-factor functions
- [x] Watem/Sedem functions
- [x] Vignettes
- [ ] tidy-loader disclaimer (see `tidyterra` package)
- [ ] New radar-based R factor (https://esdac.jrc.ec.europa.eu/themes/satellite-based-global-r-factor)
- [ ] SDR estimation (see [Batista et al., 2021](https://www.sciencedirect.com/science/article/pii/S1364815221000049))
- [ ] Connectivity index (see [Borselli et al., 2008](https://www.sciencedirect.com/science/article/pii/S0341816208000982))
- [ ] IC by [Cavalli et al., 2013](https://www.sciencedirect.com/science/article/pii/S0169555X12002267)
- [ ] SDR by [Vigiak et al., 2012](https://www.sciencedirect.com/science/article/pii/S0169555X11004478)
- [ ] C-factor????
- [ ] Should I use WhiteboxGeo tools in a backend instead of SAGA??
### ACKNOWLEDGEMENTS
_This package was developed in accordance to the Development program of the Interdisciplinary Scientific and Educational School of M.V. Lomonosov Moscow State University "Future Planet and Global Environmental Change"_
Owner
- Name: Anatolii Tsyplenkov
- Login: atsyplenkov
- Kind: user
- Location: New Zealand
- Company: @manaakiwhenua
- Website: anatolii.nz
- Repositories: 80
- Profile: https://github.com/atsyplenkov
Scientist-Geomorphologist and Research Software Engineer, fond of all things geospatial
GitHub Events
Total
- Watch event: 3
Last Year
- Watch event: 3
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- atsyplenkov (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 3.5.0 depends
- terra >= 1.5 depends
- Rsagacmd * imports
- purrr * imports
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/check-r-package v1 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite
.github/workflows/pkgdown.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite