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
2025orc(2025, 2027). For data functions, use Congress start years, rather than election years.- congress
Integer vector of Congress numbers, such as
119orc(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
20mresolution (defaultTRUE). Ignored for Congresses 113-119, which use Census cartographic20mfiles. For the 120th Congress, simplify the nine redrawn states together after assembling the map. UseFALSEfor full TIGER/Line detail in those nine states; all other states retain the previous cycle's cartographic20mboundaries.- cache
Logical. Cache assembled 2027 maps in the current R session (default
TRUE). SetFALSEto rebuild from the boundary inputs. Download caching is controlled separately byoptions(tigris_use_cache = TRUE).- state
State names, two-letter abbreviations, or FIPS codes, such as
"Tennessee","TN", or47.
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()
} # }
