Get data for acoustic detections, with options to filter results. Use
limit
to limit the number of returned records.
Usage
get_acoustic_detections(
connection = con,
start_date = NULL,
end_date = NULL,
acoustic_tag_id = NULL,
animal_project_code = NULL,
scientific_name = NULL,
acoustic_project_code = NULL,
receiver_id = NULL,
station_name = NULL,
limit = FALSE
)
Arguments
- connection
A connection to the ETN database. Defaults to
con
.- start_date
Character. Start date (inclusive) in ISO 8601 format (
yyyy-mm-dd
,yyyy-mm
oryyyy
).- end_date
Character. End date (exclusive) in ISO 8601 format (
yyyy-mm-dd
,yyyy-mm
oryyyy
).- acoustic_tag_id
Character (vector). One or more acoustic tag ids.
- animal_project_code
Character (vector). One or more animal project codes. Case-insensitive.
- scientific_name
Character (vector). One or more scientific names.
- acoustic_project_code
Character (vector). One or more acoustic project codes. Case-insensitive.
- receiver_id
Character (vector). One or more receiver identifiers.
- station_name
Character (vector). One or more deployment station names.
- limit
Logical. Limit the number of returned records to 100 (useful for testing purposes). Defaults to
FALSE
.
Value
A tibble with acoustic detections data, sorted by acoustic_tag_id
and date_time
. See also
field definitions.
Examples
# Set default connection variable
con <- connect_to_etn()
# Get limited sample of acoustic detections
get_acoustic_detections(con, limit = TRUE)
#> # A tibble: 100 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 952330492 2023-12-10 22:04:23 NA R01M-802976
#> 2 952330493 2023-12-10 22:14:10 NA R01M-802976
#> 3 952330494 2023-12-10 22:24:19 NA R01M-802976
#> 4 952330495 2023-12-10 22:34:34 NA R01M-802976
#> 5 952330496 2023-12-10 22:44:40 NA R01M-802976
#> 6 952330497 2023-12-10 22:54:41 NA R01M-802976
#> 7 952330498 2023-12-10 23:04:52 NA R01M-802976
#> 8 952330499 2023-12-10 23:14:30 NA R01M-802976
#> 9 952330500 2023-12-10 23:24:40 NA R01M-802976
#> 10 952330501 2023-12-10 23:34:59 NA R01M-802976
#> # ℹ 90 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get all acoustic detections from a specific animal project
get_acoustic_detections(con, animal_project_code = "2014_demer")
#> # A tibble: 236,918 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 21676626 2014-04-18 15:45:00 1187449 A69-1601-16129
#> 2 22524167 2014-04-18 15:45:09 1187449 A69-1601-16129
#> 3 21919770 2014-04-18 15:47:00 1187449 A69-1601-16129
#> 4 21745679 2014-04-18 15:47:45 1187449 A69-1601-16129
#> 5 21823882 2014-04-18 15:49:00 1187449 A69-1601-16129
#> 6 21976905 2014-04-18 15:49:02 1187449 A69-1601-16129
#> 7 21425044 2014-04-18 15:50:00 1187449 A69-1601-16129
#> 8 20734006 2014-04-18 15:50:03 1187449 A69-1601-16129
#> 9 21095838 2014-04-18 15:51:00 1187449 A69-1601-16129
#> 10 20627256 2014-04-18 15:51:11 1187449 A69-1601-16129
#> # ℹ 236,908 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get 2015 acoustic detections from that animal project
get_acoustic_detections(
con,
animal_project_code = "2014_demer",
start_date = "2015",
end_date = "2016",
)
#> # A tibble: 23,695 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 23629467 2015-05-06 04:11:52 1187468 A69-1601-16148
#> 2 23630262 2015-05-07 15:59:24 1187468 A69-1601-16148
#> 3 23630263 2015-05-07 16:45:38 1187468 A69-1601-16148
#> 4 23630265 2015-05-07 16:56:22 1187468 A69-1601-16148
#> 5 23630267 2015-05-07 17:00:18 1187468 A69-1601-16148
#> 6 23630274 2015-05-07 17:06:13 1187468 A69-1601-16148
#> 7 23630278 2015-05-07 17:08:54 1187468 A69-1601-16148
#> 8 23630285 2015-05-07 17:15:07 1187468 A69-1601-16148
#> 9 23630294 2015-05-07 17:23:21 1187468 A69-1601-16148
#> 10 23630300 2015-05-07 17:27:27 1187468 A69-1601-16148
#> # ℹ 23,685 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get April 2015 acoustic detections from that animal project
get_acoustic_detections(
con,
animal_project_code = "2014_demer",
start_date = "2015-04",
end_date = "2015-05",
)
#> # A tibble: 442 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 23184110 2015-04-03 15:40:26 1171781 A69-1601-26535
#> 2 23184111 2015-04-04 15:46:28 1171781 A69-1601-26535
#> 3 23184112 2015-04-04 15:57:00 1171781 A69-1601-26535
#> 4 23184113 2015-04-04 16:01:08 1171781 A69-1601-26535
#> 5 23184114 2015-04-04 16:26:53 1171781 A69-1601-26535
#> 6 23184115 2015-04-04 16:35:18 1171781 A69-1601-26535
#> 7 23184116 2015-04-04 16:47:53 1171781 A69-1601-26535
#> 8 23184117 2015-04-04 17:10:07 1171781 A69-1601-26535
#> 9 23184118 2015-04-04 17:13:54 1171781 A69-1601-26535
#> 10 23184119 2015-04-04 17:24:01 1171781 A69-1601-26535
#> # ℹ 432 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get April 24, 2015 acoustic detections from that animal project
get_acoustic_detections(
con,
animal_project_code = "2014_demer",
start_date = "2015-04-24",
end_date = "2015-04-25",
)
#> # A tibble: 2 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 23053006 2015-04-24 07:54:12 1171781 A69-1601-26535
#> 2 23053007 2015-04-24 07:56:29 1171781 A69-1601-26535
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get acoustic detections for a specific tag at two specific stations
get_acoustic_detections(
con,
acoustic_tag_id = "A69-1601-16130",
station_name = c("de-9", "de-10")
)
#> # A tibble: 48 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 22308206 2014-04-24 16:12:00 1187450 A69-1601-16130
#> 2 21286383 2014-04-24 16:12:42 1187450 A69-1601-16130
#> 3 21634739 2014-04-24 16:15:00 1187450 A69-1601-16130
#> 4 21844100 2014-04-24 16:15:27 1187450 A69-1601-16130
#> 5 22670703 2014-04-24 16:16:00 1187450 A69-1601-16130
#> 6 21503030 2014-04-24 16:16:57 1187450 A69-1601-16130
#> 7 22094662 2014-04-26 10:22:00 1187450 A69-1601-16130
#> 8 21861085 2014-04-26 10:22:44 1187450 A69-1601-16130
#> 9 22362287 2014-04-26 10:23:00 1187450 A69-1601-16130
#> 10 20667884 2014-04-26 10:23:51 1187450 A69-1601-16130
#> # ℹ 38 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>
# Get acoustic detections for a specific species, receiver and acoustic project
get_acoustic_detections(
con,
scientific_name = "Rutilus rutilus",
receiver_id = "VR2W-124070",
acoustic_project_code = "demer"
)
#> # A tibble: 38 × 21
#> detection_id date_time tag_serial_number acoustic_tag_id
#> <int> <dttm> <chr> <chr>
#> 1 22437907 2014-04-18 16:10:00 1187449 A69-1601-16129
#> 2 21250456 2014-04-18 16:10:52 1187449 A69-1601-16129
#> 3 21697884 2014-04-18 16:12:00 1187449 A69-1601-16129
#> 4 20962095 2014-04-18 16:12:26 1187449 A69-1601-16129
#> 5 22013363 2014-04-18 16:15:00 1187449 A69-1601-16129
#> 6 22153161 2014-04-18 16:15:32 1187449 A69-1601-16129
#> 7 21863649 2014-04-18 16:17:00 1187449 A69-1601-16129
#> 8 21261941 2014-04-18 16:17:05 1187449 A69-1601-16129
#> 9 22308206 2014-04-24 16:12:00 1187450 A69-1601-16130
#> 10 21286383 2014-04-24 16:12:42 1187450 A69-1601-16130
#> # ℹ 28 more rows
#> # ℹ 17 more variables: animal_project_code <chr>, animal_id <int>,
#> # scientific_name <chr>, acoustic_project_code <chr>, receiver_id <chr>,
#> # station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> # depth_in_meters <dbl>, sensor_value <dbl>, sensor_unit <chr>,
#> # sensor2_value <dbl>, sensor2_unit <chr>, signal_to_noise_ratio <int>,
#> # source_file <chr>, qc_flag <lgl>, deployment_id <int>