Skip to contents

Download sf boundaries for U.S. congressional districts for a given Congress number (1-120th).

Usage

cd_boundaries(
  year = NULL,
  congress = NULL,
  epsg = 5070,
  simplify = TRUE,
  cache = TRUE,
  state = NULL
)

Format

Each object is the sf for a particular congress. The year indicates the start of that congress

Source

Shapefiles from 2012 onwards taken from US Census, tigris package. Shapefiles from early congresses are taken from Jeffrey B. Lewis, historical congressional district shapefiles. For the 120th Congress, see the Census boundary collection and Missouri correction notice: https://www.census.gov/programs-surveys/decennial-census/about/rdo/congressional-districts.html

Arguments

year

Integer vector of years, such as 2025 or c(2025, 2027). For data functions, use Congress start years, rather than election years.

congress

Integer vector of Congress numbers, such as 119 or c(119, 120).

epsg

Integer EPSG code for the output coordinate reference system (default 5070).

simplify

Logical. For Lewis-era Congresses (1-112), simplify boundaries to about Census cartographic 20m resolution (default TRUE). Ignored for Congresses 113-119, which use Census cartographic 20m files. For the 120th Congress, simplify the nine redrawn states together after assembling the map. Use FALSE for full TIGER/Line detail in those nine states; all other states retain the previous cycle's cartographic 20m boundaries.

cache

Logical. Cache assembled 2027 maps in the current R session (default TRUE). Set FALSE to rebuild from the boundary inputs. Download caching is controlled separately by options(tigris_use_cache = TRUE).

state

State names, two-letter abbreviations, or FIPS codes, such as "Tennessee", "TN", or 47.

Value

An sf object with CD boundaries for the requested Congress.

Details

Supply year or congress. Boundaries cover Congresses 1-120 (start years 1789-2027). Leave state = NULL for all states, or supply one or more states to select their districts.

For 2027 (120th Congress), we use the 2026 Census TIGER for AL, CA, FL, LA, NC, OH, TN, TX, and UT (with middecade redistricting), and reuse the previous cycle's boundaries for all other states.

See also

cd_available() for supported years and Congresses.

Other congressional district functions: cd_available(), cd_dotmap(), cd_hexmap(), cd_mapbox(), cd_names(), cd_normal_vote()

Examples

library(sf)
#> Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.4.0; sf_use_s2() is TRUE
library(ggplot2)

# Load the 109th Congress shapefile
if (FALSE) { # \dontrun{
cd109 <- cd_boundaries(congress = 109)
cd108 <- cd_boundaries(year = 2003)

# Districts used for the Congress starting in January 2027
cd120 <- cd_boundaries(year = 2027)

# Create a map with cd boundaries
cd109 |>
  ggplot() +
  geom_sf()
} # }