convexHull Computes the area and centroid of the convex hull from the (latitute, longitude) vector.
It provides a plot of how the points are dispersed in the field of interest.
dataframe with two colums, latitute and longitude respectively.
variable of interest to plot. This variable is needed to color the points on the convexhull.
Consideration for this function:
It makes usage of chull from rgeos and Polygon from graphics.
The centroid of the polygon is calculated by averaging the vertices of it.
The shown plot uses the basic
A vector with two elements, the first element is the area and the second one is the centroid. The centroid is a list of two elements, latitude and longitude that represents the centroid. To have a visual idea of the returned object, it has the following shape [area,[latitude,longitude], plotObject].
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.