aw_intersect intersects the source and target datasets and computes a new area field for the intersected data using the units associated with whatever project the data are currently in. This is the first step in the interpolation process after data validation and subsetting.

aw_intersect(.data, source, areaVar)

Arguments

.data

A sf object that data should be interpolated to

source

A sf object with data to be interpolated

areaVar

The name of the new area variable to be calculated.

Value

A sf object with the intersected data and new area field.

Examples

library(dplyr)

race <- select(ar_stl_race, GEOID, TOTAL_E)
wards <- select(ar_stl_wards, WARD)

aw_intersect(wards, source = race, areaVar = "area")
#> Simple feature collection with 286 features and 4 fields
#> Geometry type: GEOMETRY
#> Dimension:     XY
#> Bounding box:  xmin: 265638 ymin: 299509.9 xmax: 278973 ymax: 326430.3
#> Projected CRS: NAD_1983_HARN_StatePlane_Missouri_East_FIPS_2401
#> First 10 features:
#>            GEOID TOTAL_E WARD         area                       geometry
#> 12   29510106500    2863    1 4.268099e+05 POLYGON ((270624.5 315101.4...
#> 16   29510106700    3168    1 5.942485e+05 POLYGON ((270823.1 314161.8...
#> 18   29510107500    1991    1 6.141786e+05 POLYGON ((272693.4 317603.1...
#> 19   29510107600    1958    1 1.074142e+06 POLYGON ((271928.5 316159, ...
#> 40   29510110100    2820    1 5.559584e+01 POLYGON ((272047.9 314802.1...
#> 68   29510126900    4462    1 8.896824e+05 POLYGON ((271678.3 316891, ...
#> 69   29510127000    1826    1 1.014709e+03 MULTIPOLYGON (((273486.1 31...
#> 85   29510108100    3309    1 1.197780e+02 POLYGON ((272743.5 317521.7...
#> 86   29510106400    1986    1 6.861954e+05 POLYGON ((271034.9 315851.6...
#> 18.1 29510107500    1991    2 1.548859e+01 POLYGON ((272862.1 317334.3...