Skip to contents

Retrieve county FIPS codes for all counties intersecting the study region. Use for subsetting ACS, PUMS, or other census data to relevant counties.

Usage

get_county_fips(settings)

Arguments

settings

list. Must include:

  • acs_year — ACS year

  • state FIPS (via get_state_fips) Modified by reference: no.

Value

data.table with columns:

  • county_fips — county FIPS code

  • state_fips — state FIPS code Rows: one per county in study region. Keys: none.

Details

  • Fetches study region geometry from settings.

  • Gets state FIPS codes for region.

  • Downloads county polygons for each state and year.

  • Buffers and transforms study region for robust spatial intersection.

  • Returns a copy; does not modify by reference.

  • Assumes settings include 'acs_year' and state FIPS; errors if missing.

Settings

  • acs_year (direct): ACS year for county polygons. Default from settings.

See also

  • fetch_study_region

  • get_state_fips

Other geo utilities: format_geoids(), geoid_pad(), get_bg_geom(), get_puma_geom(), get_state_fips(), pad_geoid_cols()

Examples

## Not run:
get_county_fips(settings)
#> Error: object 'settings' not found
## End(Not run)