addNeighborhoodEuclidean: Add expected Euclidean pump neighborhoods.

View source: R/addNeighborhoodEuclidean.R

addNeighborhoodEuclideanR Documentation

Add expected Euclidean pump neighborhoods.

Description

Plots star graph from pump to its cases.

Usage

addNeighborhoodEuclidean(pump.select = NULL, vestry = FALSE,
  case.set = "observed", case.select = "address", latlong = FALSE,
  location = "nominal", brute.force = FALSE, type = "star",
  add.observed.points = TRUE, alpha.level = 0.25, polygon.type = "solid",
  multi.core = FALSE, dev.mode = FALSE)

Arguments

pump.select

Numeric. Vector of numeric pump IDs to define pump neighborhoods (i.e., the "population"). Negative selection possible. NULL selects all pumps.

vestry

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

case.set

Character. "observed" or "expected".

case.select

Character. Fatalities: "all" or "address".

latlong

Logical. Longitude and latitude coordinates

location

Character. "nominal", "anchor" or "orthogonal".

brute.force

Logical. For latlong = FALSE. TRUE computes nearest pump for each case. FALSE uses Voronoi cells as shortcut.

type

Character. "star", "area.points" or "area.polygons". "area" flavors only valid when case.set = "expected".

add.observed.points

Logical. Add observed fatality "addresses".

alpha.level

Numeric. Alpha level transparency for area plot: a value in [0, 1].

polygon.type

Character. "border" or "solid".

multi.core

Logical or Numeric. TRUE uses parallel::detectCores(). FALSE uses one, single core. You can also specify the number logical cores. See vignette("Parallelization") for details.

dev.mode

Logical. Development mode uses parallel::parLapply().

Value

R graphic elements.

Examples

## Not run: 
streetNameLocator("marshall street", zoom = 0.5, highlight = FALSE,
  add.subtitle = FALSE)
addNeighborhoodEuclidean()

streetNameLocator("marshall street", zoom = -50, highlight = FALSE)
addNeighborhoodEuclidean(case.set = "expected", type = "area.polygons")

## End(Not run)

lindbrook/cholera documentation built on March 5, 2025, 5:40 p.m.