gen.cross.tract.dividedness: gen.cross.tract.dividedness

View source: R/tract-lvl-divM-fcns.R

gen.cross.tract.dividednessR Documentation

gen.cross.tract.dividedness

Description

Given a large region: Place, CZ, CBSA, etc., and a division object, represented by an sf object with only linear features, allocate each neighborhood, defined as tracts or block groups, to a side of the division within the area.

Usage

gen.cross.tract.dividedness(
  region,
  divs,
  nbd.query.fcn = tigris::tracts,
  region.id.colm = "rid",
  fill.nhpn.gaps = F,
  erase.water = F,
  year = 2019,
  ...
)

Arguments

nbd.query.fcn

i.e., tracts or block_groups; passed onto geox::tracts.from.sf

region.id.colm

identifer column for supplied region

...

Arguments passed on to polygonal.div

region

sf object representing neighborhoods to allocate to subdivision

divs

linear sf representing divisions.

negative.buffer

Shrink region by this amount only for calculating polygons. Useful for handling shpfiles w/ different resolutions, especially for regions along an international border. Defaults to 100m.

min.size

Minimum (area) size for population, in meters. Defaults to 5e5, or 1/2 a km^2. Set to NULL to not filter by size.

return.sf

If true, returns an sf object, w/ one row per polygon subdivision, that can easily be mapped or allocated to neighborhoods. If false (default), returns number of polygons.

cutout.water

wheter or not to cut out water areas before getting dividedness.

Value

a data.frame with one row per census tract in the supplied region, with a geoid column and a poly.id column indicating which "polygon division" each tract is in. Tracts with different identifiers in this column are across a division from one another.


kmcd39/divM documentation built on Oct. 21, 2023, 11:28 p.m.