aw_interpolate {areal} | R Documentation |
Interpolate Values
Description
This is the core function within the package for areal weighted interpolation. It validates both data sources before interpolating one or more listed values from the source data into the target data.
Usage
aw_interpolate(.data, tid, source, sid, weight = "sum", output = "sf", extensive,
intensive)
Arguments
.data |
A |
tid |
A unique identification number within |
source |
A |
sid |
A unique identification number within |
weight |
For |
output |
One of either |
extensive |
A vector of quoted variable names to be treated as spatially extensive
(e.g. population counts); optional if |
intensive |
A vector of quoted variable names to be treated as spatially intensive
(e.g. population density); optional if |
Details
Areal weighted interpolation can be used for generating demographic estimates for overlapping but incongruent polygon features. It assumes that individual members of a population are evenly dispersed within the source features (an assumption not likely to hold in the real world). It also functions best when data are in a projected coordinate system, like the UTM coordinate system.
Value
A sf
object or a tibble
with the value or values interpolated into
the target
data.
See Also
Examples
aw_interpolate(ar_stl_wards, tid = WARD, source = ar_stl_race, sid = GEOID, weight = "sum",
output = "sf", extensive = "TOTAL_E")
aw_interpolate(ar_stl_wards, tid = WARD, source = ar_stl_asthma, sid = GEOID, weight = "sum",
output = "tibble", intensive = "ASTHMA")