tide_sync: Find tidal height for survey timestamps

View source: R/tide_sync.R

tide_syncR Documentation

Find tidal height for survey timestamps

Description

Find tidal height for survey timestamps

Usage

tide_sync(
  df,
  tide,
  date_col = 2,
  tide_col = 3,
  t_offset = 0,
  platform_height = 0,
  verbose = TRUE
)

Arguments

df

A dataframe with a date column (lubridate::as_datetime()) in the same time zone as the tidal data below.

date_col

The index of the column with datetime data in the tide csv's.

tide_col

The index of the column with tide height data in the tide csv's.

t_offset

A time offset, in seconds, to apply to the tide data before synching with df.

platform_height

A height offset, in meters, to apply to the tide data before synching with df. This is a shortcut for applying a platform's or observer's height above mean low low tide.

verbose

Boolean: Print updates to Console?

tides

A data.frame of tidal date, which must have a column with date-time information, format ⁠YYYY-MM-DD hh:mm:ss⁠, in the same time zone as df, and a column with tide height information, in meters above mean low low tide. For the Gitga'at First Nation area, we retrieve tidal date from the data portal on the Fisheries & Oceans Website, making sure to set timestamp to local (UTC+8) before saving the csv's. We have supplied this dataset built-in to the package: data(tides).

Value

The same df that was supplied, now with three new columns: tide_ht (the tide height for each row), tide_diff (the time difference, in seconds, between the df timestamp and the row of tidal data referenced for tide height), and ht (the height of the platform above the tidally-adjusted sea level)


ericmkeen/suRvey documentation built on Feb. 5, 2025, 7:44 a.m.