Skip to contents

Create a map showing predicted probabilities by zone

Usage

predict_map(
  project,
  mod.name = NULL,
  policy.name = NULL,
  spat,
  zone.spat,
  outsample = FALSE,
  outsample_pred = NULL
)

Arguments

project

Name of project

mod.name

Name of model

policy.name

Name of policy scenario

spat

A spatial data file containing information on fishery management or regulatory zones boundaries. `sf` objects are recommended, but `sp` objects can be used as well. See [dat_to_sf()] to convert a spatial table read from a csv file to an `sf` object. To upload your spatial data to the FishSETFolder see [load_spatial()].

zone.spat

Name of zone ID column in `spat`.

outsample

Logical, indicating if predict_map() is being used for creating map of out-of-sample predicted fishing probabilities outsample = TRUE or policy scenario outsample = FALSE.

outsample_pred

A dataframe with fishing location and predicted probabilities for out-of-sample data. outsample_pred = NULL by default and when plotting policy scenarios.

Value

A map showing predicted probabilities

Details

This function requires that model and prediction output tables exist in the FishSET database when plotting policy scenario maps.

Examples

if (FALSE) {

predict_map(project = "scallop", policy.name = "logit_c_mod1 closure_1", 
            spat = spat, zone.spat = "TEN_ID")

}