A Voronoi diagram is a nearest neighbor diagram: given a set of generator points, the Voronoi diagram creates nearest neighbor cells. Each cell is formed around one generator point, and the set of points closest to that generator is fully contained in its cell. The resulting diagram can be used to find the nearest generator for an arbitrary point or to interpolate the blank space around each generator to create a heatmap.

Voronoi diagrams have a multitude of applications, but `ggvoronoi`

implements tools for data visualization and spatial data analysis in R. For data visualization, `ggvoronoi`

fits nicely within the `ggplot2`

framework, so R users experienced with the popular visualization package can create Voronoi diagrams and heatmaps around any point-level dataset within minutes. For spatial data analysis, R users can create a Voronoi diagram within the `sp`

framework as a `SpatialPolygonsDataFrame`

object. From there, the user can find the nearest generator point to each location in a new `SpatialPoints`

object or use tools, such as those contained in `rgeos`

such as `gArea`

, to analyze the diagram.

**Maintainer**: Robert Garrett [email protected]

Authors:

Austin Nar

Thomas Fisher

Other contributors:

Karsten Maurer

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.