



The most recent map products from the model are shown below, in addition to an interactive map of the latest prediction.
Status of environmental products from ROMS:
ROMS has been down for 58 days
This example shows both model predictions and environmental covariates used to estimate the models. Change the date and selected variable to explore these relationships in more detail.
Clone the repository: https://github.com/joshcullen/CEG_operationalization
library(curl)
library(httr)
library(tidyverse)
library(glue)
= function(save_dir, file_type, start_date, end_date){
download_files_git
<- switch(file_type,
folder "raster" = "rasters",
"image" = "img")
# Find files from repo folder
<- httr::GET(glue("https://api.github.com/repos/joshcullen/CEG_operationalization/contents/model_prediction/ROMS/{folder}"))
prods ::stop_for_status(prods) #check to make sure no errors w/ request (should return nothing to console if working properly)
httr<- unlist(lapply(content(prods), "[", "name"), use.names = F)
filelist <- data.frame(files = filelist,
prod_df date = gsub("^[A-Za-z]+\\_|\\.tiff$", "", filelist) |>
as.Date()
)
# Filter files by date range
<- prod_df |>
prod_filt filter(date >= as.Date(start_date),
<= as.Date(end_date)) |>
date pull(files)
<- glue("https://raw.githubusercontent.com/joshcullen/CEG_operationalization/main/model_prediction/ROMS/{folder}/{prod_filt}")
git_url <- glue("{save_dir}/{prod_filt}")
file_dest
::multi_download(urls = git_url, destfiles = file_dest)
curl
}
# Download files
download_files_git(save_dir = "~/Downloads",
file_type = "raster",
start_date = "2024-11-08",
end_date = "2024-11-30")
download_files_git(save_dir = "~/Downloads",
file_type = "image",
start_date = "2024-11-08",
end_date = "2024-11-30")