Skip to contents

Get data for acoustic projects, with options to filter results.

Usage

get_acoustic_projects(
  credentials = list(username = Sys.getenv("ETN_USER"), password = Sys.getenv("ETN_PWD")),
  acoustic_project_code = NULL
)

Arguments

credentials

A list with the username and password to connect to the ETN database.

acoustic_project_code

Character (vector). One or more acoustic project codes. Case-insensitive.

Value

A tibble with acoustic project data, sorted by project_code. See also field definitions.

Examples

# Set credentials
credentials <- list(
   username = Sys.getenv("ETN_USER"),
   password = Sys.getenv("ETN_PWD")
 )

# Get all acoustic projects
get_acoustic_projects(credentials)
#> Error: ODBC failed with error 00000 from              [unixODBC][Driver Manager].
#> Failed to connect to the database.
#> Did you enter the right username/password?
#> Please try again.

# Get a specific acoustic project
get_acoustic_projects(credentials, acoustic_project_code = "demer")
#> Error: ODBC failed with error 00000 from              [unixODBC][Driver Manager].
#> Failed to connect to the database.
#> Did you enter the right username/password?
#> Please try again.