aw_preview_weights {areal}R Documentation

Preview Areal Weights


Provides a preview of the weight options for areal weighted interpolation. This can be useful for selecting the final specification for aw_interpolate without having to construct a pipeline of all of the subfunctions manually.


aw_preview_weights(.data, tid, source, sid, type)



A sf object that data should be interpolated to (this is referred to as the target elsewhere in the package).


A unique identification number within target


A sf object with data to be interpolated


A unique identification number within source


One of either "extensive" (if the data are spatitally extensive e.g. population counts), "intensive" (if the data are spatially intensive e.g. population density), or "mixed" (if the data include both extensive and intensive values). If "extensive", the sum is returned for the interpolated value. If "intensive", the mean is returned for the interpolated value. If "mixed", vectors named "extensive" and "intensive" containing the relevant variable names should be specified in the dots.


A tibble with the areal weights that would be used for interpolation if type is either "extensive" or "intensive". If it is mixed, two tibbles (one for "extensive" and one for "intensive") are returned as a list.


aw_preview_weights(ar_stl_wards, tid = WARD, source = ar_stl_race, sid = GEOID,
                   type = "extensive")

aw_preview_weights(ar_stl_wards, tid = WARD, source = ar_stl_asthma, sid = GEOID,
                   type = "intensive")

[Package areal version 0.1.7 Index]