---
title: "SeaLog & QA/QSea 2.2 Data Format"
author: "Christopher Swingley^1^, Gary Drew^2^, Heather Coletti^3^"
engine: knitr
execute:
  echo: true
  eval: false
  warning: false
  error: false
format:
  html:
    toc: false
  pdf:
    toc: false
    colorlinks: true
    geometry:
      - top=0.75in
      - left=0.75in
      - right=0.75in
    pdf-engine: xelatex
    mainfont: "Source Sans Pro"
    sansfont: "Source Sans Pro"
    fontsize: "12pt"
    mainfontoptions:
      - Numbers=Uppercase
      - Numbers=Tabular
---

^1^ABR, Inc. - Environmental Research & Services 2842 Goldstream Rd.
Fairbanks, AK 99709

^2^U.S. Geological Survey, Alaska Science Center, 4210 University Dr.
Anchorage, AK 99508 (retired)

^3^National Park Service, 4175 Geist Rd., Fairbanks, AK 99709

# Introduction

[QA/QSea](https://sealog.abrinc.com/pages/qaqsea.html) is a Shiny app written
in the R environment. This app was constructed to work in conjunction with
[SeaLog](https://sealog.abrinc.com/pages/sealog.html), a data logging
application developed by Department of Interior researchers in Alaska for the
collection of at-sea survey data. QA/QSea can read comma delimited text files
(csv) and Excel (xlsx) output from SeaLog, provide proofing tools, and generate
exportable data files in multiple formats including that used in the [North
Pacific Pelagic Seabird
Database](https://www.usgs.gov/data/north-pacific-pelagic-seabird-database-nppsd)
(NPPSD). Note this app cannot read dLOG or any other csv data, as it requires
JSON configuration files from SeaLog.

This document defines the data format exported by SeaLog and ingested by
QA/QSea, version 2.2. If you have data from a different version or from
different software, you may be able to reconfigure your CSV/Excel file so it can
be processed by QA/QSea.

You will also need to set up a pair of JSON files defining the fields you were
using during data collection (`optionalFields.json`) and a validation list of
species (`speciesValidationList.json`). Links to the default versions of these
files are at the bottom of this document. Details on these files can be found in
the [SeaLog 2.2 Manual](https://sealog.abrinc.com/installers/SeaLog_User_Manual_v2.2.pdf).

# Field Definition

The CSV/Excel observation file must contain these fields, in the following
order. The fields where Required is Yes, must contain data. All the others are
optional. If you have data in any of the optional fields, they must be set to
"true" in the `optionalFields.json` file or they will not be preserved in the
outputs and backups.

Field              | Short description                    | Data Type | Required
:----------------- | :----------------------------------- | :-------- | :-------
Vessel             | Vessel name                          | Text      | Yes
TxWidth            | Transect width (m)                   | Integer   | Yes
TripID             | Trip ID                              | Text      | Yes
Transect           | Transect                             | Text      | Yes
Record             | Record number (autonumber)           | Integer   | Yes
PortObs            | Port observer                        | Text      | No
StarboardObs       | Starboard observer                   | Text      | No
PortCondition      | Port condition                       | Integer   | No
StarboardCondition | Starboard condition                  | Integer   | No
Beaufort           | Beaufort code                        | Integer   | No
Weather            | Weather                              | Text      | No
CloudCover         | Cloud cover                          | Integer   | No
FogConc            | Fog concentration                    | Integer   | No
IceType            | Ice type                             | Text      | No
IceConc            | Ice concentration                    | Integer   | No
On/OffTx           | On/Off transect ("ON" or "OFF")      | Text      | Yes
Type               | Data type ("USER" or "GPS")          | Text      | Yes
ObsSideIO          | Observer inshore/offshore            | Text      | No
ObsSidePS          | Observer port/starboard              | Text      | No
Species            | Species code (4 letters)             | Text      | Yes
Count              | Species count                        | Integer   | Yes
PrimaryBehavior    | Primary behavior                     | Text      | No
SecondaryBehavior  | Secondary behavior                   | Text      | No
Age                | Age                                  | Text      | No
Sex                | Sex                                  | Text      | No
Plumage            | Plumage                              | Text      | No
Distance           | Distance from vessel (m)             | Integer   | No
Angle              | Angle from vessel course (°)         | Integer   | No
Bin                | Distance bin                         | Text      | No
UserSelect1        | Custom drop down field               | Text      | No
UserSelect2        | Custom drop down field               | Text      | No
UserText           | Custom text field                    | Text      | No
UserNumeric        | Custom numeric field                 | Float     | No
Latitude           | Latitude (WGS84)                     | Float     | Yes
Longitude          | Longitude (WGS84)                    | Float     | Yes
Date               | Date (local)                         | Text      | Yes
Time               | Time (local)                         | Text      | Yes
GPSTime            | GPS Timestamp (UTC or with timezone) | Text      | Yes
Comments           | Observation comments                 | Text      | No

<!-- vim: set ft=quarto fenc=utf-8 tw=80 ts=2 sw=2 sts=2 spell: -->
