Get data for tags, with options to filter results. Note that there
can be multiple records (acoustic_tag_id
) per tag device
(tag_serial_number
).
Usage
get_tags(
connection = con,
tag_type = NULL,
tag_subtype = NULL,
tag_serial_number = NULL,
acoustic_tag_id = NULL
)
Arguments
- connection
A connection to the ETN database. Defaults to
con
.- tag_type
Character (vector).
acoustic
orarchival
. Some tags are both, find those withacoustic-archival
.- tag_subtype
Character (vector).
animal
,built-in
,range
orsentinel
.- tag_serial_number
Character (vector). One or more tag serial numbers.
- acoustic_tag_id
Character (vector). One or more acoustic tag identifiers, i.e. identifiers found in
get_acoustic_detections()
.
Value
A tibble with tags data, sorted by tag_serial_number
. See also
field definitions.
Values for owner_organization
and owner_pi
will only be visible if you
are member of the group.
Examples
# Set default connection variable
con <- connect_to_etn()
# Get all tags
get_tags(con)
#> # A tibble: 42,640 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 02BR 7329 acoustic animal NA R64K-7329
#> 2 02BS 7330 acoustic animal NA R64K-7330
#> 3 02BT 7331 acoustic animal NA R64K-7331
#> 4 02BU 7332 acoustic animal NA R64K-7332
#> 5 02BV 7333 acoustic animal NA R64K-7333
#> 6 02BW 7334 acoustic animal NA R64K-7334
#> 7 02BX 7335 acoustic animal NA R64K-7335
#> 8 02BY 7336 acoustic animal NA R64K-7336
#> 9 02BZ 7337 acoustic animal NA R64K-7337
#> 10 02C0 7338 acoustic animal NA R64K-7338
#> # ℹ 42,630 more rows
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>, …
# Get archival tags, including acoustic-archival
get_tags(con, tag_type = c("archival", "acoustic-archival"))
#> # A tibble: 9,101 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 03DX1083 acoustic-archival animal PT OPS-1083
#> 2 03E01161 acoustic-archival animal PT OPS-1161
#> 3 03E21093 acoustic-archival animal PT OPS-1093
#> 4 03E31095 acoustic-archival animal PT OPS-1095
#> 5 03E41097 acoustic-archival animal PT OPS-1097
#> 6 03E51099 acoustic-archival animal PT OPS-1099
#> 7 03E61101 acoustic-archival animal PT OPS-1101
#> 8 03E71103 acoustic-archival animal PT OPS-1103
#> 9 03E81105 acoustic-archival animal PT OPS-1105
#> 10 03E91107 acoustic-archival animal PT OPS-1107
#> # ℹ 9,091 more rows
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>, …
# Get tags of specific subtype
get_tags(con, tag_subtype = c("built-in", "range"))
#> # A tibble: 1,261 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 04HD acoustic-archival range P S64K-9795
#> 2 04HD acoustic-archival range A S64K-9796
#> 3 04HE acoustic-archival range P S64K-9797
#> 4 04HE acoustic-archival range A S64K-9798
#> 5 04HF acoustic-archival range P S64K-9799
#> 6 04HF acoustic-archival range A S64K-9800
#> 7 04HH acoustic-archival range P S64K-9803
#> 8 04HH acoustic-archival range A S64K-9804
#> 9 04HI acoustic-archival range P S64K-9805
#> 10 04HI acoustic-archival range A S64K-9806
#> # ℹ 1,251 more rows
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>, …
# Get specific tags (note that these can return multiple records)
get_tags(con, tag_serial_number = "1187450")
#> # A tibble: 1 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 1187450 acoustic animal NA A69-1601-16130
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>,
#> # sensor_resolution <dbl>, sensor_unit <chr>, sensor_accuracy <dbl>, …
get_tags(con, acoustic_tag_id = "A69-1601-16130")
#> # A tibble: 1 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 1187450 acoustic animal NA A69-1601-16130
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>,
#> # sensor_resolution <dbl>, sensor_unit <chr>, sensor_accuracy <dbl>, …
get_tags(con, acoustic_tag_id = c("A69-1601-16129", "A69-1601-16130"))
#> # A tibble: 2 × 54
#> tag_serial_number tag_type tag_subtype sensor_type acoustic_tag_id
#> <chr> <chr> <chr> <chr> <chr>
#> 1 1187449 acoustic animal NA A69-1601-16129
#> 2 1187450 acoustic animal NA A69-1601-16130
#> # ℹ 49 more variables: acoustic_tag_id_alternative <chr>, manufacturer <chr>,
#> # model <chr>, frequency <chr>, status <chr>, activation_date <dttm>,
#> # battery_estimated_life <chr>, battery_estimated_end_date <dttm>,
#> # length <dbl>, diameter <dbl>, weight <dbl>, floating <lgl>,
#> # archive_memory <chr>, sensor_slope <dbl>, sensor_intercept <dbl>,
#> # sensor_range <chr>, sensor_range_min <dbl>, sensor_range_max <dbl>,
#> # sensor_resolution <dbl>, sensor_unit <chr>, sensor_accuracy <dbl>, …