aw_weight | R Documentation |
aw_weight
creates an area weight field by dividing the area
field by the total area field. This is the third step in the interpolation
process after aw_weight.
aw_weight(.data, areaVar, totalVar, areaWeight)
.data |
A |
areaVar |
The name of the variable measuring a feature's area |
totalVar |
The name of the variable containing total area field by |
areaWeight |
The name of a new area weight field to be calculated |
A sf
object with the intersected data and new area weight field.
library(dplyr) race <- select(ar_stl_race, GEOID, TOTAL_E) wards <- select(ar_stl_wards, WARD) wards %>% aw_intersect(source = race, areaVar = "area") %>% aw_total(source = race, id = GEOID, areaVar = "area", totalVar = "totalArea", weight = "sum", type = "extensive") -> intersect aw_weight(intersect, areaVar = "area", totalVar = "totalArea", areaWeight = "areaWeight")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.