Skip to content

tokami/DATRASextra

Repository files navigation

DATRASextra

R-CMD-check License: GPL v3

Makes working with ICES DATRAS extra easy!

DATRASextra is an R package that extends the functionality of the ICES DATRAS database and the DTU Aqua DATRAS R package, providing practical tools for downloading, cleaning, standardising, analysing, and visualising bottom-trawl survey data.

Key features include:

  • Streamlined workflows for downloading, cleaning, and preparing DATRAS data
  • Calculation and visualisation of swept area, catch rates, biomass, and numbers-at-length for custom length classes
  • Support for reproducing key components of the FishGlob data-processing workflow
  • Tools for species harmonisation, taxonomic standardisation, and exploratory diagnostics

⚠️ Beta version: DATRASextra is currently under active development and some functions or workflows may change in future versions. Please report bugs, issues, or feature requests here: https://github.com/tokami/DATRASextra/issues

Installation

DATRASextra can be installed from GitHub:

## Install the package
remotes::install_github("tokami/DATRASextra")

Or the development version:

## Install the package
remotes::install_github("tokami/DATRASextra", ref = "dev")

Note that if you want to install vignettes locally, you have to use an extra argument:

## Install the package with vignettes
remotes::install_github("tokami/DATRASextra", build_vignettes = TRUE)

Overview

DATRASextra provides a set of powerful functions that guide you through a typical workflow with the ICES DATRAS database: from discovering available surveys, to downloading, cleaning and checking the data, and finally making quick plots of survey coverage and hauls. The table below summarises the main user-facing functions.

Function Description
list_surveys() List available surveys in the ICES DATRAS database.
plot_datras_overview() Plot haul locations
download_datras() Download the full or filtered subset of the DATRAS database.
read_datras() Read DATRAS data into R.
clean_datras() Clean and harmonise DATRAS data.
check_outliers() Flag (and remove) hauls with invalid or extreme values.
prune_datras() Prune DATRAS data by removing or filtering problematic records.
add_swept_area() Calculate swept area per haul using gear-specific median values by gear type.
check_lengths() Check length information and identify suspicious length distributions.
add_numbers_at_length() Calculate the numbers by specified length classes and add it to the HH data set.
add_total_numbers_by_haul() Calculate total numbers by haul and add it to the HH data set.
check_weights() Check weight information and length–weight consistency.
add_weight_at_length() Convert the numbers at length classes to weight at length classes and add it to the HH data set.
add_total_weight_by_haul() Calculate total weight by haul and add it to the HH data set.

Getting started

The best introduction to DATRASextra is the tutorial vignette, which walks through a complete workflow: downloading data from the DATRAS database, performing recommended quality checks and data processing steps, and transforming survey observations into standardised numbers and biomass by species, haul, and length class for use in abundance and biomass index calculations.

The tutorial is available on the package website under Articles → Getting started: https://tokami.github.io/DATRASextra/articles/datrasextra-tutorial.html

If you installed the package with build_vignettes = TRUE, you can also open the tutorial directly from R:

vignette("datrasextra-tutorial")

Getting help

All functions in DATRASextra are documented and include examples. Help pages can be accessed using help() or ?, for example:

?check_lengths

Additional tutorials and worked examples are available on the package website, demonstrating common workflows and applications of DATRAS survey data: https://tokami.github.io/DATRASextra/

If your question is not answered by the package documentation or the pkgdown site, you are welcome to contact the maintainer, Tobias Mildenberger. If you find a bug or would like to request a feature, please open an issue on GitHub with: https://github.com/tokami/DATRASextra/issues/new/choose

Citation

To see how to cite DATRASextra in your work, run:

citation("DATRASextra")

Related software

DATRASextra was originally developed to extend the functionality of the R package DATRAS, which provides tools for accessing and working with ICES DATRAS survey data. While DATRASextra continues to build on some of this functionality, it has evolved into a broader framework for downloading, managing, processing, and analysing DATRAS data, with an increasing share of functionality implemented directly within the package.

An alternative R package for accessing DATRAS data is icesDatras, which is maintained by ICES and provides a direct interface to the DATRAS database.

Funding

The development of DATRASextra was funded by the European Maritime and Fisheries Fund (EMFF) through the project: FISHMAP - FISH distribution and its role in fisheries Management Advice and marine spatial Planning (EFMVB-23-0031), which is co-financed by the EU through the Danish Maritime, Fisheries and Aquaculture Fund.


Logo: Co-funded by the EU

Logo: Co-funded by the EU

About

Extra functions for DTUAqua's DATRAS R package.

Topics

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE.md
GPL-3.0
Licence.txt

Stars

Watchers

Forks

Packages

 
 
 

Contributors