Connects to svdbs and pulls Clam & Quahog data from MSTR_CRUISE, UNION_FSCS_SVCAT, UNION_FSCS_SVLEN, UNION_FSCS_SVSTA.
Pulls from Cruises with purpose code = 50. (See get_cruise_purpose
). Data are assigned to one of 7 regions
('SVA', 'DMV', 'SNJ', 'NNJ', 'LI', 'SNE', 'GB') and length-to-meat weight conversions applied
get_survdat_clam_data(
channel,
shg.check = T,
clam.only = T,
tidy = F,
assignRegionWeights = T
)
an Object inherited from DBIConnection-class. This object is used to communicate with the database engine. (see connect_to_database
)
Boolean. use only SHG <=136 or TOGA <= 1324 (>2008). (Default = T)
Boolean. T = grab only Atl. surfclam (403) and ocean quahog (409)
Boolean. Return output in long format (Default = F)
Boolean. Assign Strata to Regions and then apply length weight coefficients. Currently hard coded for Survey strata prior to 2017. (Default = T).
A list containing a Data frame (data.table) (n x 21) and a list of SQL queries used to pull the data, the date of the pull, and the call expression Each row of the data.table represents the number at length of a species on a specific tow along with physical attributes of the tow.
The data frame (Descriptions taken from NEFSC Data dictionary)
One of 7 identified Regions, 'SVA', 'DMV', 'SNJ', 'NNJ', 'LI', 'SNE', 'GB'
Code uniquely identifying cruise. The first four digits indicate the year and the last two digit uniquely identify the cruise within the year. The 5th byte signifies cruises other than groundfish: Shrimp survey = 7 (i.e. 201470), State of Massachusetts survey = 9 (i.e. 201491), Food habits = 5 (i.e.199554)
Unique sequential order in which stations have been completed. Hangups and short tows each receive a non-repeated consecutive number.
A predefined area where a net dredge, or other piece of gear was deployed. Code consists of 2 parts: Stratum group code number (2 bytes) and stratum number (3 bytes). Stratum group refers to if area fished is inshore or offshore North or South of Cape Hatteras or the type of cruise (shellfish, State of MA, offshore deepwater). The stratum number (third and fourth digits of code) refers to area defined by depth zone. See SVDBS.SVMSTRATA. The fifth digit of the code increases the length of the stratum number for revised strata after the Hague Line was established. Stratum group code: 01 = Trawl, offshore north of Hatteras; 02 = BIOM; 03 = Trawl, inshore north of Hatteras; 04 = Shrimp; 05 = Scotian shelf; 06 = Shellfish; 07 = Trawl, inshore south of Hatteras; 08 = Trawl, Offshore south of Hatteras; 09 = MA DMF; 99 = Offshore deepwater (outside the stratified area). A change in Bottom Trawl Stratum for the Gulf of Maine-Bay of Fundy has been in effect since Spring 1987, and may be summarized as follows: Previous strata: 01350; Present strata: 01351, 01352.
A standard code which represents a species caught in a trawl or dredge. Refer to the SVDBS.SVSPECIES_LIST
Code used to identify species that are sexed at the catch level. See SVDBS.SEX_CODES
Standard two character code for a survey vessel. Refer to SVDBS.SV_VESSEL
Year in which cruise was conducted.
Beginning latitude of tow in decimal degrees.(DECDEG_BEGLAT)
Beginning longitude of tow in decimal degrees.(DECDEG_BEGLON)
A four digit number recording the average depth, to the nearest meter, during a survey gear deployment.(AVGDEPTH)
Surface temperature of water (degrees Celcius).
Salinity at water surface in practical salinity units (PSU).
Bottom temperature (degrees Celsius).
Bottom salinity in Practical Salinity Units (PSU).
Expanded number of individuals of a species caught at a given station.(EXPCATCHNUM)
Expanded catch weight of a species caught at a given station. (EXPCATCHWT)
Measured length of species in centimeters (cm). Measure method differs by species.
Expanded number of specimens at a given length.(EXPNUMLEN)
Meat weight of catch based on LENGTH and NUMLEN of clams, conversion factors hard coded
The list of sql statements:
Select unique list of cruises. Table = MSTR_CRUISE
Select unique set of stations from result of cruise
. Table = UNION_FSCS_SVSTA
Select species abundance and biomass data from result of station
. Table = UNION_FSCS_SVCAT
Select Lengths of species found in catch
. Table = UNION_FSCS_SVLEN
The date:
The date the data was pulled from the database
The expression:
The call used to create the data pul
Other survdat:
calc_stratified_mean()
,
calc_swept_area()
,
get_area()
,
get_survdat_data()
,
get_survdat_scallop_data()
if (FALSE) { # \dontrun{
# Recommended use:
channel <- dbutils::connect_to_database("serverName","userName")
get_survdat_clam_data(channel)
} # }