Introduction to Tivy

library(Tivy)

Overview

Tivy (Toolkit for Investigation and Visualization of Young Anchovies) is an R package specialized in processing and analyzing fisheries data from Peru’s anchovy (Engraulis ringens) fishery. It provides tools for:

Basic Usage

Processing Fishing Data

# Process fishing hauls
processed_hauls <- process_hauls(
  data_hauls = your_hauls_data,
  verbose = TRUE
)

# Process fishing trips
processed_trips <- process_fishing_trips(
  data_fishing_trips = your_trips_data,
  verbose = TRUE
)

# Process length frequency data
processed_lengths <- process_length(
  data_length = your_length_data,
  verbose = TRUE
)

Coordinate Conversion

# Convert DMS coordinates to decimal degrees
coordinates <- c("15°30'S", "75°45'W")
decimal_coords <- dms_to_decimal(coordinates, hemisphere = "S")

Distance Calculations

# Calculate distance to coast
distances <- coast_distance(
  lon = c(-77.0, -76.5),
  lat = c(-12.0, -11.5),
  unit = "nm"
)

Juvenile Analysis

# Calculate juvenile percentages
juvenile_results <- summarize_juveniles_by_group(
  data = your_data,
  group_cols = "date",
  length_cols = c("8", "9", "10", "11", "12"),
  juvenile_limit = 12
)

Data Requirements

The package expects data with specific column patterns:

Column names are automatically detected using pattern matching.

Built-in Data

The package includes Peru coastline data:

data("peru_coastline")
head(peru_coastline)

For more detailed examples, see the function documentation.

References

This package implements standard methods from:

For complete citations, see individual function documentation and topic-specific vignettes.