quick_map: quick_map

View source: R/quick_map.R

quick_mapR Documentation

quick_map

Description

This function generates a simple leaflet plot for the output from Mar.bycatch functions.

Usage

quick_map(
  data = NULL,
  plotMARF = TRUE,
  clusterMARF = TRUE,
  overloadMARF = "cluster",
  plotMARFSurf = FALSE,
  marfSpp = NULL,
  plotISDB = TRUE,
  clusterISDB = TRUE,
  overloadISDB = "cluster",
  plotISDBSurf = FALSE,
  isdbField = "EST_COMBINED_WT",
  isdbSpp = NULL,
  title = NULL,
  vms = NULL,
  bathy = TRUE,
  surfRes = "low"
)

Arguments

data

default is NULL. This is the entire output from any of the fleet wrappers.

plotMARF

default is TRUE. Should MARFIS data be plotted? If there are more than 1500 positions, the data will be displayed clustered.

clusterMARF

default is TRUE. If TRUE, MARF data will be grouped until the map is zoomed in sufficiently If FALSE, every MARF data point will be shown. If the MARFIS data has > 1500 positions, it will be clustered regardless of this setting.

overloadMARF

default is "cluster". Valid values are "cluster", and "random". This map gets really slow when dealing with many positions, and this parameter indicates what should be done with the MARFIS data if there are more sets than can reasonably be shown (i.e >1500). "cluster" causes the data to be shown as grouped symbols which expand into discrete points as you zoom in. "random" just grabs a random selection of 1500 points, and plots those.

plotMARFSurf

default is FALSE. If TRUE, an interpolated surface will be generated for the MARFIS data. MARFIS point data will be interpolated using the "RND_WGT_KGS" field.

marfSpp

default is NULL. If nothing is provided, the default directed species will be pulled from the input data (e.g. if the data from fleet_halibut() is provided, halibut (i.e. "130" will be used.)) Any marfis species code(s) found in <data>$marf$MARF_CATCHES can be used.

plotISDB

default is TRUE. Should ISDB data be plotted? If there are more than 1500 positions, the data will be displayed clustered.

clusterISDB

default is TRUE. If TRUE, ISDB data will be grouped until the map is zoomed in sufficiently If FALSE, every ISDB data point will be shown. If the ISDB data has > 1500 positions, it will be clustered regardless of this setting.

overloadISDB

default is "cluster". Valid values are "cluster", and "random". This map gets really slow when dealing with many positions, and this parameter indicates what should be done with the ISDB data if there are more sets than can reasonably be shown (i.e >1500). "cluster" causes the data to be shown as grouped symbols which expand into discrete points as you zoom in. "random" just grabs a random selection of 1500 points, and plots those.

plotISDBSurf

default is FALSE. If TRUE, an interpolated surface will be generated for the ISDB data. ISDB data contains several fields data for many species. By default, the interpolation will use the "EST_COMBINED_WT" field for the default directed species, but these options can be overwritten by changing the values of isdbField and isdbSpp, respectively.

isdbField

default is "EST_COMBINED_WT". Other valid values are "EST_NUM_CAUGHT", "EST_KEPT_WT", and "EST_DISCARD_WT".

isdbSpp

default is NULL. If nothing is provided, the default directed species will be pulled from the input data (e.g. if the data from fleet_halibut() is provided, halibut (i.e. "30" will be used.)). Any isdb species code(s) found in <data>$isdb$ISDB_CATCHES$ALL can be used. Entering "?" generates a user-selectable list of all of the available species.

title

default is NULL. This will be shown as the title of the map.

vms

default is NULL. This is optional, but can be the output from get_vmstracks(). If provided, VMS data will be plotted.

bathy

default is TRUE. If TRUE, a bathymetry layer will be available.

surfRes

default is "low". This determines the resolution of any output surfaces. Valid values are "low", "med" or "high". Higher values increase the time it takes to generate the surface.

Value

a leaflet map.

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca

See Also

Other simpleproducts: get_vmstracks(), summarize_locations(), summarizer()

Examples

## Not run: 
redfishresults <- fleet_redfish(unit=3, year = "2017", useLocal=T,data.dir="c:/data/")
redfishVMS<-get_vmstracks(data = redfishresults,
                          oracle.username = "me",
                          oracle.password = "mypassword",
                          oracle.dsn="PTRAN",
                          usepkg="roracle")
quick_map(data=redfishresults, vms= redfishVMS)
       
## End(Not run)

Maritimes/Mar.bycatch documentation built on Feb. 6, 2024, 3:27 p.m.