segmentLocator {cholera}R Documentation

Locate road segment by ID.

Description

Highlights the selected road segment and its cases.

Usage

segmentLocator(id = "216-1", zoom = 0.5, cases = "address",
  distance.unit = "meter", time.unit = "second", walking.speed = 5,
  add.title = TRUE, add.subtitle = TRUE, highlight = TRUE)

Arguments

id

Character. A concatenation of a street's numeric ID, a whole number between 1 and 528, and a second number to identify the segment.

zoom

Logical or Numeric. A numeric value >= 0 controls the degree of zoom. The default is 0.5.

cases

Character. Plot cases: NULL, "address" or "fatality".

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.

add.title

Logical. Print title.

add.subtitle

Logical. Print subtitle.

highlight

Logical. Highlight selected road and its cases.

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("190-1")
segmentLocator("216-1")
segmentLocator("216-1", distance.unit = "yard")

[Package cholera version 0.7.5 Index]