Skip to contents

Create the assessment unit and monitoring location ref by utilizing an optional user-supplied crosswalk, AU/ML crosswalk from ATTAINS (if org has entered that data), and TADA_CreateATTAINSAUMLCrosswalk to match unassigned monitoring locations to assessment units.

Usage

TADA_CreateAUMLCrosswalk(
  .data,
  au_ref = NULL,
  org_id = NULL,
  add_catch = FALSE,
  batch_upload = TRUE
)

Arguments

.data

A dataframe created by TADA_DataRetrieval().

au_ref

Optional. A user-supplied df with the columns AssessmentUnitIdentifier and MonitoringLocationIdentifier.

org_id

Organization id to match AUs.

add_catch

Optional. When add_catch = TRUE, catchments are matched to monitoring locations from the user-supplied and ATTAINS crosswalk monitoring locations. Fetching and matching these additional geospatial data will increase the run time of this function significantly. Default is add_catch = FALSE.

batch_upload

Boolean argument. When batch_upload = TRUE, an additional data frame which matches the format required for batch upload to ATTAINS is included in the output. When batch_upload = FALSE, this df is not included in the output. Default is batch_upload = FALSE. If you would like to add new monitoring location data links or retain existing ones in ATTAINS, you will need to run TADA_UpdateATTAINSAUMLCrosswalk on the ATTAINS_batchupload data frame from this function's output.

Value

A list containing a modified TADA data frame with added ATTAINS columns and data frames for ATTAINS data and features for points, lines, polygons and catchments. When batch_upload = TRUE, the list will contain an additional data frame formatted for compatibilty with ATTAINS batch upload for Monitoring_Stations.