areal_calc {extRatum} | R Documentation |
Areal data calculation
Description
Computes three different summary statistics:
(1) TotalArea
total area of each polygon;
(2) AreaCovered
area covered by a multipolygon object within a high order polygon; and,
(3) Ratio
ratio between AreaCovered
and TotalArea
i.e.
ratio between an area covered by a given set of features and total area of a higher-order geography polygon.
Usage
areal_calc(polygon_layer, higher_geo_lay, unique_id_code, crs)
Arguments
polygon_layer |
multipolygon object of class |
higher_geo_lay |
multipolygon object of class |
unique_id_code |
a string; indicating a unique ID column of |
crs |
coordinate reference system: integer with the EPSG code, or character based on proj4string. |
Details
The function requires two sets of polygon data: high-order and low-order geographic polygons
Value
a tibble
data frame object containing four columns is returned:
the
unique_id_code
ofhigher_geo_lay
the total area of each polygon in
higher_geo_lay
(TotalArea),the total area covered by
polygon_layer
features (AreaCovered),the ratio between the total area covered by
polygon_layer
and total area ofhigher_geo_lay
polygon (Ratio).
Examples
## Run areal_calc() using the packages' dummy data sets.
## The data sets are georeferenced on wgs84. However, a planar system is used to measure areas.
## For the examples provided here, points and polygons relate to the United Kingdom.
## So the British National Grid is used.
## Not run:
#outcome <- areal_calc(polygon_layer = pol_small,
#higher_geo_lay = pol_large,
#unique_id_code = "large_pol_",
#crs = "epsg:27700")
## End(Not run)