Learn R Programming

dafishr

The goal of dafishr is to provide an easy way to download Vessel Monitoring System (VMS) and analyse data from the Mexican Fishery Commission available at Datos Abiertos initiative searching for “Sistema de Monitoreo Satelital Embarcaciones” in Spanish. Within the package you can find tools that allows you to download VMS data, wrangle and clean raw data, and analyse tracks.

The VMS stands for Vessel Monitoring System, which is adopted on industrial fishing vessels to monitor fishing activity. These data are very important to understand the fishing activity within a country, its dynamics in time and space, and to monitor the activity within Marine Protected Areas (MPAs). Along with data from VMS we also provide layers that are used to clean and map the information. We are currently working on a scientific manuscript which will be related to this work that is currently under review.

You can follow the instruction below using a sample dataset that comes along with the package, or you can use the function on data you can download yourself by using the vms_download() function. See ?vms_data for details on its usage.

Installation

install.packages("dafishr")

You can install development version of dafishr with:

# install.packages("devtools")
devtools::install_github("CBMC-GCMP/dafishr")

If you haven’t devtools package previously installed just delete the comment # from the code above and run both lines.

Where to start

You can start using dafishr suit of functions using the sample_dataset provided with this package, or you can download your own raw-data files using the vms_download() function. Further details are explained in the documentation vignette for this package. You can see the suit of data and functions available within the package here.

Dependencies

This package follows the tidyverse programming style and depends on several package of the family that will be downloaded automatically once installed. Some functions can be applied to a more general object, but these are specifically built for the format of the raw data of the VMS form CONAPESCA (Mexican Fishery Commission). Therefore, these package focused mostly on that format to help user analyse and report data.

How to contribute

The workflow provided here is a work in progress and there are probably some errors we haven’t spotted or considered up to now. If you feel you can contribute to this effort feel free to do so by creating a pull request. If you are an undergrad and you which to help or develop scientific projects using this data you are welcome to contact us. Please, find contact information of the main author here, or via twitter.

Copy Link

Version

Install

install.packages('dafishr')

Monthly Downloads

47

Version

1.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Fabio Favoretto

Last Published

July 22nd, 2024

Functions in dafishr (1.0.1)

preprocessing_vms

Preprocessing Vessel Monitoring System data
vms_clean

Fixing dates and column names
%>%

Pipe operator
vms_download

Download Vessel Monitoring System, VMS, raw data
mx_eez

Mexico shape
clean_land_points

Clean points falling inland
join_ports_locations

Label points when vessel is at port
join_mpa_data

Detect fishing vessel presence within Marine Protected Areas polygons in Mexico
model_vms

Vessel Modeling with Gaussian Mixture Models
mx_coastline_buffer

Buffer around the Mexican coastline
mx_eez_pacific

Economic Exclusive Zone (EEZ) of the Pacific side of Mexico
mpas_buffers

Buffer around remote Marine Protected Areas, MPAs, of Mexico
sample_dataset

Vessel Monitoring System, VMS, sample dataset from Mexican fishery commission
remote_mpas

Remote Marine Protected Areas (MPAs) of Mexico
mx_inland

Area inland of Mexico
mx_coastline

Mexican coastline
pacific_landings

Catch data from the vessels in Mexico
mx_ports

Ports and Marinas of Mexico
mx_shape

Mexico mainland
pelagic_vessels_permits

List of vessels with pelagic fishing permits
all_mpas

Marine Protected Areas (MPAs) of Mexico