Stock Assessment Graphs Database Web Services
Overview
R interface to access the web services of the ICES Stock Assessment Graphs database https://sg.ices.dk.
- Upload stock function updated and working.
- icesDatsu is used in uploadStock() to check file format and validate the data before upload.
icesSAG 1.5.0 (2024-10-24)
- Update all functions to point to new API.
- Remove token authentication, and move to JWT tokens via icesConnect.
- Introduce the use of caching for some functions to reduce API requests.
- export GET and POST request functions.
- Depreciate redundant graph functions (e.g. YSSBR).
- New functions to set package options: sag_use_token() and sag_messages().
- Link messages package option to quiet argument in get requests.
- GetListStocks now accepts a stock and modifiedAfter arguments for additional server side filtering.
Show all changes in 1.6.2Hide the rest of the changes in 1.6.2
- Remove file upload capability.
icesSAG 1.4.1 (2023-05-11)
- bug fix for stockInfo() and documentation.
icesSAG 1.4.0 (2022-02-17)
- add new function getCustomColumns().
icesSAG 1.3-8 (2019-10-29)
- Display warning if stock name contains – and not -, and quietly fix.
icesSAG 1.3-7 (2019-05-14)
- Allow upload to contiue if errors found by DATSU - gives warning, not error.
- Add function to parse stock status table values due to change in web service XML data structure.
- Fix name in upload format specification CatchLandingsUnits.
icesSAG 1.3-6 (2019-03-13)
- Fixed bug in parsing of XML tables. Function now reads the WSDL data that is included as an internal data set (list of variable names)
- Set all examples to dontrun
- code now checked against lintr for consistent style
icesSAG 1.3-5 (2018-06-08)
- added function getStockSourceData() to download the XML file that was origionally uploaded.
icesSAG 1.3-4 (2018-05-01)
- added function getLatestStockAdviceList()
- export print methods for sag.list and sag.data.frame for fishdata and fishinfo objects used to upload data.
- improved personal access token logic
- improved help documentation
- Added StockCategory, Purpose, ModelType, ModelName to upload functions
- Added filter for assessment Purpose in getSAG()
- fixed bugs arising from changes to xml2 package
- fixed bug arsing from change in ICES Datsu web service
icesSAG 1.3-2 (2017-05-06)
- User sets SAG database access token in a ~/.Renviron_SG file.
- Addressed non CRAN compliant behaviour: user must create .Renviron file themselves.
icesSAG 1.3-1 (2017-05-04)
- Improved createSAGxml() internal data validation.
icesSAG 1.3-0 (2017-04-05)
- Added function uploadStock() to upload data to SAG database via uploadXMLFile(). The functions readSAGxml() and createSAGxml() convert data to and from SAG XML upload format.
- Added functions stockInfo() and stockFishdata() to prepare data for upload. Uploads require user access tokens, available from the main SAG website.
- Added function getStockStatusValues() to get stock status table, and getYSBRSummaryTable() to get yield and SSB per recruit.
- Added functions getSAG*Settings*() and setSAG*Settings*() to get and set graph settings. The function getSAGTypeGraphs() lists the SAG graph types.
- Renamed findKey() to findAssessmentKey().
icesSAG 1.2-1 (2017-03-24)
- Hotfix release to match changes in the underlying web service, regarding assessment keys.
icesSAG 1.2-0 (2016-12-05)
- Added functions get*Graph() to fetch standard graph images, with a corresponding plot() method. The convenience function getSAGGraphs() fetches four commonly used graphs.
- Added argument 'regex' to findKey().
- Fixed bug in getSAG() when different column names appear in stock summaries and combine = TRUE.
- Removed dependency on RCurl and XML by using base functions to download and parse data.
icesSAG 1.1-0 (2016-10-29)
- Added function findKey() to look up a unique stock list key.
- Added function getSAG() to import summary results and reference points, without finding a lookup key first.
- Changed argument in functions getSummaryTable() and getFishStockReferencepoints() from 'year' to 'key'.
- Improved XML parsing, so both leading and trailing white space is removed.
- Improved XML parsing, so "" and "NA" is converted to NA.
- Improved XML parsing, so data frame columns are automatically coerced to the appropriate storage mode (character, numeric, integer).
icesSAG 1.0-0 (2016-08-09)
- Initial release, with functions getListStocks(), getSummaryTable(), and getFishStockReferencePoints().
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 22includes a package overview page
- Examples that run
- 20%4 run in a plain check · 16 never run
- Exported functions with examples
- 95%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 5%
Downloads
Repository
- PRs merged (all time)
- 84%
- Median days to close, 50 most recently updated closed issues
- 124
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
4 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/ices-tools-prod/icessag on 2026-10-21.
Dependencies
Installing icesSAG adds 17 packages (12 with compiled code, 4.6 MB of source tarballs). Heaviest: openssl 1.1 MB, jsonlite 1.0 MB, rlang 766 KB.
Code & Tests
People & History
Previously maintained by Scott Large (1.0).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.6.2Latest2025-05-03 · current release · diff ↗ ·
removed 2 exports
ices_get, ices_postadded 4 exports
sag_get, sag_post, uploadStock, writeSAGxml - RR 4.5.0 released · 2025-04-11
- 1.5.02024-10-24 · diff ↗ ·
removed 5 exports
findKey, getStockSourceData, getTokenExpiration, getYSBRSummaryTable, uploadStockadded 5 exports
ices_get, ices_post, sag_api, sag_messages, sag_use_token - RR 4.4.0 released · 2024-04-24
- 1.4.12023-05-11 · diff ↗
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- unarchivedReturned to CRAN2022-02-17
- 1.4.0
- RR 4.1.0 released · 2021-05-18
- archivedRemoved from CRAN2020-08-07it requires archived package 'icesVocab'
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- unarchivedReturned to CRAN2019-03-12
- 1.3-6
Show 13 earlier eventsHide 13 earlier events
- archivedRemoved from CRAN2019-03-05requires archived package 'icesVocab'
- 1.3-4
- RR 3.5.0 released · 2018-04-23
- unarchivedReturned to CRAN2017-05-07
- 1.3-22017-05-07 · diff ↗
- archivedRemoved from CRAN2017-05-06policy violation
- 1.3-1
- 1.3-02017-04-30 · diff ↗ ·
added 12 exports
createSAGxml, findAssessmentKey, getSAGSettingsForAStock, getSAGTypeGraphs, getSAGTypeSettings, getStockStatusTable, getStockStatusValues, getYSBRSummaryTable, readSAGxml, stockFishdata, stockInfo, uploadStock - RR 3.4.0 released · 2017-04-21
- 1.2-12017-03-24 · diff ↗
- 1.2-02016-12-07 · diff ↗ ·
added 13 exports
findKey, getFishMortality, getFishingMortalityGraph, getFishingMortalityHistoricalPerformance, getLandingsGraph, getRecruitmentGraph, getRecruitmentHistoricalPerformance, getSAG, getSAGGraphs, getSSBHistoricalPerformance, getSpawningStockBiomassGraph, getYSSB, getstock_recruitment - 1.02016-08-09
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2016-08-09
- Total releases
- 12 / 10 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.3
- Download size
- 24 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("icesSAG")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.