knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

easyrbi R Package

Lifecycle: stable R-CMD-check CRAN status

Overview

The easyrbi R package consists of functions that retrieve streamflow data (pCode = 00060) from the USGS website, by using tools in the dataRetrieval package. Another set of functions can be used to calculate the Richards-Baker Flashiness Index (RBI) trends over time for any given gauge stations. The package also contains functions to download time series land use data USGS Gages II collected between 1931-01-01 and 2014-12-31. Some of the functions included in the package:

Installation

You can install the development version of easyrbi from Github:

# If you haven't installed remotes yet, do so:
# install.packages("remotes")
remotes::install_github("amutaya/easyrbi")

Examples

library(easyrbi)
library(tidyverse)

Retrieve USGS gauge station data

Site data

sitedata(c("01564500", "01567000"), "1970-10-01", "1980-09-30") %>% 
  head(10)

Calculate the annul Richards Barker Flashiness Index (RBI)

rbi_df(c("01564500", "01567000"), "1970-10-01", "1980-09-30")

Test time series trends

data <- rbi_df(c("01564500", "01567000"), "1970-10-01", "1980-09-30")

trends(x = data) 

Basin classification and data

Watershed Identification

basin_id(c("01567000", "01490000", "01492500"))

Retrieve land use data

Dam removals

dam_removal(c("01564500", "01567000"))

Dam removals and flashiness trends

dam_trends(c("01092000", "01100000", "01208500"), "1970-10-01", "1990-09-30")


amutaya/easyrbi documentation built on May 9, 2022, 4:04 p.m.