# NOT RUN {
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")
# }
Run the code above in your browser using DataLab