Package 'repfishr'

Title: Fisheries data reporting flows
Description: R framework to facilitate fisheries data reporting flows, with first intention to help countries to validate, format and send data to relevant organizations including regional fisheries management organizations or bodies handling data collection reference frameworks, and FAO.
Authors: Emmanuel Blondel [aut, cre] (ORCID: <https://orcid.org/0000-0002-5870-5762>), Arturo Muñoz Albero [ctb]
Maintainer: Emmanuel Blondel <[email protected]>
License: MIT
Version: 0.1.20260528
Built: 2026-07-10 10:40:23 UTC
Source: https://github.com/fdiwg/repfishr

Help Index


Get reporting flow actors

Description

Get reporting flow actors

Usage

get_reporting_flow_actors()

Fills an ICCAT template workbook with a dataset

Description

Fills an ICCAT template workbook with a dataset

Usage

iccat_fill_report_statistical_correspondent(wb, metadata)

Arguments

wb

a Workbook object from openxlsx

sheet

a sheet index

x

an object of class data.frame

startRow

start row index

startCol

start column index

Value

the modified Workbook object


Fills an ICCAT template workbook with dataset characteristics information

Description

Fills an ICCAT template workbook with dataset characteristics information

Usage

iccat_fill_report_dataset_characteristics(
 wb, reporting_flag, from, to,
 report_version, report_type, report_coverage
)

Arguments

wb

a Workbook object from openxlsx

metadata

a named list with business metadata

Value

the modified Workbook object


Fills an ICCAT template workbook with statistical correspondent information

Description

Fills an ICCAT template workbook with statistical correspondent information

Usage

iccat_fill_report_statistical_correspondent(wb, metadata)

Arguments

wb

a Workbook object from openxlsx

metadata

a named list with business metadata

Value

the modified Workbook object


Fisheries data reporting flows

Description

R framework to facilitate fisheries data reporting flows, with first intention to help countries to validate, format and send data to relevant organizations including regional fisheries management organizations or bodies handling #' data collection reference frameworks, and FAO.

Author(s)

Emmanuel Blondel [email protected]

See Also

Useful links:


reporting_actor

Description

reporting_actor

reporting_actor

Format

R6Class

Value

Object of class R6Class for modelling a reporting actor

Public fields

id

id

name

name,

type

type

Methods

Public methods


Method new()

Initializes a reporting sender

Usage
reporting_actor$new(id, name = NULL, type = NULL)
Arguments
id

id

name

name

type

type


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_actor$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>


reporting_flow

Description

reporting_flow

reporting_flow

Format

R6Class

Value

Object of class R6Class for modelling a reporting flow

Public fields

sender

sender object of class reporting_sender

Methods

Public methods


Method new()

Initializes a reporting flow

Usage
reporting_flow$new(sender, sender_type)
Arguments
sender

sender id

sender_type

type of sender


Method getSender()

Get sender

Usage
reporting_flow$getSender()
Returns

an object of class reporting_sender


Method getReceivers()

Get list of valid receivers for the selected sender

Usage
reporting_flow$getReceivers(raw = FALSE)
Arguments
raw

raw

Returns

an object of class data.frame or a list of reporting_receiver


Method getReceiverIds()

Get list of valid receivers IDs

Usage
reporting_flow$getReceiverIds()

Method getReceiver()

Get a receiver by its id

Usage
reporting_flow$getReceiver(id)
Arguments
id

id

Returns

an object of class reporting_organization


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_flow$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>


reporting_format

Description

reporting_format

reporting_format

Format

R6Class

Value

Object of class R6Class for modelling a reporting format

Public fields

id

id

name

name

ref

ref format specification link

spec

format specification object of class format_spec

Methods

Public methods


Method new()

Initializes a reporting task

Usage
reporting_format$new(id, name, ref)
Arguments
id

id

name

name

ref

ref


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_format$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>


reporting_receiver

Description

reporting_receiver

reporting_receiver

Format

R6Class

Value

Object of class R6Class for modelling a reporting receiver

Super class

repfishr::reporting_actor -> reporting_receiver

Public fields

sender

sender

tasks

tasks

Methods

Public methods


Method new()

Initializes a reporting receiver

Usage
reporting_receiver$new(id, name = NULL, type = NULL)
Arguments
id

id

name

name

type

type


Method setSender()

Set sender

Usage
reporting_receiver$setSender(sender)
Arguments
sender

sender object of class reporting_sender


Method getTasks()

Get task IDs

Usage
reporting_receiver$getTasks()
Returns

the list of task IDs


Method getTaskDefinitions()

Get tasks

Usage
reporting_receiver$getTaskDefinitions(raw = FALSE)
Arguments
raw

raw

Returns

a list of reporting_task


Method getTaskDefinitionById()

Get task definition by ID

Usage
reporting_receiver$getTaskDefinitionById(id)
Arguments
id

id

Returns

an object of class reporting_task


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_receiver$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>


reporting_sender

Description

reporting_sender

reporting_sender

Format

R6Class

Value

Object of class R6Class for modelling a reporting sender

Super class

repfishr::reporting_actor -> reporting_sender

Methods

Public methods


Method new()

Initializes a reporting sender

Usage
reporting_sender$new(id, name = NULL, type = NULL)
Arguments
id

id

name

name

type

type


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_sender$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>


reporting_task

Description

reporting_task

reporting_task

Format

R6Class

Value

Object of class R6Class for modelling a reporting task

Public fields

sender

sender

receiver

receiver

id

id

name

name

context

context

measurement

measurement

formats

formats

process_fun

process handler (function)

report_fun

report handler (function)

report_data

data to report

report_metadata

metadata to report

Methods

Public methods


Method new()

Initializes a reporting task

Usage
reporting_task$new(receiver = NULL, file = NULL, task = NULL)
Arguments
receiver

receiver

file

file

task

task (as list object)


Method setSender()

Set sender

Usage
reporting_task$setSender(sender)
Arguments
sender

sender object of class reporting_sender


Method process()

Process data before reporting

Usage
reporting_task$process(data, metadata, path, parallel = FALSE, ...)
Arguments
data

object of class data.frame

metadata

metadata object

path

path for the output file

parallel

whether data validation should be run in parallel

...

any other arguments to be passed to vrule validation method


Method report()

Reports data

Usage
reporting_task$report(data, metadata, path, parallel = FALSE, ...)
Arguments
data

object of class data.frame

metadata

metadata object

path

path for the output file

parallel

whether data validation should be run in parallel

...

any other arguments to be passed to vrule validation method


Method clone()

The objects of this class are cloneable with this method.

Usage
reporting_task$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <[email protected]>