Make group layers
layer_group_data.RdCan be used to make multiple layers or multiple maps based on a grouping variable.
Usage
layer_group_data(
data,
mapping = NULL,
groupname_col = "group",
label_col = "name",
geom = "sf",
basemap = FALSE,
palette = NULL,
aesthetics = "fill",
...
)Arguments
- data
sf object including data in area. data may also be a url or file path. data can be the name of a data object or, if package and filetype are provided, a cached or external file.
- mapping
Set of aesthetic mappings created by
aes()oraes_(). If specified andinherit.aes = TRUE(the default), it is combined with the default mapping at the top level of the plot. You must supplymappingif there is no plot mapping.- groupname_col
Group column name
- label_col
Column name or id for a column with the text or labels to pass to any text geom.
- geom
ggplot2 geom to use, Default: 'sf'. Options include "sf" (geom_sf), "icon" (layer_icon / geom_sf_icon), "text" (geom_sf_text), "label" (geom_sf_label), "textsf", "labelsf", "text_repel", and "label_repel".
- ...
Additional parameters passed to
overedge::layer_location_data- layers
If
TRUE; return a list of layers; ifFALSE; return a list of ggplot2 maps; defaults toTRUE