Once you are granted permission to access the database and have Oracle’s instant Client installed you can make a connection as follows:
channel <- dbutils::connect_to_database(server="servername",uid="yourUsername")
channel
is an object inherited from the DBIConnection-class. This object is passed as an argument to functions in comnlandr
Pulling the raw data takes up to 15 minutes to complete. see get_comland_data
for details. To pull the commercial data with shellfish represented as meat weight (landed = “y”)
data <- get_comland_data(channel,landed="y",endyear=2019,out.dir=here::here())
data
is a data frame (see ?get_comland_data
) for more details
This data is considered the raw data and does not contain any corrections that stock assessment scientists may do. For example, market categories representing parts of a fish are not removed.
The raw data is processed to in several ways
To calculate the processed Raw data with default arguments:
comland(channel)