Materialises the from -> atoms -> to route as a table: one row per pair
of overlapping regions with
Arguments
- gs
The
GeoScalethe geoframes belong to.- from, to
Geoframe names of
gs.- weight
Weight column for
w.NULLuses the default weight; when the object declares no weights at all, every atom gets weight 1 (an equal split).
Details
n_from– atoms in thefromregion (its full set, before any target coverage is considered),n_overlap– atoms the pair shares,w– the weight of the overlap (summed atom weights, chosen weight column), the quantity"weighted_mean"aggregation uses,w_from– the full weight of thefromregion;w / w_fromis the split share"sum"disaggregation uses.
The two label columns are named by the geoframes; rows with an NA target
label are atoms to does not cover. A crosswalk registered with
register_geoscale_map() is returned as-is instead of being derived.
See also
geoscale_map_between() for the map between two GeoScales.
Examples
gs <- geoscale_example()
geoscale_map(gs, "state", "zone")
#> state zone n_from n_overlap w w_from
#> 1 N1 N1 2 2 300 300
#> 2 N2 ZB 2 2 700 700
#> 3 S1 ZB 2 1 500 1100
#> 4 S1 ZC 2 1 600 1100
geoscale_map(gs, "country", "state", weight = "km2")
#> country state n_from n_overlap w w_from
#> 1 N N1 4 2 300 1000
#> 2 N N2 4 2 700 1000
#> 3 S S1 2 2 1100 1100
