add_bathy: Add bathymetry data, given locations

View source: R/add_bathy.R

add_bathyR Documentation

Add bathymetry data, given locations

Description

Pulls bathymetry data from either the internet or a provided database and associates it with tag locations. Note: code obtained from Eric Keene (NOAA) via David Sweeney (MarEcoTel) with minor modification. To use, you will need bathymetry data. You can download it from the Drive FreakinBeakinTagData > Acoustic Preliminary Results > Resources-Seafloor.zip or by using download_bathy (which just locates and downloads that zip file for you).

Usage

add_bathy(x, lat_var, lon_var, z_radius = 2.5, bathy_path)

Arguments

x

A data frame with location data to associate with bathymetry data

lat_var

name of variable in x with latitude data

lon_var

name of variable in x with longitude data

z_radius

Distance in km around each location that seafloor depth and slope will be calculated. This can be a single value or a vector of different values the same length as the number of rows of the data input. Default: 2.5 km

bathy_path

A directory path to the folder containing all bathymetry data. File names in the folder must be like this :'NEPACseafloor-116.000-30.000-115.000-31.000.csv'. If this input is NULL, data will be pulled from online, thus requiring internet access. (Note that there may be some access and speed issues with pulling the data from the web.)

Value

A dataframe with associated bathymetry data as new columns in the dataset

Examples

#examples not yet provided, sorry :(

stacyderuiter/FBtagtools documentation built on June 1, 2025, 6:26 p.m.