geosubset: geosubset

View source: R/geosubset-fcns.R

geosubsetR Documentation

geosubset

Description

Subsets a dataframe with one column representing tracts, counties, census block groups, or another areal unit with STATE+COUNTY fips codes comprising the first 5-characters of their geoid (as detailed here https://www.census.gov/programs-surveys/geography/guidance/geo-identifiers.html).

Usage

geosubset(x, subset.cols = c("geoid"), ...)

Arguments

x

df with at least 1 column containing state+county geoid hierarchy

subset.cols

columns to subset to. geoid by default; c('origin','dest') may be useful for mobility data

cz_name, cz, countyfp, cbsa_id, plc_id

Region/county/place to subset to

Details

Can take cz or cbsa or place to subset to, and use one of the xwalks in this package to determine correspondence. In this case, attention should be payed to the year of the areal unit.

Value

df x, subsetted to the specified region.


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