getSampleData: Download sample data from server

View source: R/api.R

getSampleDataR Documentation

Download sample data from server

Description

Download sample data from server and save as a data.frame

Usage

getSampleData(
  years,
  regions,
  server = "https://grunt.sefsc.noaa.gov/rvc_analysis20/"
)

Arguments

years

A numeric vector of years for which to get sample data

regions

A character vector of region codes for which to get sample data (e.g. "FLA KEYS", "DRY TORT", "SEFCRI")

server

A string containing the domain url at which to access the server

Value

A data.frame of analysis ready data and the following columns:

PRIMARY_SAMPLE_UNIT

A code indicating the primary sample unit in which a sample was collected

YEAR

A number indicating the calendar year

MONTH

A number indicating the month of the year

DAY

A number indicating the day of the month (EST)

STATION_NR

A number indicating the secondary sampling unit within a given primary sample unit

LAT_DEGREES

Latitude of secondary sampling unit in decimal degrees

LON_DEGREES

Longitude of secondary sampling unit in decimal degrees

DEPTH

Average depth, in meters, of secondary sampling unit

UNDERWATER_VISIBILITY

Visibility, in meters, at secondary sampling unit

MAPGRID_NR

A number indicating the primary sample unit

HABITAT_CD

A code indicating the habitat type

ZONE_NR

A code indicating the distance offshore: 1 - Inshore, 2 - Midchannel, 3 - Offshore, 4 - Fore-reef

SUBREGION_NR

A number indicating the subregion

MPA_NR

A number identifying the marine protected area in which the sample was collected. Zero indicates unprotected status

SPECIES_NR

A number indicating the species for a sample

SPECIES_CD

A code indicating the species for a sample. Consists of the first three letters of the generic name and the first four of the specific name

LEN

The length, in cm, of a sample

NUM

The number of individuals of a given species and length observed in a secondary sampling unit

TIME_SEEN

A number indicating when, during sampling, an individual was observed. 1: In the first five minutes, 2: From 5-10 minutes, 3: After 10 minutes

PROT

A boolean value indicating whether a sample was in a protected area (1), or not (0)

STRAT

A code indicating the stratum in which a sample was taken. Differs by region

REGION

A code indicating the region in which a sample was taken. DRY TORT: Dry Tortugas, FLA KEYS: Florida Keys, and SEFCRI: Southeast Peninsular Florida

See Also

getStratumData getTaxonomicData getRvcData


harryganz/rvc documentation built on Feb. 14, 2023, 4:13 p.m.