Skip to content

Instantly share code, notes, and snippets.

@slarge
Last active August 24, 2017 08:10
Show Gist options
  • Save slarge/ca59cf4c2b4ebd7fab643ef636319b63 to your computer and use it in GitHub Desktop.
Save slarge/ca59cf4c2b4ebd7fab643ef636319b63 to your computer and use it in GitHub Desktop.
library(icesSAG)
library(dplyr)
ref_list <- icesSAG::getSAG(stock = NULL, year = 2017, data = "refpts")
stock_list <- jsonlite::fromJSON("http://sd.ices.dk/services/odata3/StockListDWs3",
simplifyDataFrame = TRUE)$value
all_msy <- ref_list %>%
filter(!is.na(FMSY) |
!is.na(MSYBtrigger)) %>%
left_join(stock_list, by = c("AssessmentKey", "StockKeyLabel", "StockDatabaseID", "StockKey")) %>%
select(StockKeyLabel,
StockKeyDescription,
FMSY,
MSYBtrigger)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment