View source: R/get_landings_palmer.R
get_landings_palmer | R Documentation |
Extract landings information (trplndlb
,trplivlb
,spplndlb
,spplivlb
) in lbs from the databse ADIOS! This function requires no knowledge of sql.
NOTE: Eventually hope to pull numlen
, and len
also. This resides in a different table in ADIOS
For direct sql usage please see get_anything_sql
function
get_landings_palmer(
channel,
area = "all",
gear = "all",
year = 1994,
tonnage = "all",
species = "all",
gearCode = "NEGEAR2",
species_itis = FALSE
)
channel |
DBI Object. Inherited from DBIConnection-class. This object is used to connect
to communicate with the database engine. (see |
tonnage |
Numeric vector. Tonnage classes (toncl2) (1 - 8) where 1 = 10-19 tons, 2 = 20-29 tons etc |
species |
Numeric vector. Species codes (nespp3 or species_itis) |
gearCode |
Character string. Relates to the codes supplied in |
species_itis |
Boolean. Indicating if species values are nespp3 (FALSE) or species_itis (TRUE).Default = FALSE |
areas |
Numeric vector. Statistical areas (area) |
gears |
Numeric vector. Gear types (negear2) |
years |
Numeric vector. Containing the years to search over |
A list is returned:
data
containing the result of the data pull (year, month, day, negear, negear2, toncl2, nespp3, nespp4, species_itis, market_code, area, ntrips, mesh, df, da, spplndlb, spplivlb, trplndlb, trplivlb, GIS_LAT, GIS_LON )
sql
the resulting sql statement based on user input
colNames
a vector of the table's column names
Use the data dictionary (http://nova.nefsc.noaa.gov/datadict/) for field name explanations
You will need to obtain read only privilages to access ADIOS! The ADIOS landings database (MV_CF_Landings) contains 35 million records. If you try to pull the entire database it is likely you will run out of memory.
connect_to_database
Other get functions:
get_age_length()
,
get_anything_sql()
,
get_areas()
,
get_gears()
,
get_landings_length()
,
get_landings()
,
get_locations()
,
get_ports()
,
get_species_itis()
,
get_species()
,
get_vessels()
## Not run:
# extracts landings for cod (081) in area 500 for ton class >=10 by <20 using gear types (1,2,10)
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
get_landings(channel,area=c(500,600),gear=c(1,2,10),year=c(1999),tonnage=c(1),species=81)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.