Skip to contents

Load or download block group shapefile for the study region, trimming to region boundaries. Use for spatial joins, mapping, or reference lookups in weighting pipelines.

Usage

get_bg_geom(settings, year = NULL)

Arguments

settings

list. Must include:

  • acs_year — ACS year

  • inputs_dir — input directory

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

year

integer(1). ACS year. Default: from settings.

Value

sf object. Block group polygons for study region.

Details

  • Loads shapefile from disk if available; downloads if missing.

  • Uses settings for ACS year and input directory.

  • Downloads block groups for each state FIPS in study region.

  • Trims block groups to study region using spatial intersection.

  • Saves trimmed shapefile to disk for future use.

  • Returns an sf object; does not modify by reference.

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

Settings

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

  • inputs_dir (direct): directory for input files. Default from settings.

See also

  • fetch_study_region

  • get_state_fips

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

Examples

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