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