Replace receiver locations in the detections dataframe with aggregated locations for the Butte region.

aggregate_detections_butte(
  detections,
  receiver_metadata,
  create_detection_history = FALSE
)

Arguments

detections

A dataframe containing detections information.

receiver_metadata

A dataframe containing receiver metadata.

Value

A list containing:

  • A dataframe of detections with replaced receiver locations.

  • A dataframe of aggregated receiver metadata.

Details

This function replaces receiver locations in the detections dataframe with aggregated locations for the Butte region according to the specified replacement dictionary. It aggregates receiver locations into one and calculates the mean River Kilometer (RKM), Latitude, Longitude, and Region for each aggregated location. The function also updates the receiver metadata accordingly.

Examples


# Aggregate detections for Butte region
aggregated_data <- aggregate_detections_butte(detections_data, receiver_metadata)
#> Error in tibble(detection_points = c("UpperButte_RST_Rel", "UpperButte_RST",     "UpperButte_SKWY", "Butte_Blw_Sanborn_Rel", "North_Weir_Rel",     "Sanborn_Slough_Rel", "Laux Rd", "SutterBypass_Weir2_RST_Rel",     "SutterBypass Weir2 RST", "TowerBridge", "I80-50_Br", "ToeDrainBase",     "Hwy84Ferry", "BeniciaE", "BeniciaW", "ChippsE", "ChippsW"),     detection_point_group = c(rep("Releasepoint", 9), rep("Sacramento",         4), rep("Endpoint", 4)), region = c(rep("Release", 9),         rep("Lower Sac R", 4), rep("End", 4))): could not find function "tibble"