neighborhoodVoronoi | R Documentation |
Group cases into neighborhoods using Voronoi tessellation.
neighborhoodVoronoi(pump.select = NULL, vestry = FALSE, case.location = "address", pump.location = "nominal", polygon.vertices = FALSE)
pump.select |
Numeric. Vector of numeric pump IDs to define pump neighborhoods (i.e., the "population"). Negative selection possible. |
vestry |
Logical. |
case.location |
Character. "address" or "nominal". "address" uses the x-y coordinates of |
pump.location |
Character. "address" or "nominal". "address" uses the x-y coordinates of |
polygon.vertices |
Logical. |
An R list with 12 objects.
pump.id
: vector of selected pumps
voronoi
: output from deldir::deldir().
snow.colors
: neighborhood color based on snowColors().
x.rng
: range of x for plot.
y.rng
: range of y for plot.
select.string
: description of "pump.select" for plot title.
expected.data
: expected neighborhood fatality counts, based on Voronoi cell area.
coordinates
: polygon vertices of Voronoi cells.
statistic.data
: observed neighborhood fatality counts.
pump.select
: "pump.select" from neighborhoodVoronoi().
statistic
: "statistic" from neighborhoodVoronoi().
vestry
: "vestry" from neighborhoodVoronoi().
neighborhoodVoronoi() neighborhoodVoronoi(vestry = TRUE) neighborhoodVoronoi(pump.select = 6:7) neighborhoodVoronoi(pump.select = -6) neighborhoodVoronoi(pump.select = -6, polygon.vertices = TRUE) # coordinates for vertices also available in the returned object. dat <- neighborhoodVoronoi(pump.select = -6) dat$coordinates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.