Skip to contents

Adds or updates ATTAINS.WaterType using TADA.MonitoringLocationTypeName. By default, only missing ATTAINS.WaterType values are populated.

Adds or updates ATTAINS.WaterType using TADA.MonitoringLocationTypeName. By default, only missing ATTAINS.WaterType values are populated.

Usage

TADA_UpdateATTAINSWaterTypes(
  .data,
  org_id = NULL,
  org_only = FALSE,
  replace_all = FALSE
)

TADA_UpdateATTAINSWaterTypes(
  .data,
  org_id = NULL,
  org_only = FALSE,
  replace_all = FALSE
)

Arguments

.data

A TADA data frame.

org_id

Character string. Optional organization ID used to prioritize organization-specific ATTAINS values.

org_only

Logical. If TRUE, only org-specific ATTAINS values are used. If FALSE, unmatched types fall back to the TADA default crosswalk.

replace_all

Logical. If TRUE, replace all ATTAINS.WaterType values. If FALSE, only fill missing values. Default is FALSE.

Value

A TADA data frame with ATTAINS.WaterType populated.

A TADA data frame with ATTAINS.WaterType populated.

Examples


if (FALSE) { # \dontrun{

# example for MT data
testdat <- Data_MT_MissoulaCounty

crosswalk <- TADA_UpdateATTAINSWaterTypes(testat, org_Id = "MTDEQ")
} # }

if (FALSE) { # \dontrun{

# example for MT data
testdat <- Data_MT_MissoulaCounty

crosswalk <- TADA_UpdateATTAINSWaterTypes(testat, org_Id = "MTDEQ")
} # }