knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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:
sitedata
: retrieves hydrology data for given USGS gauge sites for a specified period.rbi_df
: returns calculated RBI values for given USGS sites for a specified period.trends
: returns a data frame containing Mann-Kendall and sens.slope summary statistics for a custom number of sites specified by the user.basin_id
: Check the drainage area, eco-region and classification (reference or non-reference)dam_removal
: retrieves dam removal data from the USGS Gages II website for any number of given gauge station numbers.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")
library(easyrbi) library(tidyverse)
sitedata(c("01564500", "01567000"), "1970-10-01", "1980-09-30") %>% head(10)
rbi_df(c("01564500", "01567000"), "1970-10-01", "1980-09-30")
trends
returns the Mann-Kendall and sens.slope summary statistics for any given USGS gauge sites. data <- rbi_df(c("01564500", "01567000"), "1970-10-01", "1980-09-30") trends(x = data)
basin_id(c("01567000", "01490000", "01492500"))
dam_removal(c("01564500", "01567000"))
dam_trends
returns a dataframe with dam removals and trends statistics from the Mann-Kendall and sens.slope tests.dam_trends(c("01092000", "01100000", "01208500"), "1970-10-01", "1990-09-30")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.