Skip to contents

Extract sighting information from aerial DAS data

Usage

airdas_sight(x, ...)

# S3 method for class 'data.frame'
airdas_sight(x, ...)

# S3 method for class 'airdas_df'
airdas_sight(x, angle.min = 12, ...)

Arguments

x

airdas_df object; output from airdas_process, or a data frame that can be coerced to a airdas_df object

...

ignored

angle.min

numeric; the minimum (absolute value) angle for which to consider a sighting a standard sighting. Default is 12

Value

Data frame with 1) the columns from x, excluding the 'Data#' columns, and 2) columns with sighting information extracted from 'Data#' columns as described below. The data frame has one row for each sighting, or one row for each species of each sighting if it is a multi-species (mixed) sighting.

Added sighting information columns:

Sighting informationColumn nameNotes
Sighting numberSightNoObserver that made the sighting
ObsAngle of declinationAngle
Left is negativeSighting by standard observerObsStd
Logical; described in DetailsStandard sightingSightStd
Logical; described in DetailsMixed species sightingMixed
LogicalSpecies codeSpCode
All characters converted to lower caseGroup size of schoolGsTotal
Only different from GsSp for mixed species sightingsGroup size of speciesGsSp
Turtle length (feet if numeric)TurtleSizeNA for non-"t" events; may be character or numeric
Turtle travel direction (degrees)TurtleDirectionNA for non-"t" events
Turtle tail visible?TurtleTailNA for non-"t" events

The TurtleSize will be of class character is there is any CARETTA data in x, and of class numeric otherwise.

Details

AirDAS events contain specific information in the 'Data#' columns, with the information depending on the event code and file type for that row. This function extracts relevant data for sighting events, and returns a data frame with dedicated columns for each piece of sighting information. It can handle multiple file types in x; for instance, x could be processed PHOCOENA and TURTLE data combined using rbind. See airdas_format_pdf for more information about the expected events and event formats, depending on the file type.

All species codes are converted to lower case using tolower.

Abbreviations used in column names include: Gs = group size, Sp = species, Mixed = mixed species (multi-species) sighting. In addition, note that multi-species group sizes are rounded to the nearest whole number using round(, 0)

A 'sighting by a standard observer' ('ObsStd') is a sighting made by ObsL, ObsB, or ObsR (not the data recorder or pilot). A 'standard sighting' ('SightStd') is a sighting that was made while on effort, by a standard observer, and with the absolute value of the angle of declination being greater than or equal to angle.min. Resights (Events 's') are not considered standard events, and thus both 'ObsStd' and 'SightStd' will be NA for 's' events.

Examples

y <- system.file("airdas_sample.das", package = "swfscAirDAS")
y.proc <- airdas_process(y)

airdas_sight(y.proc)
#>    Event            DateTime      Lat       Lon OnEffort Trans Bft CCover Jelly
#> 1      S 2015-04-09 12:31:35 39.23367 -123.1783     TRUE    T1   1     10     0
#> 2      S 2015-04-09 12:31:47 39.23350 -123.1857     TRUE    T1   1     10     0
#> 3      S 2015-04-09 12:31:56 39.23333 -123.1917     TRUE    T1   1     10     0
#> 4      S 2015-04-09 12:32:20 39.23233 -123.2053     TRUE    T1   1     10     0
#> 5      S 2015-04-09 12:32:30 39.23233 -123.2108     TRUE    T1   1     10     0
#> 6      S 2015-04-09 12:32:42 39.23233 -123.2195     TRUE    T1   1     10     0
#> 7      S 2015-04-09 12:32:42 39.23233 -123.2195     TRUE    T1   1     10     0
#> 8      S 2015-04-09 12:33:43 39.23333 -123.2550     TRUE    T1   1     10     0
#> 9      S 2015-04-09 12:35:13 39.23317 -123.3073     TRUE    T1   1     10     2
#> 10     S 2015-04-09 12:36:13 39.23333 -123.3418     TRUE    T1   1     10     2
#> 11     S 2015-04-09 12:36:26 39.23350 -123.3500     TRUE    T1   1     10     2
#> 12     t 2015-04-09 12:36:26 39.23350 -123.3500     TRUE    T1   1     10     2
#> 13     S 2015-04-09 12:36:43 39.23350 -123.3592     TRUE    T1   1     10     2
#> 14     S 2015-04-09 12:37:01 39.23400 -123.3697     TRUE    T1   1     10     2
#> 15     S 2015-04-09 12:37:16 39.23433 -123.3790     TRUE    T1   1     10     2
#> 16     S 2015-04-09 12:37:37 39.23417 -123.3910     TRUE    T1   1     10     2
#> 17     S 2015-04-09 12:42:13 39.23250 -123.5515     TRUE    T1   1     20     0
#> 18     S 2015-04-09 12:51:40 39.21750 -123.4410     TRUE    T2   1     20     0
#> 19     S 2015-04-09 12:51:55 39.21750 -123.4317     TRUE    T2   1     20     0
#> 20     S 2015-04-09 12:52:03 39.21733 -123.4270     TRUE    T2   1     20     0
#> 21     S 2015-04-09 12:52:04 39.21733 -123.4270     TRUE    T2   1     20     0
#> 22     S 2015-04-09 12:52:07 39.21733 -123.4258     TRUE    T2   1     20     0
#> 23     S 2015-04-09 12:52:17 39.21700 -123.4185     TRUE    T2   1     20     0
#> 24     S 2015-04-09 12:52:54 39.21700 -123.3982     TRUE    T2   1     20     0
#> 25     S 2015-04-09 12:54:34 39.21667 -123.3422     TRUE    T2   2     20     0
#> 26     S 2015-04-09 12:55:20 39.21700 -123.3172     TRUE    T2   2     20     0
#> 27     S 2015-04-09 12:56:49 39.21717 -123.2685     TRUE    T2   2     20     0
#> 28     s 2015-04-09 12:57:00 39.21700 -123.2617     TRUE    T2   2     20     0
#>    HorizSun VertSun HKR  Haze  Kelp RedTide AltFt SpKnot ObsL ObsB ObsR Rec VLI
#> 1         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 2         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 3         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 4         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 5         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 6         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 7         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 8         6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 9         6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 10        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 11        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 12        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 13        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 14        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 15        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 16        6      NA   r FALSE FALSE    TRUE   650    100   aa   bb   cc  dd   g
#> 17        6      NA   n FALSE FALSE   FALSE   650    100   aa   bb   cc  dd   g
#> 18       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 19       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 20       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 21       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 22       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 23       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 24       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 25       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 26       12      NA   n FALSE FALSE   FALSE   680     90   aa   dd   cc  bb   g
#> 27       12      NA   r FALSE FALSE    TRUE   680     90   aa   dd   cc  bb   g
#> 28       12      NA   r FALSE FALSE    TRUE   680     90   aa   dd   cc  bb   g
#>    VLO VB VRI VRO EffortDot EventNum          file_das line_num file_type
#> 1    g  g   g   g      TRUE        9 airdas_sample.das        9    turtle
#> 2    g  g   g   g      TRUE       10 airdas_sample.das       10    turtle
#> 3    g  g   g   g      TRUE       12 airdas_sample.das       12    turtle
#> 4    g  g   g   g      TRUE       14 airdas_sample.das       14    turtle
#> 5    g  g   g   g      TRUE       15 airdas_sample.das       15    turtle
#> 6    g  g   g   g      TRUE       16 airdas_sample.das       16    turtle
#> 7    g  g   g   g      TRUE       16 airdas_sample.das       16    turtle
#> 8    g  g   g   g      TRUE       18 airdas_sample.das       19    turtle
#> 9    g  g   g   g      TRUE       23 airdas_sample.das       24    turtle
#> 10   g  g   g   g      TRUE       26 airdas_sample.das       27    turtle
#> 11   g  g   g   g      TRUE       27 airdas_sample.das       28    turtle
#> 12   g  g   g   g      TRUE       28 airdas_sample.das       29    turtle
#> 13   g  g   g   g      TRUE       29 airdas_sample.das       30    turtle
#> 14   g  g   g   g      TRUE       31 airdas_sample.das       32    turtle
#> 15   g  g   g   g      TRUE       32 airdas_sample.das       33    turtle
#> 16   g  g   g   g      TRUE       34 airdas_sample.das       35    turtle
#> 17   g  g   g   g      TRUE       46 airdas_sample.das       47    turtle
#> 18   g  g   g   g      TRUE       65 airdas_sample.das       66    turtle
#> 19   g  g   g   g      TRUE       66 airdas_sample.das       67    turtle
#> 20   g  g   g   g      TRUE       68 airdas_sample.das       69    turtle
#> 21   g  g   g   g      TRUE       69 airdas_sample.das       70    turtle
#> 22   g  g   g   g      TRUE       70 airdas_sample.das       71    turtle
#> 23   g  g   g   g      TRUE       71 airdas_sample.das       72    turtle
#> 24   g  g   g   g      TRUE       73 airdas_sample.das       74    turtle
#> 25   g  p   g   g      TRUE       78 airdas_sample.das       79    turtle
#> 26   g  p   g   g      TRUE       80 airdas_sample.das       81    turtle
#> 27   g  p   g   g      TRUE       84 airdas_sample.das       85    turtle
#> 28   g  p   g   g      TRUE       86 airdas_sample.das       87    turtle
#>    SightNo  Obs Angle ObsStd SightStd Mixed SpCode GsTotal GsSp TurtleSize
#> 1        1   cc    67   TRUE     TRUE FALSE     mn       6    6         NA
#> 2        2   bb   -60   TRUE     TRUE FALSE     mn       6    6         NA
#> 3        3   cc    38   TRUE     TRUE FALSE     mn       2    2         NA
#> 4        4   aa   -50   TRUE     TRUE FALSE     mn       5    5         NA
#> 5        5   cc    49   TRUE     TRUE FALSE     bm       4    4         NA
#> 6        6   cc    42   TRUE     TRUE  TRUE     gg      10    8         NA
#> 7        6   cc    42   TRUE     TRUE  TRUE     er      10    2         NA
#> 8        7   aa   -53   TRUE     TRUE FALSE     bm       5    5         NA
#> 9        8   dd    24  FALSE    FALSE FALSE     bm       2    2         NA
#> 10       9   aa   -57   TRUE     TRUE FALSE     mn       4    4         NA
#> 11      10   cc    65   TRUE     TRUE FALSE     gg       5    5         NA
#> 12    <NA>   aa   -20   TRUE     TRUE FALSE     dc       1    1          5
#> 13      11   bb    87   TRUE     TRUE FALSE     pp       3    3         NA
#> 14      12   bb    82   TRUE     TRUE FALSE     gg       5    5         NA
#> 15      13   bb    54   TRUE     TRUE FALSE     pp       6    6         NA
#> 16      14   cc    62   TRUE     TRUE FALSE     gg       2    2         NA
#> 17      15   bb    50   TRUE     TRUE FALSE     mn       3    3         NA
#> 18      16   aa   -31   TRUE     TRUE FALSE     mn       6    6         NA
#> 19      17   bb   -59  FALSE    FALSE FALSE     bm       6    6         NA
#> 20      18   aa   -62   TRUE     TRUE FALSE     gg       2    2         NA
#> 21      19   cc    42   TRUE     TRUE FALSE     bm       3    3         NA
#> 22      20   aa   -48   TRUE     TRUE FALSE     bm       4    4         NA
#> 23      21   cc    63   TRUE     TRUE FALSE     pp       6    6         NA
#> 24      22   cc    43   TRUE     TRUE FALSE     pp       2    2         NA
#> 25      23   cc    56   TRUE     TRUE FALSE     mn       6    6         NA
#> 26      24   cc    37   TRUE     TRUE FALSE     mn       6    6         NA
#> 27      25   bb   -76  FALSE    FALSE FALSE     pp       1    1         NA
#> 28      25 <NA>   -70     NA       NA    NA   <NA>      NA   NA         NA
#>    TurtleDirection TurtleTail
#> 1               NA       <NA>
#> 2               NA       <NA>
#> 3               NA       <NA>
#> 4               NA       <NA>
#> 5               NA       <NA>
#> 6               NA       <NA>
#> 7               NA       <NA>
#> 8               NA       <NA>
#> 9               NA       <NA>
#> 10              NA       <NA>
#> 11              NA       <NA>
#> 12              90          n
#> 13              NA       <NA>
#> 14              NA       <NA>
#> 15              NA       <NA>
#> 16              NA       <NA>
#> 17              NA       <NA>
#> 18              NA       <NA>
#> 19              NA       <NA>
#> 20              NA       <NA>
#> 21              NA       <NA>
#> 22              NA       <NA>
#> 23              NA       <NA>
#> 24              NA       <NA>
#> 25              NA       <NA>
#> 26              NA       <NA>
#> 27              NA       <NA>
#> 28              NA       <NA>