Skip to contents

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 or yyyy).

end_date

Character. End date (exclusive) in ISO 8601 format ( yyyy-mm-dd, yyyy-mm or yyyy).

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 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  24296745 2015-03-22 17:08:17 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  2  24296749 2015-03-22 17:13:46 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  3  24296751 2015-03-22 17:15:46 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  4  24296756 2015-03-22 17:21:32 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  5  24296758 2015-03-22 17:24:10 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  6  24296762 2015-03-22 17:26:22 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  7  24296765 2015-03-22 17:27:44 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  8  24296767 2015-03-22 17:29:24 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#>  9  24296770 2015-03-22 17:31:42 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#> 10  24296775 2015-03-22 17:38:16 1172834 A69-16… 2015_h…     251 Homaru… bpns   
#> # … with 90 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code

# Get all acoustic detections from a specific animal project
get_acoustic_detections(con, animal_project_code = "2014_demer")
#> # A tibble: 236,918 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  21676626 2014-04-18 15:45:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  2  22524167 2014-04-18 15:45:09 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  3  21919770 2014-04-18 15:47:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  4  21745679 2014-04-18 15:47:45 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  5  21823882 2014-04-18 15:49:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  6  21976905 2014-04-18 15:49:02 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  7  21425044 2014-04-18 15:50:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  8  20734006 2014-04-18 15:50:03 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  9  21095838 2014-04-18 15:51:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#> 10  20627256 2014-04-18 15:51:11 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#> # … with 236,908 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code

# 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 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  23629467 2015-05-06 04:11:52 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  2  23630262 2015-05-07 15:59:24 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  3  23630263 2015-05-07 16:45:38 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  4  23630265 2015-05-07 16:56:22 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  5  23630267 2015-05-07 17:00:18 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  6  23630274 2015-05-07 17:06:13 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  7  23630278 2015-05-07 17:08:54 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  8  23630285 2015-05-07 17:15:07 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#>  9  23630294 2015-05-07 17:23:21 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#> 10  23630300 2015-05-07 17:27:27 1187468 A69-16… 2014_d…     306 Petrom… dijle  
#> # … with 23,685 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code

# 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 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  23184110 2015-04-03 15:40:26 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  2  23184111 2015-04-04 15:46:28 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  3  23184112 2015-04-04 15:57:00 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  4  23184113 2015-04-04 16:01:08 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  5  23184114 2015-04-04 16:26:53 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  6  23184115 2015-04-04 16:35:18 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  7  23184116 2015-04-04 16:47:53 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  8  23184117 2015-04-04 17:10:07 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#>  9  23184118 2015-04-04 17:13:54 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#> 10  23184119 2015-04-04 17:24:01 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#> # … with 432 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code

# 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 × 20
#>   detectio…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#> 1   23053006 2015-04-24 07:54:12 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#> 2   23053007 2015-04-24 07:56:29 1171781 A69-16… 2014_d…     369 Siluru… zeesch…
#> # … with 12 more variables: receiver_id <chr>, station_name <chr>,
#> #   deploy_latitude <dbl>, deploy_longitude <dbl>, sensor_value <dbl>,
#> #   sensor_unit <chr>, sensor2_value <dbl>, sensor2_unit <chr>,
#> #   signal_to_noise_ratio <int>, source_file <chr>, qc_flag <chr>,
#> #   deployment_id <int>, and abbreviated variable names ¹​detection_id,
#> #   ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code, ⁵​animal_id,
#> #   ⁶​scientific_name, ⁷​acoustic_project_code

# 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 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  22308206 2014-04-24 16:12:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  2  21286383 2014-04-24 16:12:42 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  3  21634739 2014-04-24 16:15:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  4  21844100 2014-04-24 16:15:27 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  5  22670703 2014-04-24 16:16:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  6  21503030 2014-04-24 16:16:57 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  7  22094662 2014-04-26 10:22:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  8  21861085 2014-04-26 10:22:44 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#>  9  22362287 2014-04-26 10:23:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#> 10  20667884 2014-04-26 10:23:51 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#> # … with 38 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code

# 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 × 20
#>    detecti…¹ date_time           tag_s…² acous…³ anima…⁴ anima…⁵ scien…⁶ acous…⁷
#>        <int> <dttm>              <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1  22437907 2014-04-18 16:10:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  2  21250456 2014-04-18 16:10:52 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  3  21697884 2014-04-18 16:12:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  4  20962095 2014-04-18 16:12:26 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  5  22013363 2014-04-18 16:15:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  6  22153161 2014-04-18 16:15:32 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  7  21863649 2014-04-18 16:17:00 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  8  21261941 2014-04-18 16:17:05 1187449 A69-16… 2014_d…     304 Rutilu… demer  
#>  9  22308206 2014-04-24 16:12:00 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#> 10  21286383 2014-04-24 16:12:42 1187450 A69-16… 2014_d…     305 Rutilu… demer  
#> # … with 28 more rows, 12 more variables: receiver_id <chr>,
#> #   station_name <chr>, deploy_latitude <dbl>, deploy_longitude <dbl>,
#> #   sensor_value <dbl>, sensor_unit <chr>, sensor2_value <dbl>,
#> #   sensor2_unit <chr>, signal_to_noise_ratio <int>, source_file <chr>,
#> #   qc_flag <chr>, deployment_id <int>, and abbreviated variable names
#> #   ¹​detection_id, ²​tag_serial_number, ³​acoustic_tag_id, ⁴​animal_project_code,
#> #   ⁵​animal_id, ⁶​scientific_name, ⁷​acoustic_project_code