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)
| .data | A |
|---|---|
| tid | A unique identification number within |
| source | A |
| sid | A unique identification number within |
| type | One of either |
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")#> # A tibble: 106 x 3 #> GEOID extensiveSum extensiveTotal #> <chr> <dbl> <dbl> #> 1 29510101100 1 0.999 #> 2 29510101200 1 1.00 #> 3 29510101300 1 1.00 #> 4 29510101400 1 1.00 #> 5 29510101500 1 0.998 #> 6 29510101800 1 0.978 #> 7 29510102100 1 0.991 #> 8 29510102200 1 0.999 #> 9 29510102300 1 0.999 #> 10 29510102400 1 1.00 #> # … with 96 more rowsaw_preview_weights(ar_stl_wards, tid = WARD, source = ar_stl_asthma, sid = GEOID, type = "intensive")#> # A tibble: 28 x 2 #> WARD intensive #> <int> <dbl> #> 1 1 1.00 #> 2 2 1 #> 3 3 1 #> 4 4 1 #> 5 5 1 #> 6 6 1 #> 7 7 1.00 #> 8 8 1 #> 9 9 1 #> 10 10 1 #> # … with 18 more rows