Skip to contents

Get data for deployments of acoustic receivers, with options to filter results.

Usage

get_acoustic_deployments(
  connection = con,
  deployment_id = NULL,
  receiver_id = NULL,
  acoustic_project_code = NULL,
  station_name = NULL,
  open_only = FALSE
)

Arguments

connection

A connection to the ETN database. Defaults to con.

deployment_id

Integer (vector). One or more deployment identifiers.

receiver_id

Character (vector). One or more receiver identifiers.

acoustic_project_code

Character (vector). One or more acoustic project codes. Case-insensitive.

station_name

Character (vector). One or more deployment station names.

open_only

Logical. Restrict deployments to those that are currently open (i.e. no end date defined). Defaults to FALSE.

Value

A tibble with acoustic deployment data, sorted by acoustic_project_code, station_name and deploy_date_time. See also field definitions.

Examples

# Set default connection variable
con <- connect_to_etn()

# Get all acoustic deployments
get_acoustic_deployments(con)
#> # A tibble: 11,709 × 38
#>    deploym…¹ recei…² acous…³ stati…⁴ stati…⁵ stati…⁶ deploy_date_time    deplo…⁷
#>        <int> <chr>   <chr>   <chr>   <chr>   <chr>   <dttm>                <dbl>
#>  1      6660 VR20-2… 2004_G… GUD1    GUD1    NA      2004-03-03 00:00:00    56.4
#>  2      6670 VR2-35… 2004_G… GUD1    GUD1    NA      2005-02-25 00:00:00    56.4
#>  3      6661 VR2-19… 2004_G… GUD2    GUD2    NA      2004-03-03 00:00:00    56.4
#>  4      6671 VR2-19… 2004_G… GUD2    GUD2    NA      2005-02-25 00:00:00    56.4
#>  5      6680 VR2-25… 2004_G… KATNORD KATNORD NA      2005-02-25 00:00:00    56.6
#>  6      6679 VR2-27… 2004_G… KATSYD  KATSYD  NA      2005-02-25 00:00:00    56.6
#>  7      6662 VR2-35… 2004_G… RAN1    RAN1    NA      2004-03-03 00:00:00    56.5
#>  8      6672 VR2-35… 2004_G… RAN1    RAN1    NA      2005-02-25 00:00:00    56.5
#>  9      6663 VR2-19… 2004_G… RAN2    RAN2    NA      2004-03-03 00:00:00    56.5
#> 10      6673 VR2-19… 2004_G… RAN2    RAN2    NA      2005-02-25 00:00:00    56.5
#> # … with 11,699 more rows, 30 more variables: deploy_longitude <dbl>,
#> #   intended_latitude <dbl>, intended_longitude <dbl>, mooring_type <chr>,
#> #   bottom_depth <chr>, riser_length <chr>, deploy_depth <chr>,
#> #   battery_installation_date <dttm>, battery_estimated_end_date <dttm>,
#> #   activation_date_time <dttm>, recover_date_time <dttm>,
#> #   recover_latitude <dbl>, recover_longitude <dbl>, download_date_time <dttm>,
#> #   download_file_name <chr>, valid_data_until_date_time <dttm>, …

# Get specific acoustic deployment
get_acoustic_deployments(con, deployment_id = 1437)
#> # A tibble: 1 × 38
#>   deployme…¹ recei…² acous…³ stati…⁴ stati…⁵ stati…⁶ deploy_date_time    deplo…⁷
#>        <int> <chr>   <chr>   <chr>   <chr>   <chr>   <dttm>                <dbl>
#> 1       1437 VR2W-1… demer   de-9    SA_GB_… 1       2014-04-10 00:00:00    51.0
#> # … with 30 more variables: deploy_longitude <dbl>, intended_latitude <dbl>,
#> #   intended_longitude <dbl>, mooring_type <chr>, bottom_depth <chr>,
#> #   riser_length <chr>, deploy_depth <chr>, battery_installation_date <dttm>,
#> #   battery_estimated_end_date <dttm>, activation_date_time <dttm>,
#> #   recover_date_time <dttm>, recover_latitude <dbl>, recover_longitude <dbl>,
#> #   download_date_time <dttm>, download_file_name <chr>,
#> #   valid_data_until_date_time <dttm>, sync_date_time <dttm>, …

# Get acoustic deployments for a specific receiver
get_acoustic_deployments(con, receiver_id = "VR2W-124070")
#> # A tibble: 8 × 38
#>   deployme…¹ recei…² acous…³ stati…⁴ stati…⁵ stati…⁶ deploy_date_time    deplo…⁷
#>        <int> <chr>   <chr>   <chr>   <chr>   <chr>   <dttm>                <dbl>
#> 1       1437 VR2W-1… demer   de-9    "SA_GB… "1"     2014-04-10 00:00:00    51.0
#> 2       1588 VR2W-1… demer   de-9    "de-9"   NA     2014-12-19 01:30:00    51.0
#> 3       1803 VR2W-1… dijle   M-2     "M-2"    NA     2015-04-16 00:00:00    51.0
#> 4       1804 VR2W-1… dijle   M-2     ""      ""      2015-05-15 00:00:00    51.0
#> 5       1805 VR2W-1… dijle   M-2     ""      ""      2015-05-28 00:00:00    51.0
#> 6       1806 VR2W-1… dijle   M-2     ""      ""      2015-09-24 00:00:00    51.0
#> 7       1807 VR2W-1… dijle   M-2     "m-2"    NA     2015-11-09 00:00:00    51.0
#> 8       2511 VR2W-1… dijle   M-2     "m-2"    NA     2017-01-26 00:00:00    51.0
#> # … with 30 more variables: deploy_longitude <dbl>, intended_latitude <dbl>,
#> #   intended_longitude <dbl>, mooring_type <chr>, bottom_depth <chr>,
#> #   riser_length <chr>, deploy_depth <chr>, battery_installation_date <dttm>,
#> #   battery_estimated_end_date <dttm>, activation_date_time <dttm>,
#> #   recover_date_time <dttm>, recover_latitude <dbl>, recover_longitude <dbl>,
#> #   download_date_time <dttm>, download_file_name <chr>,
#> #   valid_data_until_date_time <dttm>, sync_date_time <dttm>, …

# Get open acoustic deployments for a specific receiver
get_acoustic_deployments(con, receiver_id = "VR2W-124070", open_only = TRUE)
#> # A tibble: 0 × 38
#> # … with 38 variables: deployment_id <int>, receiver_id <chr>,
#> #   acoustic_project_code <chr>, station_name <chr>, station_description <chr>,
#> #   station_manager <chr>, deploy_date_time <dttm>, deploy_latitude <dbl>,
#> #   deploy_longitude <dbl>, intended_latitude <dbl>, intended_longitude <dbl>,
#> #   mooring_type <chr>, bottom_depth <chr>, riser_length <chr>,
#> #   deploy_depth <chr>, battery_installation_date <dttm>,
#> #   battery_estimated_end_date <dttm>, activation_date_time <dttm>, …

# Get acoustic deployments for a specific acoustic project
get_acoustic_deployments(con, acoustic_project_code = "demer")
#> # A tibble: 46 × 38
#>    deploym…¹ recei…² acous…³ stati…⁴ stati…⁵ stati…⁶ deploy_date_time    deplo…⁷
#>        <int> <chr>   <chr>   <chr>   <chr>   <chr>   <dttm>                <dbl>
#>  1      1424 VR2W-1… demer   de-1    fietse… 1       2014-05-13 00:00:00    51.0
#>  2      1658 VR2W-1… demer   de-2    Rommel… 1       2014-05-14 00:00:00    51.0
#>  3      1478 VR2W-1… demer   de-2    rommel… 1       2014-08-07 00:00:00    51.0
#>  4      1661 VR2W-1… demer   de-3    Messel… 1       2014-05-13 00:00:00    51.0
#>  5      1381 VR2W-1… demer   de-3    Messel… NA      2014-08-07 00:00:00    51.0
#>  6      2869 VR2W-1… demer   de-3    Messel… NA      2014-09-21 00:00:00    51.0
#>  7      1662 VR2W-1… demer   de-4    Testelt 1       2014-05-13 00:00:00    51.0
#>  8      1425 VR2W-1… demer   de-5    SO_ZIC… 1       2014-05-05 00:00:00    51.0
#>  9      1663 VR2W-1… demer   de-6    SA_RIF… 1       2014-05-05 00:00:00    51.0
#> 10      1378 VR2W-1… demer   de-7    de-7    NA      2014-05-05 00:00:00    51.0
#> # … with 36 more rows, 30 more variables: deploy_longitude <dbl>,
#> #   intended_latitude <dbl>, intended_longitude <dbl>, mooring_type <chr>,
#> #   bottom_depth <chr>, riser_length <chr>, deploy_depth <chr>,
#> #   battery_installation_date <dttm>, battery_estimated_end_date <dttm>,
#> #   activation_date_time <dttm>, recover_date_time <dttm>,
#> #   recover_latitude <dbl>, recover_longitude <dbl>, download_date_time <dttm>,
#> #   download_file_name <chr>, valid_data_until_date_time <dttm>, …

# Get acoustic deployments for two specific stations
get_acoustic_deployments(con, station_name = c("de-9", "de-10"))
#> # A tibble: 3 × 38
#>   deployme…¹ recei…² acous…³ stati…⁴ stati…⁵ stati…⁶ deploy_date_time    deplo…⁷
#>        <int> <chr>   <chr>   <chr>   <chr>   <chr>   <dttm>                <dbl>
#> 1       1437 VR2W-1… demer   de-9    SA_GB_… 1       2014-04-10 00:00:00    51.0
#> 2       1588 VR2W-1… demer   de-9    de-9    NA      2014-12-19 01:30:00    51.0
#> 3       1428 VR2W-1… demer   de-10   IN_MZ_… 2       2014-04-10 00:00:00    51.0
#> # … with 30 more variables: deploy_longitude <dbl>, intended_latitude <dbl>,
#> #   intended_longitude <dbl>, mooring_type <chr>, bottom_depth <chr>,
#> #   riser_length <chr>, deploy_depth <chr>, battery_installation_date <dttm>,
#> #   battery_estimated_end_date <dttm>, activation_date_time <dttm>,
#> #   recover_date_time <dttm>, recover_latitude <dbl>, recover_longitude <dbl>,
#> #   download_date_time <dttm>, download_file_name <chr>,
#> #   valid_data_until_date_time <dttm>, sync_date_time <dttm>, …