This file contains hidden or 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
### Example script for checking status of URLs ### | |
library(httr) | |
library(glue) | |
# Define info for wind | |
get_date <- Sys.Date() | |
product_erddap = "erdQCwindproducts1day" | |
variable_erddap = "wind_v" |
This file contains hidden or 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
# Example for generating weighted KDE using {ks} | |
library(tidyverse) | |
library(ks) | |
library(sf) | |
library(terra) | |
library(tidyterra) | |
This file contains hidden or 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
### Example for quickly plotting bathymetry data from Cloud-optimized geotiff (COG) via GEBCO ### | |
library(tidyverse) | |
library(sf) | |
library(terra) | |
library(tidyterra) | |
library(rnaturalearth) | |
library(cmocean) |
This file contains hidden or 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
## Example for calculating UD overlap based on indices from Fieberg and Kochanny (2005) | |
library(move) | |
library(raster) | |
# Load example data from {move} | |
data("dbbmmstack") |
This file contains hidden or 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
#creation of fake data for example | |
dat<- data.frame(subregion_name = rep(c("DRTO","KEYW","BISC"), each = 5), | |
year = rep(2014:2018)) | |
dat.new<- dat %>% | |
#create new variable to index whether SCTLD has been detected or not; replace these years with the year of first detection per region | |
mutate(sctld_pres = case_when(subregion_name == "DRTO" & year < 2020 ~ "NotDetected", | |
subregion_name == "KEYW" & year < 2017 ~ "NotDetected", | |
subregion_name == "BISC" & year < 2015 ~ "NotDetected", |
This file contains hidden or 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(tidyverse) | |
library(sf) | |
library(rnaturalearth) | |
## SET YOUR WORKING DIRECTORY ACCORDINGLY | |
## Load your data here | |
dat<- read.csv("CrystalRiver_Bimini_Cm_data.csv") |
This file contains hidden or 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
### Example for creating a facet plot by year for mapping spatiotemporal patterns of FP ### | |
library(tidyverse) | |
### import data | |
capture_data <- read.csv("Data/2021-10_Cm_capture_data.csv") | |
fp_scores <- read.csv("Data/2021-10_Cm_FP_Scores.csv") |