The sspm R package for spatially-explicit surplus production population models

The sspm R package for spatially-explicit surplus production population models - Published in JOSS (2023)

https://github.com/pedersen-fisheries-lab/sspm

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

gam model r spatial surplus
Last synced: 6 months ago · JSON representation ·

Repository

GAM-based Spatial Surplus Production Models

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • Open Issues: 5
  • Releases: 12
Topics
gam model r spatial surplus
Created about 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.Rmd

---
output: github_document
editor_options: 
  markdown: 
    wrap: 72
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# sspm





[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/MIT)
[![R-CMD-check](https://github.com/pedersen-fisheries-lab/sspm/workflows/R-CMD-check/badge.svg)](https://github.com/pedersen-fisheries-lab/sspm/actions)
[![Codecov test
coverage](https://codecov.io/gh/pedersen-fisheries-lab/sspm/branch/main/graph/badge.svg)](https://app.codecov.io/gh/pedersen-fisheries-lab/sspm)
[![Downloads](https://cranlogs.r-pkg.org/badges/sspm?color=brightgreen)](https://CRAN.R-project.org/package=sspm/)
[![Latest
Release](https://img.shields.io/github/v/release/pedersen-fisheries-lab/sspm?label=Latest%20Release)](https://github.com/pedersen-fisheries-lab/sspm/releases/latest)
[![CRAN
Version](https://img.shields.io/cran/v/sspm?label=CRAN%20Version)](https://CRAN.R-project.org/package=sspm)
[![GitHub
Version](https://img.shields.io/github/r-package/v/pedersen-fisheries-lab/sspm?label=GitHub%20Version)](https://github.com/pedersen-fisheries-lab/sspm/blob/main/DESCRIPTION)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.04724/status.svg)](https://www.doi.org/)



The goal of `sspm` is to implement a gam-based spatial surplus
production model, aimed at modeling northern shrimp population in Canada
but potentially to any stock in any location. The package is opinionated
in its implementation of SPMs as it internally makes the choice to use
penalized spatial gams with time lags based on Pedersen et al. (2020).
However, it also aims to provide options for the user to customize their
model.

## Installation

You can install the released version of sspm from
[CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("sspm")
```

You can install the development version from
[GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("pedersen-fisheries-lab/sspm")
# if you wish to build the vignettes:
devtools::install_github("pedersen-fisheries-lab/sspm", build_vignettes = TRUE)
```

## Purpose

The `sspm` package follows a strict workflow, where spatial boundaries
need to be defined and discretized into patches, so that we can apply a
spatial GAM to the data. You can either use of of our built in methods
for discretization or implement your own. Below is an example of a
discretized set of patches:

![](man/figures/patches.png){style="display: block; margin: 1em auto;"
width="70%"}

Then, we provide a framework to ingest trawling and fishing data, and
smoothing the model spatially:

![](man/figures/smoothed.png){style="display: block; margin: 1em auto;"
width="70%"}

Finally, the package allows for calculating the surplus production on a
yearly basis, and model the impact of different variables on that
productivity. You can then produce **one step ahead predictions** for
the biomass.

![](man/figures/preds.png){style="display: block; margin: 1em auto;"
width="70%"}

For an overview of the package design, please see our [workflow
diagram](https://pedersen-fisheries-lab.github.io/sspm/articles/Package_and_workflow_design.html).

### Getting started

See the example vignette for an introduction to the `sspm` workflow.

```{r eval=FALSE}
browseVignettes("sspm")
```

## See also

`sspm` is opinionanted in its workflow and its use of GAMS, but other
frameworks exist to make use of surplus production models (usually not
in spatial capacity, however):

-   [`openmse`](https://openmse.com/features-assessment-models/3-sp/)
-   [`TropFishR`](https://github.com/tokami/TropFishR)

## Issues and support

If you have found an issue with this package or are seeking support,
open an issue on this repository describing the problem and including a
minimal reproducible example.

## Cite this package

You can cite this package like this "we ran a spatial surplus production
model using the the R package sspm (Lucet & Pedersen 2022)". Here is the
full bibliographic reference to include in your reference list
(publication pending, don't forget to update the 'last accessed' date):

> Lucet, V., E. Pedersen (2022). The sspm R package: spatial surplus
> production models for the management of northern shrimp fisheries. The
> Journal of Open Source Software
> ()

Or see the [package citation
page](https://pedersen-fisheries-lab.github.io/sspm/authors.html#citation).

## Code of Conduct

Please note that the sspm project is released with a [Contributor Code
of
Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).]().)
By contributing to this project, you agree to abide by its terms.

Owner

  • Name: Pedersen Quantitative Fisheries Lab
  • Login: pedersen-fisheries-lab
  • Kind: organization
  • Email: eric.pedersen@concordia.ca
  • Location: Montreal, QC

JOSS Publication

The sspm R package for spatially-explicit surplus production population models
Published
June 22, 2023
Volume 8, Issue 86, Page 4724
Authors
Valentin Lucet ORCID
Department of Biology, Concordia University, Montreal, CA
Eric J. Pedersen ORCID
Department of Biology, Concordia University, Montreal, CA, Department of Biology, Memorial University of Newfoundland, St. John's, CA
Editor
Hugo Gruson ORCID
Tags
fisheries management modelling GAM

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Lucet
  given-names: Valentin
  orcid: "https://orcid.org/0000-0003-0268-818X"
- family-names: Pedersen
  given-names: Eric J.
  orcid: "https://orcid.org/0000-0003-1016-540X"
doi: 10.5281/zenodo.8015102
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Lucet
    given-names: Valentin
    orcid: "https://orcid.org/0000-0003-0268-818X"
  - family-names: Pedersen
    given-names: Eric J.
    orcid: "https://orcid.org/0000-0003-1016-540X"
  date-published: 2023-06-22
  doi: 10.21105/joss.04724
  issn: 2475-9066
  issue: 86
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 4724
  title: The sspm R package for spatially-explicit surplus production
    population models
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.04724"
  volume: 8
title: The sspm R package for spatially-explicit surplus production
  population models

GitHub Events

Total
  • Release event: 2
  • Delete event: 1
  • Push event: 28
  • Pull request event: 2
  • Create event: 3
Last Year
  • Release event: 2
  • Delete event: 1
  • Push event: 28
  • Pull request event: 2
  • Create event: 3

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,572
  • Total Committers: 5
  • Avg Commits per committer: 314.4
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 35
  • Committers: 1
  • Avg Commits per committer: 35.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Valentin v****t@g****m 1,555
Eric Pedersen e****n@c****a 10
Hugo Gruson B****o 3
Valentin Lucet v****t@p****n 3
Quang Huynh q****g@b****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 90
  • Total pull requests: 11
  • Average time to close issues: 5 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 0.32
  • Average comments per pull request: 0.45
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • VLucet (75)
  • kellijohnson-NOAA (11)
  • Bisaloo (3)
  • firvine (1)
Pull Request Authors
  • VLucet (7)
  • Bisaloo (2)
  • quang-huynh (1)
  • eric-pedersen (1)
Top Labels
Issue Labels
In PR (4) enhancement (4) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 171 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: sspm

Spatial Surplus Production Model Framework for Northern Shrimp Populations

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 171 Last month
Rankings
Stargazers count: 28.5%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 30.6%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • mgcv * depends
  • sf * depends
  • checkmate * imports
  • cli * imports
  • dplyr * imports
  • magrittr * imports
  • methods * imports
  • purrr * imports
  • rlang * imports
  • stats * imports
  • stringr * imports
  • tibble * imports
  • tidyr * imports
  • units * imports
  • covr * suggests
  • ggforce * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • lwgeom * suggests
  • rmarkdown * suggests
  • sfdct * suggests
  • testthat >= 3.0.0 suggests
  • tweedie * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/draft-pdf.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite
  • stefanzweifel/git-auto-commit-action v4 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action 4.1.4 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite