This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Download OISST for NEUS | |
## From: https://cran.r-project.org/web/packages/heatwaveR/vignettes/OISST_preparation.html | |
# The packages we will need | |
# install.packages("dplyr") | |
# install.packages("lubridate") | |
# install.packages("ggplot2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(dplyr) | |
library(patchwork) | |
library(forcats) | |
annualCondition <- read.csv("https://raw.githubusercontent.com/Laurels1/Condition/master/data/AnnualRelCond2018_GB.csv", | |
stringsAsFactors = FALSE) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("fedregs") | |
library(fedregs) | |
library(dplyr) | |
library(ggplot2) | |
library(quanteda) | |
library(magick) | |
## For more info, check out the fedregs github repository: | |
## https://github.com/slarge/fedregs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# devtools::install_github("tidyverse/ggplot2") | |
library(ggplot2) | |
# library(dplyr) | |
library(RCurl) | |
# library(rnaturalearth) | |
library(sf) | |
# library(purrr) | |
library(data.table) | |
# library(reshape2) | |
# library(formula.tools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## from https://eliocamp.github.io/codigo-r/2018/02/how-to-make-shaded-relief-in-r/ | |
geom_relief <- function(mapping = NULL, data = NULL, | |
stat = "identity", position = "identity", | |
..., | |
raster = TRUE, | |
interpolate = TRUE, | |
na.rm = FALSE, | |
show.legend = NA, | |
inherit.aes = TRUE) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Print list of stocks for a year | |
#advice_year(2018) | |
advice_year <- function(year = 2018, path = "~/") { | |
list_of_packages <- c("dplyr", "glue", "jsonlite", "flextable", "officer") | |
new_packages <- list_of_packages[!(list_of_packages %in% installed.packages()[,"Package"])] | |
if(length(new_packages)) install.packages(new_packages) | |
library(dplyr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ns:Execute xmlns:ns="http://www.opengis.net/wps/1.0.0" service="WPS" version="1.0.0"> | |
<ns1:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.VSURF</ns1:Identifier> | |
<ns:DataInputs> | |
<ns:Input> | |
<ns1:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">x</ns1:Identifier> | |
<ns:Reference xmlns:xlin="http://www.w3.org/1999/xlink" xlin:href="#XFILE#" mimeType="text/xml" /> | |
</ns:Input> | |
<ns:Input> | |
<ns1:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">y</ns1:Identifier> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vsurf_bb <- function(file_x, | |
file_y, | |
ntree = 100, | |
mtry = 2, | |
nfor_thres = 50, | |
nmin = 1, | |
nfor_interp = 25, | |
nsd = 1, | |
nfor_pred = 25, | |
parallel = "true", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Exploring ICES advice ## | |
library(tabulizer) | |
library(glue) | |
library(dplyr) | |
library(stringr) | |
library(purrr) | |
library(httr) | |
library(jsonlite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
NewerOlder