aw_calculate {areal} | R Documentation |

## Calculate Estimated Population

### Description

`aw_calculate`

multiplies the given `value`

by the area weight. This
is the fourth step in the interpolation process after aw_weight.

### Usage

```
aw_calculate(.data, value, areaWeight, newVar)
```

### Arguments

`.data` |
A given intersected dataset |

`value` |
A column within |

`areaWeight` |
The name of the variable containing area weight per feature |

`newVar` |
Optional; a new field name to store the interpolated value in. If not specified,
the |

### Value

An intersected file of class sf with a new field of interest recalculated with area weight

### Examples

```
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") %>%
aw_weight(areaVar = "area", totalVar = "totalArea", areaWeight = "areaWeight") -> intersect
aw_calculate(intersect, value = "TOTAL_E", areaWeight = "areaWeight")
```

[Package

*areal*version 0.1.8 Index]