Version: | 2.1.0 |
Title: | Stock Database Web Services |
Imports: | icesConnect (≥ 1.0.0), httr |
Suggests: | testthat |
Description: | R interface to access the web services of the ICES Stock Database https://sd.ices.dk. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
URL: | https://sd.ices.dk, https://github.com/ices-tools-prod/icesSD |
BugReports: | https://github.com/ices-tools-prod/icesSD/issues |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Language: | en-GB |
NeedsCompilation: | no |
Packaged: | 2024-10-24 08:11:54 UTC; colin |
Author: | Colin Millar [aut, cre], Scott Large [aut], Arni Magnusson [aut] |
Maintainer: | Colin Millar <colin.millar@ices.dk> |
Repository: | CRAN |
Date/Publication: | 2024-10-24 10:30:24 UTC |
Stock Database Web Services
Description
R interface to access the web services of the ICES Stock Database.
Details
Get dataset:
getSD | full stock list, with filtering by stock and year |
Show on screen:
showStock | one stock, in a readable format |
Author(s)
Colin Millar, Scott Large, and Arni Magnusson.
References
ICES Stock Database: https://sd.ices.dk.
ICES Stock Database web services: https://sd.ices.dk/services/.
See Also
Useful links:
Report bugs at https://github.com/ices-tools-prod/icesSD/issues
Get Stock List Data
Description
Get stock list data such as stock code, expert group, assessment type, etc.
Usage
getSD(stock = NULL, year = NULL)
Arguments
stock |
the stock code, e.g. cod.27.47d20. |
year |
the active year of the stock list, e.g. 2016, or NULL to get the most recent year available. |
Value
A data frame.
icesSD-package
gives an overview of the package.
Examples
## Not run:
sddata <- getSD()
cod <- getSD(stock = "cod.27.47d20")
cod22 <- getSD(stock = "cod.27.47d20", year = 2022)
y2022 <- getSD(year = 2022)
## End(Not run)
Build a Stock Database (SD) web service url
Description
utility to build a url with optional query arguments
Usage
sd_api(service, ...)
Arguments
service |
the name of the service |
... |
name arguments will be added as queries |
Value
a complete url as a character string
Examples
sd_api("hi", bye = 21)
sd_api("odata4/StockListDWs4")
Show Stock
Description
Show stock list data for one stock, in a readable format.
Usage
showStock(stock, year = NULL)
Arguments
stock |
the stock code, e.g. |
year |
the active year of the stock listing, e.g. |
Details
If year = NULL
then the newest year is shown.
Value
A single-row data frame, shown on the screen with print.simple.list
.
Note
The stock list data specify the expert group, advice group, assessment type, etc.
See Also
getSD
is the underlying function to get the stock list data.
icesSD-package
gives an overview of the package.
Examples
## Not run:
showStock("cod.27.7a", 2023)
showStock("cod.27.7a", 2024)
## End(Not run)