Skip to contents

Only deployments that require additional human-in-loop QC will have non-NA values in the human-in-loop columns. Observations in these deployments that do not need additional QC will be assigned a human_in_loop_flag_value of 1.

Usage

adcp_test_human_in_loop(
  dat,
  human_in_loop_table = NULL,
  qc_tests = c("tidal_bin_height", "grossrange")
)

Arguments

dat

Data frame of flagged adcp current data in wide format.

human_in_loop_table

Data table with information required to assign the human in the loop flags. Must include the following columns: station, depl_id, variable, timestamp_utc_min, timestamp_utc_max, qc_test_column (qc flag column that is being upgraded), qc_flag_value (existing flag value for qc_test_column), human_in_loop_flag_value, and human_in_loop_comment (will be included in the dataset).

qc_tests

Character vector of quality control tests that have been applied to dat. Passed to qc_pivot_longer(). Default is: qc_tests = c("bin_height", "grossrange").

Value

Returns dat with a human_in_loop_flag column for each variable and a corresponding hil_comment column.

Details

There is only one column for comments, hil_comment. This is to reduce the total number of columns in the wide data set. The trade off is that the comment will appear to apply to all variables. To avoid confusion in this situation, comments should be pre-pended with the variable they refer to, e.g., "sea water speed outlier not flagged by grossrange test".