Skip to contents

If get is TRUE, groupname_col, group_meta, crs, and fn is all passed on to overedge::make_markers

Usage

layer_show_markers(
  data,
  mapping = NULL,
  geom = "sf",
  style = NULL,
  get = FALSE,
  groupname_col = NULL,
  group_meta = NULL,
  crs = NULL,
  fn = NULL,
  number = FALSE,
  number_col = NULL,
  scale = NULL,
  ...
)

layer_number_markers(
  data,
  mapping = NULL,
  number_col = NULL,
  groupname_col = NULL,
  number_by = FALSE,
  size = 5,
  style = "roundrect",
  geom = "label",
  sort = "lon",
  desc = NULL,
  scale = NULL,
  ...
)

Arguments

data

Data with markers, passed to data parameter of get_location_data()

style

Style; defaults to NULL for layer_show_markers() (supports "facet"); defaults to "roundrect" for layer_number_markers(),

get

If TRUE, pass data to overedge::make_markers

groupname_col

Group column name, used to join group metadata if group_meta is a non-spatial data frame; Default: NULL

group_meta

Group metadata as a data frame or sf object that intersect with markers; Default: NULL

crs

Coordinate reference system for markers, Default: NULL

fn

Function to apply to data before results; gives warning if data is grouped; Default: NULL

number

If TRUE, number markers using layer_number_markers() (not currently supported)

number_col

Name of column with numbers; defaults to NULL.

...

Additional parameters passed to overedge::layer_location_data (include label.size, label.padding, and label.r to define alternate style)

size

Marker size, Default: 5

sort

Sort column name, Default: "dist_xmin_ymax".

desc

If TRUE, sort descending; default FALSE.

Value

ggplot2 layers

Details

The number parameter is not currently supported so the number_col parameter is not implemented.

Examples

if (FALSE) {
if (interactive()) {
  ggplot2::ggplot() +
    layer_number_markers(
      data = mapbaltimore::parks,
      groupname_col = "park_district"
    )
}
}