Replaces specific receiver locations in the detections dataframe with aggregated sites, updating their River Kilometer (RKM), Latitude (Lat), Longitude (Lon), and Region accordingly.

aggregate_detections_sacramento(
  detections,
  receiver_metadata,
  create_detection_history = FALSE
)

Arguments

detections

A dataframe containing detections information.

receiver_metadata

A table containing metadata for general release sites. Created using get_reciever_sites_metadata().

Value

A dataframe of detections with aggregated receiver sites and updated metadata.

Details

This function replaces specified receiver locations in the detections dataframe with aggregated sites according to the provided replace dictionary. It updates the River Kilometer (RKM), Latitude (Lat), Longitude (Lon), and Region for the aggregated sites. The function creates a new dataframe containing the aggregated receiver sites' metadata, reflecting the aggregation done.