Skip to contents

Can 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() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if 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; if FALSE; return a list of ggplot2 maps; defaults to TRUE

Details

Scales are applied a palette and aesthetic are provided and basemap is set to TRUE.