| images | ||
| README.md | ||
smartR
Bioeconomic analysis platform for fisheries management
Overview
The Problem
Demersal fisheries — trawl fleets targeting bottom-dwelling species like hake, mullet, and shrimp — are among the most economically and ecologically complex systems to manage. Stocks are declining across the Mediterranean and beyond, driven not just by the total volume of catch, but by where and when fishing happens. Juvenile fish concentrate in specific nursery areas. Spawning grounds cluster in predictable zones. Yet traditional fisheries management treats the sea as a uniform space, applying blanket effort limits or mesh size regulations that ignore this spatial reality entirely.
The result: managers make decisions without knowing which areas to protect, scientists cannot quantify the trade-off between ecological recovery and fleet economics, and fishing communities face restrictions that feel arbitrary because the underlying spatial logic was never made explicit.
The Gap
Existing bio-economic modelling tools either lack spatial resolution, require proprietary software, or cannot model the economics of individual vessels alongside population dynamics. Most cannot handle mixed fisheries — where a single trawl haul lands a dozen species simultaneously. None combine spatial closures, trophic interactions between species, and vessel-level profit optimisation in a single open-source workflow that researchers can inspect, modify, and extend.
Meanwhile, the data already exists. Modern fishing vessels carry VMS (Vessel Monitoring System) or AIS transponders that record their position every hour. Scientific bottom trawl surveys measure fish length distributions across the same sea. Port landing records link catches to trips. The infrastructure for spatially explicit management is in place — what was missing was a tool to connect it all.
The Solution
smartR implements the SMART model (Spatial MAnagement of demersal Resources for Trawl fisheries) as a fully integrated, open-source R package. It takes raw VMS tracking data, scientific survey records, and port landing data as inputs, and produces — through a modular eight-step GUI workflow — a complete picture of where fishing effort should be redistributed to protect fish stocks while minimising economic damage to fleets.
Analysts can define a proposed spatial closure, run a stochastic simulation at the level of individual vessels, and see projected changes in stock biomass, fishing mortality, revenues, and costs — before any restriction is put in place. The entire workflow, from raw data to scenario output, runs in R and is fully reproducible.
Figure 1 — Architecture and workflow of the smartR package. This diagram shows the full eight-module pipeline that takes a user from raw input data to management scenario output. Each module is represented as a vertical strip showing its inputs (left), the operations it performs (centre), and the outputs it passes to the next step (right). Starting from the bottom, Module 1 (Environment) sets up the spatial grid and environmental layers. Module 2 (Effort) processes vessel tracking data. Module 3 (Fishing Grounds) clusters the study area into homogeneous zones. Module 4 (Register) loads vessel characteristics. Module 5 (Production) estimates catch rates per fishing ground. Module 6 (Mixture) decomposes fish populations into age cohorts. Module 7 (Simulation) runs management scenario optimisation at the vessel level. Module 8 (Assess) performs stock assessment on the simulated outcomes. The arrows show how outputs from each module feed forward as inputs to the next, creating a fully connected, reproducible analytical chain.
Key Features
| Feature | Description |
|---|---|
| Spatial effort mapping | Processes VMS/AIS vessel tracking data into gridded fishing hours by area |
| Fishing ground detection | Clusters effort, bathymetry, and seabed data into homogeneous fishing zones |
| LPUE estimation | Estimates landings per unit of effort per fishing ground via a NNLS production model |
| Cohort decomposition | Bayesian MCMC mixture analysis to reconstruct age structure from length-frequency data |
| Scenario simulation | Vessel-level stochastic optimisation of effort displacement under user-defined management strategies |
| Stock assessment | MICE-class cohort model with Statistical Catch-At-Age for single- and multi-species assessments |
| Trophic interactions | Unique among comparable tools: models predator–prey relationships between exploited species |
| Full R implementation | All objects and intermediate metadata remain accessible; package is freely customisable under GPL ≥ 2 |
Methodology
- Environment — Define the case study grid, download bathymetry from NOAA ETOPO1, and load seabed classification (EUNIS scheme) as a presence/absence matrix per cell.
- Effort — Extract vessel tracks from one or more vmsbase SQLite databases; identify fishing positions; aggregate to gridded fishing hours (Fishing Pattern).
- Fishing Grounds — Apply the SKATER spatial clustering algorithm (spdep) to seabed type, depth, and effort intensity, grouping adjacent cells into homogeneous fishing grounds.
- Register — Load fleet register data (vessel ID, length overall, engine power, home port); geocode ports; compute average distance from each fishing ground to each harbour.
- Production — Join landing records to effort patterns per vessel and trip; apply a logit model to classify targeted versus by-catch activity; estimate LPUE per fishing ground via non-negative least squares regression.
- Mixture & Cohorts — Decompose length-frequency distributions from surveys and commercial fishery samples into age cohorts using Bayesian MCMC (JAGS) with von Bertalanffy or Gompertz growth curves; convert lengths to biomass via the length–weight relationship.
- Simulation — Specify management strategy (e.g. spatial closure), costs, and market prices; run stochastic vessel-level optimisation maximising profit (revenues minus costs) under the selected scenario; evaluate absolute and relative change in effort distribution.
- Assess — Feed simulated landings into a Statistical Catch-At-Age stock assessment following the MICE framework; estimate recruits, fishing mortality, and stock biomass.
Screenshots
Figure 2 — Environment panel. This is the first module the analyst interacts with, and it establishes the spatial foundation for the entire study. The left plot shows the case study grid — a regular lattice of cells covering the sea area of interest, each cell representing the smallest unit of spatial resolution. The centre plot shows the same area overlaid with the −200 m and −1,000 m isobaths (depth contour lines), which are critical for understanding where different species and fishing activities are distributed across the continental shelf and slope. The right plot shows the seabed substrate classification, colour-coded by habitat type according to the EUNIS marine habitat scheme — distinguishing between muddy, sandy, rocky, and mixed bottoms. This substrate information matters because different species prefer different habitats, and because the type of seabed directly influences where trawling is both ecologically impactful and economically viable. Together, these three layers define the physical environment within which all subsequent effort and biological data will be interpreted.
Figure 3 — Effort panel. This module transforms raw vessel tracking records into a spatially explicit picture of where fishing actually happens. The left plot shows all raw VMS or AIS position pings for the fleet in a given year — at this stage they include both fishing activity and transit between harbour and grounds, making them visually dense and difficult to interpret. The centre plot shows the same positions after classification: green points are identified as active fishing (based on vessel speed, heading, and gear type), while red points are steaming or in-harbour positions. This distinction is essential because including transit time in effort estimates would produce a heavily distorted picture of where fishing pressure falls. The right plot shows the final output of this module: a gridded fishing effort map expressed in fishing hours per cell, creating a clean spatial heat map of where the fleet concentrates its activity. This Fishing Pattern becomes the backbone of all downstream production and simulation analysis.
Figure 4 — Fishing Grounds panel. Rather than analysing every individual grid cell in isolation, smartR groups cells into larger, ecologically and operationally coherent fishing grounds using spatial clustering. This panel shows the full output of that process. The top-left plot shows the Calinski-Harabasz index across different numbers of clusters — a standard metric for evaluating cluster quality, where higher values indicate better-defined groupings. The top-right plot shows the Silhouette score, which measures how well each cell fits its assigned cluster versus neighbouring ones. Together these two diagnostics help the analyst choose the optimal number of fishing grounds. The bottom-left map shows the resulting regionalization: the study area divided into distinct colour-coded fishing zones, each one a coherent combination of depth range, seabed type, and effort intensity. The remaining plots show effort distribution by region, depth range per region, and seabed composition per region — giving the analyst a full statistical portrait of each fishing ground before moving to production estimation.
Figure 5 — Register panel. This module loads and visualises the technical profile of the fishing fleet. Each vessel in the dataset is characterised by its main gear type (top left), secondary gear (top centre), hull material (top right), year of construction (bottom left), length overall in metres (bottom centre), and main engine power in kilowatts (bottom right). These characteristics matter for the economic model: a longer, more powerful vessel operating far from its home port incurs very different costs than a small inshore vessel fishing nearby. The port of registration for each vessel is geocoded, and the module computes the average distance from each vessel's harbour to each fishing ground — a key input for estimating the fuel and time costs associated with different spatial management scenarios. The fleet profile visualised here also helps identify structural patterns, such as whether large and small vessels tend to use different grounds, which can be important for designing closures that are equitable across fleet segments.
Figure 6 — Mixture panel. Fish population data typically arrives as a length-frequency distribution — a histogram of how many individuals of each length were caught. To assess stock health and simulate management impacts, it is necessary to convert this into an age-frequency distribution: knowing not just how big the fish are, but how old they are. This module performs that conversion using a Bayesian MCMC approach. The top-left plot shows the Markov chain evolution of the asymptotic length parameter (L∞) across iterations, with multiple coloured chains indicating different cohorts. The top-right scatter plot shows the joint distribution of L∞ and the growth rate K — the two key parameters of the von Bertalanffy growth equation — allowing the analyst to inspect parameter correlation and convergence. The bottom-left boxplot shows the precision of the cohort slicing across age classes, and the bottom-right shows the standard deviation. When these diagnostics indicate good convergence and low uncertainty, the analyst can be confident that the length-frequency data has been reliably decomposed into distinct age cohorts — which then feed into both the simulation and stock assessment modules.
Figure 7 — Simulation panel. This is the policy-facing output of the entire workflow. Having built up the environmental, effort, production, fleet, and biological models in the previous modules, the analyst now specifies a management strategy — in this case, a spatial closure that removes one or more fishing grounds from the available area — and runs a stochastic simulation. The simulator operates at the level of individual vessels, seeking to maximise each vessel's profit (revenues minus costs) given the constraint of the closure, slightly redistributing effort across the remaining grounds at each iteration. The left map shows the absolute change in fishing effort (in hours) per cell: red areas gain effort as displaced vessels redirect their activity, blue areas lose it. The right map shows the same result as a percentage change relative to the baseline, making it easier to identify which grounds absorb the greatest redistribution pressure. These two maps, combined with the economic and biological outputs produced alongside them, give managers a concrete, quantified preview of what a proposed spatial restriction would actually mean for fleets and fish stocks before it is ever enacted.
Scientific Context
smartR was developed within the MANTIS Project (Marine protected Areas Network Towards Sustainable fisheries in the Central Mediterranean), funded by the European Commission — DG MARE under grant Mare/2014/41. The package operationalises the Ecosystem Approach to Fishery (EAF) by enabling analysts to design and evaluate Fishery Restricted Areas (FRAs) before deployment, protecting Essential Fish Habitats while forecasting fleet-level economic outcomes.
Compared to analogous spatial fisheries modelling suites (DISPLACE, InVEST, ISIS-Fish, SIMFISH, TI-FishRent), smartR is the only tool combining mixed-fisheries modelling, trophic interaction modelling, and vessel-level agent-based effort displacement — all within a single open-source R package.
Publication: D'Andrea L et al. (2020). smartR: An R package for spatial modelling of fisheries and scenario simulation of management strategies. Methods in Ecology and Evolution, 11, 859–868. https://doi.org/10.1111/2041-210X.13394
Stack
R JAGS vmsbase spdep marmap R6 MCMC GIS