gail_shp: Geo-Assignment of Irregular Locations to Shapes

Description Usage Arguments Details Value See Also

Description

Allocates the number of cases/events from irregular spatial units onto to regular set of spatial units. The regular spatial units are assumed to have POLYGON geometry, while the irregular spatial units are assumed to have POINT geometry.

Note that this function is largely a wrapper for using sf::st_contains with basic aggregation before and after. It is provided primarily for (relative) consistency with gail.

Usage

1
2
gail_shp(sp_units, cases, suid, num_cases, group, label, convert = FALSE,
  ...)

Arguments

sp_units

Dataset of regular spatial units, see details.

cases

Dataset containing the the cases, see details.

suid

Column name in both sp_units and cases which contains the spatial unit identification / name.

num_cases

Column name from cases containing the number of cases, see details.

group

Optional name of variable in cases to use for filtering. See details.

label

Optional value of group by which to filter. See details.

convert

Logical, convert returned object to Spatial* type objects (from sp).

...

Space for additional arguments.

Details

Value

Returns a copy of sp_units after having added a column named num_cases, which contains the number of cases which fall within the boundry of each spatial unit.

See Also

gail


jelsema/GAIL documentation built on June 29, 2019, 11:48 a.m.