Skip to contents

Fetches ATTAINS features (state- or tribe- or other entity- submitted points, lines, and polygons representing their assessment units; and the EPA snapshot of the associated NHDPlus HR catchments that the state- or tribe- or other entity- submitted features fall within) within a bounding box produced from a set of TADA spatial features.

Usage

fetchATTAINS(.data, catchments_only = FALSE, org_id = "all")

Arguments

.data

A dataframe developed using TADA_DataRetrieval() or TADA_MakeSpatial().

catchments_only

Whether to return just the summarized ATTAINS catchment features, or both the catchments and raw ATTAINS features. TRUE or FALSE.

org_id

ATTAINS organization identifier(s) as a character string. If populated, Assessment Units will only be fetched from the specified organization(s). A list of organization identifiers can be found by downloading the ATTAINS Domains Excel file: https://www.epa.gov/system/files/other-files/2025-02/domains_2025-02-25.xlsx. Organization identifiers are listed in the "OrgName" tab. The "code" column contains the organization identifiers that should be used for this param. When org_id = "all", Assessment Units from all organizations will be considered. The default is "all".

Value

Spatial features (ATTAINS_catchments, ATTAINS_points, ATTAINS_lines, and ATTAINS_polygons) that are within the spatial bounding box of water quality observations.

Examples

if (FALSE) { # \dontrun{
tada_data <- TADA_DataRetrieval(
  startDate = "1990-01-01",
  endDate = "1990-12-30",
  characteristicName = "pH",
  statecode = "NV",
  applyautoclean = TRUE,
  ask = FALSE
)

nv_attains_features <- EPATADA:::fetchATTAINS(tada_data, catchments_only = FALSE)
} # }