Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
MargaretSiple-NOAA committed Nov 15, 2024
1 parent a3d24e6 commit 332126c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# EFHSDM (in progress)

A package is designed to produce SDMs and SDM visualizations as part of the 2022 EFH 5-year review. It is designed to be moderately flexible and can be expanded in the future, but for now assumes that abundance prediction is the end goal.
A package is designed to produce SDMs and SDM visualizations as part of the 2023 EFH 5-year review. It is designed to be moderately flexible and can be expanded in the future, but for now assumes that abundance prediction is the end goal.

The most recent version of this package was built in R 4.1.2.
The most recent version of this package was built in R 4.4.1.

Authors:

@jeremyharris7
@James-Thorson-NOAA
@Ned-Laman-NOAA
@MasonSmith-NOAA
@MargaretSiple-NOAA
@jodipirtle

@Ned-Laman-NOAA


# Installation
`EFHSDM` can be installed using the following code:
```r
devtools::install_github("afsc-gap-products/akgfmaps", build_vignettes=TRUE)

devtools::install_github("alaska-groundfish-efh/EFHSDM@main", dependencies = TRUE, build_vignettes = FALSE)

# Development version - not currently recommended unless you are an active developer
# devtools::install_github("alaska-groundfish-efh/EFHSDM@dev", dependencies = TRUE, build_vignettes = FALSE)
```


Expand All @@ -34,7 +36,7 @@ xtable, XML, raster, rgdal, gstat, sp, sf, stars, akgfmaps, ggplot, viridis, gri
# Roadmap
Sections of the analysis are included as separate scripts. The general strategy is to use the functions provided in `Functions_Maxent.R` and `Functions_GamModel.R` to produce models, abundance rasters, effects estimates, and other outputs in a standard-ish format. Then, the scripts `Functions_LoadMap.R` and `Functions_Ensemble.R` provide more general methods for mapping or plotting model outputs and combining inferences from multiple models.

The `Meatgrinder.R` script provides an example of a workflow that combines these functions to make an ensemble SDM and the accompanying maps. It contains control logic designed to accommodate the needs of the 2022 EFH 5-year Review process, which involved running and keeping track of over 200 individual species/lifestages.
The `Meatgrinder.R` script provides an example of a workflow that combines these functions to make an ensemble SDM and the accompanying maps. It contains control logic designed to accommodate the needs of the 2023 EFH 5-year Review process, which involved running and keeping track of over 200 individual species/lifestages.


1) `Functions_Maxent.R` - this script provides the functions for quickly using maxnet models.
Expand Down Expand Up @@ -97,9 +99,9 @@ The functions are typically called top to bottom. Begin by fitting a model using

## Simple example

All of the rasters used for the EFH 2022 Five-Year Review are stored on a shared drive at NOAA. For the purposes of the following example, the datasets are embedded in the package. For additional rasters and datasets, contact the package developers or submit a data [product request](https://github.com/alaska-groundfish-efh/product-requests/issues).
All of the rasters used for the EFH 2023 Five-Year Review are stored on a shared drive at NOAA. For the purposes of the following example, the datasets are embedded in the package. For additional rasters and datasets, contact the package developers or submit a data [product request](https://github.com/alaska-groundfish-efh/product-requests/issues).

For example purposes, we will used only the last years of data and only a few covariates. *Note that this means that the map you produce will look different from the final map produced in the 2022 EFH 5-year Review.*
For example purposes, we will used only the last years of data and only a few covariates. *Note that this means that the map you produce will look different from the final map produced in the 2023 EFH 5-year Review.*

### Load EFHSDM
```r
Expand All @@ -116,7 +118,8 @@ region.data$sponge <- as.integer(region.data$sponge > 0)
region.data$logarea <- log(region.data$area)


raster.stack <- raster_stack
raster.stack <- terra::rast(terra::unwrap(raster_stack))
#raster.stack <- raster::raster(raster.stack) # option to turn this spatraster stack into a regular raster stack (only works if you don't crop )
```

### Next we will fit a basic Poisson model and generate an abundance map
Expand Down

0 comments on commit 332126c

Please sign in to comment.