{width=50%}

1. PURPOSE

strings is an R package developed to help users compile, format, calculate, and visualize oceanographic data, as collected by the Centre for Marine Applied Research's (CMAR) Coastal Monitoring Program. The package can process temperature, dissolved oxygen, and salinity data measured by HOBO Pro V2, TidBiT, aquaMeasure DOT, aquaMeasure SAL, and/or VR2AR sensors.

The purpose of this vignette is to provide a detailed description of the folder and file structure required to compile data with the strings package. Section 3.1 describes the folder structure required for CMAR's workflow. Section 3.2 is more general, and describes the folder structure required for all strings users.

See SOP010 for direction on how to compile and format sensor string data and SOP011 for direction on how to trim sensor string data.

2. SCOPE/PRINCIPAL

  1. CMAR-specific folders
    • Data_Strings
    • Station
    • Deployment
    • Log
  2. General strings folders
    • aquaMeasure
    • Hobo
    • Vemco

3. PROCEDURE

3.1 CMAR-specific folders

This section describes how to organize the Coastal Monitoring Program data for CMAR's workflow.

Data_Strings folder

All of the data from CMAR's Coastal Monitoring Program is stored in the Data_Strings folder on the shared drive. There is a folder for each station inside the Data_Strings folder (Fig. 1).

If you are processing data from a new station, create a new folder with the appropriate name (this should be the same as the Location_Description in the log; see Log folder section below).

Figure 1. Station folders inside the Data_Strings folder

Station folders

Inside each station folder is a folder for each deployment at this station and the Deployment History file (Fig. 2).

Deployment folders are named "Station deployment-date", where the date is in the form yyy-mm-dd (e.g., "Birchy Head 2019-05-02"). There is a single space between each word and between the station name and the date (no underscores or dashes). If you are processing data from a new deployment, create a deployment folder with the appropriate name.

The Deployment History tracks the string coordinates, sensor serial numbers and depths, and notes for all deployments at this station. The file is named "station_Deployment_History" (e.g., "Birchy Head_Deployment_History"; Figure 2). Make sure the deployment you are processing is included in the Deployment History file. If it is not, add it by looking up the information in the log (see Log folder section below) or the NSFDA tracking sheet. For new stations, you can create a Deployment History file from the log manually or by using the combine_deployment_logs() function (see ?combine_deployment_logs).

Pay attention to separators (e.g., "_", "-", and "space ") when naming deployment folders and history files.

Figure 2. The Birchy Head station folder, which contains four deployment folders and a Deployment History file.

Deployment folders

Within each deployment folder, there is a "Log" folder and a folder for each type of sensor on the string, e.g., "Hobo", "aquaMeasure", and/or "Vemco". Spelling and case of these folder names must be exactly as presented here. The following sub-section describes content of the Log folder, and Section 3.2 describes the content of the remaining folders. Other folders in the deployment folder are ignored by the strings package.

Figure 3. The deployment folder for the string deployed at Birchy Head on May 2, 2019.

Log folder

The Log folder contains the deployment log, which is a record of the deployment, including dates of deployment and retrieval, the sensors deployed, and the sensor depths (Fig. 4). If the deployment log does not exist, please make one using information in the NSDFA tracking sheet (see ?create_deployment_log).

Information from the deployment log is required as arguments for several strings functions (e.g., compile_*_data() and format_for_opendata()). This information can be manually typed into R, or imported from the log using the read_deployment_log() function. We recommend using the function to save time and reduce opportunity for human error. To use the function, the deployment log must be a .xlsx, .xls, or .csv file. The deployment log should be the only .xlsx, .xls, or .csv file in the Log folder (otherwise the function will stop with an error).

The deployment log should have a row for each sensor on the string, and must contain the following columns:

Column names must be spelled as presented above to ensure that R can find and use the information within each column. All other columns will be ignored.

Figure 4. Deployment log for the string deployed at Birchy Head on May 2, 2019. The string had 7 sensors.

3.2 General strings folders

The sensor data must be saved into folders with specific names to use the strings package:

You will get a vague error message if the data are not saved in the correct file. We are working to make more helpful error messages.

This section provides details on the content of the aquaMeasure, Hobo, and Vemco folders.

aquaMeasure folder

Note the capital "M" in the folder name. This folder contains all files downloaded from aquaCurrent for the deployment, in .csv or .xlsx format (Fig. 5). You do not need to modify the raw files, although sometimes the package has a hard time parsing the Text column, which can be safely deleted for CMAR purposes. The file name does not matter.

Figure 5. The aquaMeasure folder for the May 2, 2019 Birchy Head deployment. There is one file for each aquaMeasure sensor noted in the log.

Hobo folder

This folder contains the extracted Hobo and TidbiT files, in .csv or .xlsx format (CMAR users see note below; Fig. 6). Extracted Hobo and TidbiT files are treated the same by the package. The name of the file must be the serial number of the unit. This will be used to match the sensor to the depth at which it was deployed. The compile_HOBO_data() and compile_all_data() functions will stop with an error if the name of the file does not match an entry in the serial.table.HOBO argument (see help files for more info). The raw Hobo files may also be saved in this folder, but other Excel files (those not extracted from Hobo or TidiT files) will cause an error.

CMAR users: Extract the Hobo data in UTC (set Offset from GMT to 0; Fig. 7) and export as a .csv file. See ?compile_HOBO_data for more information.

Figure 6. The Hobo folder for the May 2, 2019 Birchy Head deployment. There is one raw Hobo file and one extracted csv file for each Hobo sensor noted in the log. The file names correspond to the serial numbers in the log.

Vemco folder

This folder contains the extracted VR2 data, in .csv or .xlsx format (Fig. 8). The file name does not matter. The raw VR2 files may also be saved in this folder, but other Excel files (those not extracted from VR2 files) will cause an error.

Figure 8. The Vemco folder for the May 2, 2019 Birchy Head deployment. The raw vrl files and extracted data can both be saved in this folder.



Centre-for-Marine-Applied-Research/strings documentation built on Aug. 21, 2023, 8 a.m.