View source: R/aw_interpolate.R
aw_interpolate | R Documentation |
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.
aw_interpolate(.data, tid, source, sid, weight = "sum", output = "sf", extensive, intensive)
.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 |
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.
A sf
object or a tibble
with the value or values interpolated into
the target
data.
c
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.