tmap_CreateLayer_ValuesByGridCell: Create a 'tmap'-style map layer with values by grid cell

View source: R/tmap_CreateLayer_ValuesByGridCell.R

tmap_CreateLayer_ValuesByGridCellR Documentation

Create a tmap-style map layer with values by grid cell

Description

Function to create a tmap-style map layer with values by grid cell.

Usage

tmap_CreateLayer_ValuesByGridCell(
  dfr,
  vals_col,
  basemap = NULL,
  title = "values",
  alpha = 0.9,
  plotMap = FALSE
)

Arguments

dfr

- sf dataframe with values to create map layer by gridCellID

vals_col

- column name of values to plot

basemap

- tmap-style basemap to use (default is NULL, which uses the basemap for the CGOA in lat/lon)

title

- map title (default is "values")

alpha

- transparency to apply to values layer (default is 0.9)

plotMap

- flag to combine layer with basemap and plot (default is FALSE)

Details

Requires package tmap. If all values are 0, then NULL is returned for the map layer object. Note that the color scale used for the values is determined by the aes.palette argument to createBasemap when the basemap is created.

Value

a tmap-style layer object of the values by grid cell.


wStockhausen/rDisMELS documentation built on March 27, 2022, 1 a.m.