make_neighborhood: Create neighborhood geography

Description Usage Arguments Details Value Examples

Description

Merge Census tracts and block groups into an ACS geo set

Usage

1
2
make_neighborhood(geo_list, name = "Aggregate", state = 9, county = 9,
  blocks = F)

Arguments

geo_list

A nested list of tracts (and, optionally, block groups) for a single neighborhood. Each list item must have a FIPS code for a tract, with the name "tract"; see details for setup

name

Name of the neighborhood. Defaults to "Aggregate"

state

Either a number corresponding to the state's FIPS code, or a string with the state's two-letter abbreviation or full name. Defaults to 09, FIPS code for Connecticut

county

Either a number corresponding to the county's FIPS code (safer), or a string with the county's name. Defaults to 09, FIPS code for New Haven County, Connecticut

blocks

Logical. If TRUE, expects to find named entries of block groups. Defaults to FALSE, meaning list items only contain tract codes

Details

make_neighborhood requires a nested list of lists structure. For neighborhoods that specify block groups, this should take the form:

1
2
3
dixwell <- list(
  list( tract = 141600, block.group = 1:4 )
)

For neighborhoods with only tracts specified:

1
2
3
dixwell <- list(
  list( tract = 141600 )
)

Lists are nested to allow for neighborhoods spanning multiple tracts that may need to be paired with their block groups. Example:

1
2
3
4
5
downtown <- list(
  list(tract = 140100, block.group = 1),
  list(tract = 361401, block.group = 1:3),
  list(tract = 361402, block.group = 1:2)
)

Value

Returns a geo.set object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
beaver_hills_bg <- list(
  list(tract = 141400, block.group = 1:4),
  list(tract = 141300, block.group = 2)
)
beaver_hills_bg_geo <- make_neighborhood(beaver_hills_bg,
  name = "Beaver Hills", state = 9, county = 9, blocks = T)

beaver_hills_tracts <- list(
  list(tract = 141400)
)
beaver_hills_tract_geo <- make_neighborhood(beaver_hills_tracts,
  name = "Beaver Hills", state = 9, county = 9, blocks = F)

CT-Data-Haven/acsprofiles documentation built on June 13, 2019, 8:20 a.m.