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 sf object that data should be interpolated to (this is referred to as the target elsewhere in the package).

tid

A unique identification number within target

source

A sf object with data to be interpolated

sid

A unique identification number within source

weight

For "extensive" interpolations, should be either "total" or "sum". For "intensive" interpolations, should be "sum". For mixed interpolations, this will only impact the calculation of the extensive variables.

output

One of either "sf" or "tibble"

extensive

A vector of quoted variable names to be treated as spatially extensive (e.g. population counts); optional if intensive is specified

intensive

A vector of quoted variable names to be treated as spatially intensive (e.g. population density); optional if extensive is specified

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

c

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")


[Package areal version 0.1.7 Index]