Skip to contents

Download a TIGER/Line shapefile containing

  • the Kansas City city boundary

  • the Kansas City metro region boundary

  • a set of smaller geographies intersecting with one of the above: county, census tract, census block group, census block, or ZIP code tabulation area (ZCTA)

Shapefiles are downloaded from the US Census Bureau using the tigris package.

Usage

get_kc_sf(
  geo = c("cbsa", "place", "county", "tract", "blockgroup", "block", "zcta"),
  year,
  intersect = c("city", "metro"),
  geometry = c("clipped", "full")
)

Arguments

geo

The shapefile geography. "place" returns the city boundary and "cbsa" returns the metro region boundary.

year

The shapefile year.

intersect

If geo is not "place" or "cbsa", this is the larger geography that determines the intersection for the geography selected in geo. If "metro" is selected, geographies in both Kansas and Missouri will be returned.

geometry

If geo is not "place" or "cbsa", return either the full geometries or geometries clipped to the geography indicated in intersect.

Value

A dataframe of class sf containing a simple feature list column.

Details

Geographies smaller than the city or metro region can contain the full geometry or geometries clipped to the city or metro region boundary. For these geographies, when geometry = "clipped" two additional variables are added for the feature's full area and the area within the city or metro region boundary.

Examples

if (FALSE) { # \dontrun{
# Get the 2024 city boundary
city <- get_kc_sf(geo = "place", year = 2024)

# Get 2024 census tracts clipped to the city boundary
tracts <- get_kc_sf(geo = "tract", year = 2024)

# Get full 2024 ZCTAs that intersect with the KC metro region
zctas <- get_kc_sf(
  geo = "zcta",
  year = 2024,
  intersect = "metro",
  geometry = "full"
)
} # }