Package 'icesSD'

Title: Stock Database Web Services
Description: R interface to access the web services of the ICES Stock Database <https://sd.ices.dk>.
Authors: Colin Millar [aut, cre], Scott Large [aut], Arni Magnusson [aut]
Maintainer: Colin Millar <[email protected]>
License: GPL (>= 2)
Version: 2.1.0
Built: 2024-10-24 08:21:31 UTC
Source: https://github.com/ices-tools-prod/icesSD

Help Index


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:


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. "cod.27.7a".

year

the active year of the stock listing, e.g. 2024.

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)