add_area | R Documentation |
This function takes a Spatial Polygons Data Frame and calculates and adds area fields to the data frame. Areas can be calculated either treating the whole SPDF as a unit or for each polygon individually.
add_area(polygons, area_ha = TRUE, area_sqkm = TRUE, area_acres = TRUE)
polygons |
An sf polygon object to calculate areas for |
area_ha |
Logical. If |
area_sqkm |
Logical. If |
area_acres |
Logical. If |
The original sf object with an additional field for each area unit calculated.
add_area()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.