Skip to content

Commit

Permalink
Bug fixes for multiple org dups
Browse files Browse the repository at this point in the history
  • Loading branch information
hillarymarler committed Jan 13, 2025
1 parent e09e5b7 commit a489209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions R/ResultFlagsIndependent.R
Original file line number Diff line number Diff line change
Expand Up @@ -1256,8 +1256,6 @@ TADA_FindPotentialDuplicatesMultipleOrgs <- function(.data, dist_buffer = 100,
# group by date, time, characteristic, and rounded result value and determine the number of
# organizations that have those same row values, and filter to those summary rows with more than
# one organization

# HRM note 12/31/24 - pick up work here, some issues w/ TADA.NearbySiteGroup
dups_sum <- dupsprep %>%
dplyr::group_by(ActivityStartDate, ActivityStartTime.Time, TADA.CharacteristicName,
ActivityTypeCode, roundRV, TADA.MonitoringLocationIdentifier,
Expand Down
5 changes: 3 additions & 2 deletions R/Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ utils::globalVariables(c(
"TADA.MonitoringLocationIdentifier.New", "TADA.NearbySites.Flag", "CountSites", "Group",
"Matrix", "n_id", "OrgRank", "rank.default", "Site", "TADA.LatitudeMeasure.New",
"TADA.LongitudeMeasure.New", "TADA.MonitoringLocationName.New",
"TADA.MonitoringLocationTypeName.New"
"TADA.MonitoringLocationTypeName.New", "df_number"
))

# global variables for tribal feature layers used in TADA_OverviewMap in Utilities.R
Expand Down Expand Up @@ -905,7 +905,8 @@ TADA_FindNearbySites <- function(.data, dist_buffer = 100,
dplyr::group_by(NHD.nhdplusid) %>%
dplyr::mutate(n_id = length(TADA.MonitoringLocationIdentifier)) %>%
dplyr::filter(n_id > 1) %>%
dplyr::ungroup()
dplyr::ungroup() %>%
dplyr::filter(!is.na(NHD.nhdplusid))

# remove intermediate object
rm(nhd_catchments)
Expand Down

0 comments on commit a489209

Please sign in to comment.