segmentLocator: Plot/Locate road segment by ID.

View source: R/segmentLocator.R

segmentLocatorR Documentation

Plot/Locate road segment by ID.

Description

Highlight selected road segment(s) and cases.

Usage

segmentLocator(segment.id = "216-1", zoom = TRUE, latlong = FALSE,
  cases = "address", token = "id", vestry = FALSE, add.pump = TRUE,
  add.title = TRUE, add.subtitle = TRUE, highlight = TRUE,
  distance.unit = "meter", time.unit = "second", walking.speed = 5,
  cex.text = 0.67)

Arguments

segment.id

Character. A vector of segment IDs. See Note.

zoom

Logical or Numeric. Positive value zoom in. Negative values zoom out.

latlong

Logical. Longitude and latitude coordinates

cases

Character. Cases to plot: NULL, "address" or "fatality".

token

Character. Cases as "id" or "point".

vestry

Logical. TRUE uses the 14 pumps from the Vestry report. FALSE uses the 13 in the original map.

add.pump

Logical. Include pumps.

add.title

Logical. Include title.

add.subtitle

Logical. Include subtitle.

highlight

Logical. Highlight selected segment(s) and cases.

distance.unit

Character. Unit of distance: "meter", "yard" or "native". "native" returns the map's native scale. See vignette("roads") for information on conversion.

time.unit

Character. "hour", "minute", or "second".

walking.speed

Numeric. Walking speed in km/hr.

cex.text

Numeric.

Value

A base R graphics plot.

Note

With Dodson and Tobler's data, a street (e.g., Broad Street) is often comprised of multiple straight line segments. To identify each segment individually, an additional number is appended to form a text string ID (e.g., "116-2"). See cholera::road.segments.

Examples

segmentLocator("216-1")
segmentLocator("216-1", zoom = -10)
segmentLocator("216-1", latlong = TRUE, zoom = -10)
segmentLocator("216-1", distance.unit = "yard")
segmentLocator("216-1", zoom = FALSE)

lindbrook/cholera documentation built on Oct. 11, 2024, 7:31 p.m.