Skip to contents

This vignette provides a general introduction to the artfishr package and guides users through the available documentation.

Installation

The R artfishr can be installed from Github.

As prerequisites, packages remotes and vrule should be installed.

  • Package remotes can be installed from CRAN using:
install.packages("remotes", repos = "https://cloud.r-project.org")
  • Package vrule should be installed from GitHub using remotes:
remotes::install_github("fdiwg/vrule")

Once the remotes and vrule packages have been installed, the artfishr package can be installed using:

remotes::install_github("fdiwg/artfishr")

Once installed, artfishr can be loaded using library(artfishr) or require(artfishr)

Data Requirements and Validation

For detailed information on the required input datasets and validation procedures, see: vignette("02_data-requirements-validation")

Using artfishr for Small-Scale Fisheries Estimation

Full tutorial: vignette("03_artfishr-workflow")

Statistical framework of the ARTFISH methodology

See: vignette("04_artfish-methodology")

Artfish visualisations

See: vignette("05_artfish-visualisations")

Exemple of use

# Load sample datasets
active_vessels <- read.csv(system.file("extdata/samples/active_vessels.csv", package = "artfishr"))
effort <- read.csv(system.file("extdata/samples/effort.csv", package = "artfishr"))
landings <- read.csv(system.file("extdata/samples/landings.csv", package = "artfishr"))
active_days <- read.csv(system.file("extdata/samples/active_days.csv", package = "artfishr"))

# Validate data 
validate_input_datasets(
  active_vessels = active_vessels,
  effort = effort,
  effort_source = "fisher_interview",
  landings = landings,
  active_days = active_days
)

#Run artfish
report <- artfishr::compute_report(
  active_vessels = active_vessels,
  effort = effort,
  effort_source = "fisher_interview",
  active_days = active_days,
  active_vessels_strategy = "closest",
  landings = landings,
  minor_strata = "minor_stratum"
)

#See result
str(report, max.level = 1)