--- title: Introduction to artfishr package output: rmarkdown::html_vignette: toc: true toc_depth: 2 vignette: > %\VignetteIndexEntry{Introduction to artfishr} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message = FALSE ) library(artfishr) ``` This vignette provides a general introduction to the [artfishr](https://github.com/fdiwg/artfishr) package and guides users through the available documentation. ## Installation The R [artfishr](https://github.com/fdiwg/artfishr) can be installed from **Github**. As prerequisites, packages `remotes` and `vrule` should be installed. * Package `remotes` can be installed from CRAN using: ```{r, eval=FALSE} install.packages("remotes", repos = "https://cloud.r-project.org") ``` * Package [vrule](https://github.com/fdiwg/vrule) should be installed from GitHub using `remotes`: ```{r, eval=FALSE} remotes::install_github("fdiwg/vrule") ``` Once the `remotes` and `vrule` packages have been installed, the `artfishr` package can be installed using: ```{r, eval=FALSE} 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("artfishr_02_data-requirements-validation")` ## Using `artfishr` for Small-Scale Fisheries Estimation Full tutorial: `vignette("artfishr_03_workflow")` ## Statistical framework of the ARTFISH methodology See: `vignette("artfishr_04_methodology")` ## Artfish visualisations See: `vignette("artfishr_05_visualisation")` ## Exemple of use ```{r, eval=FALSE} # Load sample datasets active_vessels <- read.csv(system.file("extdata/samples/active_vessels.csv", package = "artfishr")) effort <- read.csv(system.file("extdata/samples/effort_fisher_interview.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) ```