elfdata: Retrieve and format data for ELF generation

elfdataR Documentation

Retrieve and format data for ELF generation

Description

Given a HUC code, provides a dataframe of all contained nhdplus segments and their individual NT Total and Mean Annual Flow MAF values

Usage

elfdata(watershed.code, ichthy.localpath)

Arguments

watershed.code

Hydrologic unit code, either HUC6, HUC8, HUC10, or HUC12 (e.g. HUC10 code '0208020101').

ichthy.localpath

Local file path for storing downloaded ichthy data. Defaults to a temp directory.

Value

A dataframe of nhdplus segments containing species richness data (NT Total values) and mean annual flow (MAF) data.

Examples


# We don't run this example by R CMD check, because it takes >10s

# Retrieve dataset of interest
# You may enter either a 6, 8, 10, or 12-digit HUC code.
# By default the ichthy dataset is downloaded to a temp directory, however this may be overridden by
# supplying a local path of interest using the input parameter 'ichthy.localpath'
watershed.df <- elfdata(watershed.code = '0208020104', ichthy.localpath = tempdir())
head(watershed.df)


elfgen documentation built on Aug. 23, 2022, 5:07 p.m.