dsp_plot_map: Create geographical heatmaps from a dispersion field list

Description Usage Arguments Value Examples

View source: R/dsp_plot_map.R

Description

Creates simple geographical heatmaps for easily visualizing dispersion fields. Uses a dispersion field list generated by the dsp_create_from_survey and global shapefiles of coastlines and country boundaries to sketch the background.

Usage

1
2
3
4
5
6
7
8
9
dsp_plot_map(
  disp_fld_list,
  scale = "count",
  color_ramp = c("darkseagreen3", "orange", "red"),
  raster_latlim = c(5, 50),
  raster_longlim = c(50, 120),
  outline_col = "black",
  proj = "+proj=longlat +ellps=WGS84"
)

Arguments

disp_fld_list

The list of dispersion fields generated by the dsp_create_from_survey function. Objects in the list can be RasterLayers, it which case proj and boundings from the rasters are used for plotting, or matrices, in which case proj and boundings must be provided.

scale

Type of scale to be used for the legend. One of c("count","percentage"). Defaults "count".

color_ramp

Color palette to be used for the heat map.

raster_latlim

If disp_fld_list is a list of matrices, the latitudinal range of the dispersion fields must be provided as a vector.

raster_longlim

If disp_fld_list is a list of matrices, the longitudinal range of the dispersion fields must be provided as a vector.

outline_col

The outline color of the projected map.

proj

A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation. To be evaluated by sp::CRS(). default '+proj=longlat +ellps=WGS84'.

Value

Returns a heatmap of the dispersion field using the specified raster

Examples

1
2
3
4
5
6
data("dispersion_field_ex")
maps <- dsp_plot_map(dispersion_field_ex, 
                     scale = "percentage",
                     raster_latlim = c(5,50),
                     raster_longlim = c(50,120))
maps[[1]]

kkdey/ecostructure documentation built on Jan. 26, 2021, 4:10 p.m.