Learn R Programming

Tivy

Toolkit for Investigation and Visualization of Young Anchovies

Tivy is an R package specialized in processing and analyzing fisheries data from Peru's anchovy (Engraulis ringens) fishery. It facilitates the handling of information from fishing trip logbooks, size records, hauls, and official announcements issued for preventive closures.

Copy Link

Version

Install

install.packages('Tivy')

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Hans Ttito

Last Published

July 23rd, 2025

Functions in Tivy (0.1.1)

generate_download_url

Generate download URL
calculate_euclidean_distance

Calculate Euclidean distance
coast_distance

Vectorized distance to coast
plot_fishing_zones

Plot fishing zones
merge_length_fishing_trips_hauls

Merge fishing trips, length and hauls data
download_file

Download file
dms_to_decimal

Convert latitude or longitude to decimal degrees
plot_juvenile_analysis

Plot juvenile analysis
process_hauls

Process fishing haul data from PRODUCE sitrapesca files
extract_token

Extract token
faenas_bitacora

Fishing trips
peru_coast_parallels

Lines parallel to the Peruvian coast
process_json_response

Process JSON response
generate_robust_colors

Generate robust color palette for any number of groups
validate_length_data

Validate processed length data quality
fetch_fishing_announcements

Fetch fishing announcements from external sources
extract_numeric_values

Extract length values from column names
extract_cookies

Extract cookies
fetch_announcements_batch

Fetch announcements batch
create_download_dir

Create download directory
plot_zones_static

Generate static plot of polygons on a map
plot_zones_interactive

Generate interactive plot of polygons with leaflet
validate_polygon_data

Validate data for polygon creation
customize_juvenile_axes

Helper function to customize axes in juvenile plots
convert_to_date

Convert dates to standard format
convert_numbers_to_weight

Convert numbers to weight
extract_pdf_data

Extract data from PDF announcements
create_fishery_dashboard

Create fishery dashboard
extract_points_between_latitudes

Extract points between latitudes
find_column

Find column by pattern matching
find_columns_by_pattern

Find columns by pattern
get_length_range

Get length range from frequencies
get_main_page

Get main page
summarize_juveniles_by_group

Summarize juveniles by group
tallas_bitacora

Length data sampled from hauls made by vessels in the Peruvian sea.
process_fishing_trips

Process fishing trip data from PRODUCE sitrapesca files
prepare_polygons

Prepare polygons from coordinate data
process_length

Process length data from hauls
format_extracted_data

Format extracted announcement data
land_points

Points on land
make_api_request

Make API request
validate_fishing_trip_data

Validate processed fishing trip data quality
validate_haul_data

Validate processed haul data quality
process_pdf_text

Process PDF text content
find_parallel_line

Find parallel line by distance
weight_by_catch

Weight length frequencies by total catch
process_weighting_block

Process weighting block
peru_coastline

Peruvian coastline
interpolate_point

Interpolate point on line
safe_numeric_conversion

Safe numeric conversion
peru_isoparalitoral_areas

Isoparalittoral areas
is_date_in_range

Check date range
add_juvenile_reference_line

Helper function to add reference line to juvenile plots
apply_catch_weighting

Apply catch weighting to data frame
add_variables

Add variables for juveniles, sample length, distance to coast, and distance category
calculate_distances_vectorized

Calculate vectorized distances to coastline
calculate_juvenile_percentage

Calculate juvenile percentage
calculate_fish_weight

Calculate fish weight from length
calculate_juvenile_statistics

Calculate juvenile statistics for a group
calculate_haversine_distance_wgs84

Calculate distance using Haversine formula
apply_juvenile_theme

Helper function to apply theme to juvenile plots
calculate_coast_longitude

Calculate coast longitude
add_juvenile_geoms

Helper function to add geoms to juvenile plots
calas_bitacora

Fishing hauls
Tivy-package

Tivy: Toolkit for Investigation and Visualization of Young Anchovies
add_juvenile_faceting

Helper function to add faceting to juvenile plots
create_juvenile_base_plot

Helper function to create base plot for juvenile analysis
calculate_manhattan_distance

Calculate Manhattan distance between coordinates
calculate_grid_distance

Calculate grid distance
check_required_packages

Check required packages
build_request_params

Build request parameters