Skip to contents

Boundaries of US Counties (and county equivalents), built into the package for mapping.

Usage

counties_shapefile

Format

An object of class sf (inherits from data.frame) with 3235 rows and 13 columns.

Details

This is used by shapes_from_fips() (via its internal helper shapes_counties_from_countyfips()) to get the boundary of a County without having to download it at the time a map or report is created.

Before this dataset existed, every County map or report required a live download from the Census Bureau (via the tidycensus/tigris packages) or from an ArcGIS feature service, which was both a source of latency and a point of failure. Downloading is still used as a fallback for any FIPS not found here.

These are the Census Bureau cartographic boundary files at 1:500,000 resolution – the same source and resolution that the download path returns by default (tidycensus/tigris with cb = TRUE) – so baking them in changes where the boundaries come from, not which boundaries they are. They are generalized for mapping and are not intended for area calculations.

It includes counties and county equivalents in the 50 states, DC, PR, and the island areas.

It is created by the package via a script at EJAM/data-raw/datacreate_counties_shapefile.R which downloads the data from the Census Bureau.

Source: https://www2.census.gov/geo/tiger/GENZ2022/shp/cb_2022_us_county_500k.zip