Intersect Source and Target Data — aw_intersect • areal
Description: 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.

# Intersect Source and Target Data

Source: `R/aw_intersect.R`
`aw_intersect.Rd`

`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 287 features and 4 fields
    #> geometry type:  GEOMETRY
    #> dimension:      XY
    #> bbox:           xmin: 733361.8 ymin: 4268411 xmax: 746155.7 ymax: 4295504
    #> projected CRS:  NAD83 / UTM zone 15N
    #> First 10 features:
    #>           GEOID TOTAL_E WARD         area                       geometry
    #> 15  29510106500    2863    1 4.271176e+05 POLYGON ((738110.9 4283989,...
    #> 19  29510106700    3168    1 5.946820e+05 POLYGON ((738335.2 4283055,...
    #> 21  29510107500    1991    1 6.146361e+05 POLYGON ((740111.6 4286547,...
    #> 22  29510107600    1958    1 1.071347e+06 POLYGON ((739386.1 4285082,...
    #> 40  29510110100    2820    1 5.563665e+01 POLYGON ((739542.5 4283728,...
    #> 62  29510109600    3050    1 3.586828e+03 POLYGON ((740899.6 4285240,...
    #> 68  29510126900    4462    1 8.903340e+05 POLYGON ((739115.9 4285807,...
    #> 69  29510127000    1826    1 1.015451e+03 MULTIPOLYGON (((740936.1 42...
    #> 83  29510106400    1986    1 6.866924e+05 POLYGON ((738500.9 4284750,...
    #> 103 29510108100    3309    1 1.198667e+02 POLYGON ((740163.9 4286467,...