attach.geos: attach.geos

View source: R/spatialize-fcns.R

attach.geosR Documentation

attach.geos

Description

attach.geos

Usage

attach.geos(
  x,
  geoid.col = "geoid",
  query.fcn = tigris::tracts,
  crs = 4326,
  keep.census.cols = F,
  ...
)

Arguments

x

df with at least 1 column containing state+county geoid hierarchy (so that first 5 characters are state and county fips codes)

geoid.col

column representing geoids

query.fcn

function to query geos from census api. Default gets tracts

keep.census.cols

Whether to keep all columns from query, like aland, awater, etc. If false, just gets geometry.

...

passed onto the query.fcn

Value

x, as sf object with geometries attached


kmcd39/geox documentation built on Nov. 15, 2024, 2:03 a.m.