Loads Daily Kos Elections cartogram shapefile of each district.
Source
2013–2027: https://the-db.co/maps. 2005-2011: created with CoryMcCartan/hexmap using district boundaries from Jeffrey B. Lewis's historical shapefiles.
Details
Supply year or congress. Bundled hexmaps cover Congresses
109-120 (start years 2005-2027).
Years indicate the year of the January in which the Congress starts.
For example, to get shapefiles for the 2022 election, set year = 2023.
shp_hex_2027 reflects district lines redrawn mid-decade ahead of the 2026
elections.
These districts elect the members who take their seats in the 120th Congress,
which starts January 2027.
Note
For 2013 to 2021, we use the same shapefile (Downballot's v2.1wm), but note that between the 2016 and 2020 data, PA changed their districts but did not add/remove any. Between the 2012-14 and 2016 data, FL, NC, VA did mid-cycle redistricting. The 2005-2011 hexmap is created using Cory McCartan's hexmap package that assigns hex units into districts by a redistricting algorithm. The same hexmap (the 111th Congress / 2009 districts) is reused for all of 2005-2011, since the number of districts per state was constant over the 2000-census apportionment decade.
Licensing and attribution
The Downballot-derived cartogram material is the Congressional District Hexmap by Daniel Donner for The Downballot, licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). Older source files may be branded Daily Kos Elections.
The package standardizes district identifiers, repairs narrow geometry gaps, translates the 2023 cartogram to align with later maps, and reuses version 2.1 for 2013-2021. The generated 2005-2011 maps also use The Downballot's state layout for placement and scaling. The README figures and logo adapt this map material through plotting, recoloring, cropping, or composition.
Retain the creator credit, source and license links, and an indication of
changes when publishing or redistributing the licensed map material.
Full attribution and scope are in the installed LICENSE.note, located by
system.file("LICENSE.note", package = "fourthirtyfive"). The package's R
code remains under the MIT License.
See also
cd_available() for supported years and Congresses.
Other congressional district functions:
cd_available(),
cd_boundaries(),
cd_dotmap(),
cd_mapbox(),
cd_names(),
cd_normal_vote()
Examples
# load one dataset
cd_hexmap(year = 2019)
#> Simple feature collection with 435 features and 2 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: -18235790 ymin: 3291989 xmax: -11068360 ymax: 8385042
#> Projected CRS: Mercator_2SP
#> # A tibble: 435 × 3
#> cong cd geometry
#> * <dbl> <chr> <MULTIPOLYGON [m]>
#> 1 116 AK-01 (((-17750854 4101713, -17766120 3976966, -17762455 3977196, -177…
#> 2 116 AL-01 (((-14250364 4536616, -14254169 4570058, -14290849 4586012, -142…
#> 3 116 AL-02 (((-14250364 4536616, -14075356 4559710, -14087443 4585420, -140…
#> 4 116 AL-03 (((-14094835 4727659, -14094602 4735346, -14107668 4748089, -141…
#> 5 116 AL-04 (((-14290354 4888005, -14294877 4927749, -14331558 4943703, -143…
#> 6 116 AL-05 (((-14158240 4899559, -14191769 5011189, -14318274 4996619, -143…
#> 7 116 AL-06 (((-14194378 4657379, -14198901 4697122, -14235581 4713077, -142…
#> 8 116 AL-07 (((-14295373 4625756, -14263215 4649544, -14267738 4689288, -143…
#> 9 116 AR-01 (((-15053279 5051947, -14932964 5057764, -14930048 5053524, -149…
#> 10 116 AR-02 (((-15072934 4983811, -15039103 5005152, -15003705 4986524, -150…
#> # ℹ 425 more rows
# districts used for the members entering Congress in January 2027
cd_hexmap(year = 2027)
#> Simple feature collection with 435 features and 2 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: -18230170 ymin: 3262467 xmax: -11068360 ymax: 8385042
#> Projected CRS: Mercator_2SP
#> # A tibble: 435 × 3
#> cong cd geometry
#> * <int> <chr> <MULTIPOLYGON [m]>
#> 1 120 AK-01 (((-17750854 4101713, -17766120 3976966, -17762455 3977196, -177…
#> 2 120 AL-01 (((-14181666 4545681, -14250364 4536616, -14332921 4526527, -143…
#> 3 120 AL-02 (((-14290849 4586012, -14295373 4625756, -14263215 4649544, -142…
#> 4 120 AL-03 (((-14249150 4832307, -14253674 4872051, -14221516 4895839, -141…
#> 5 120 AL-04 (((-14253674 4872051, -14249150 4832307, -14281308 4808518, -143…
#> 6 120 AL-05 (((-14253674 4872051, -14290354 4888005, -14294877 4927749, -143…
#> 7 120 AL-06 (((-14350145 4800684, -14350145 4800684, -14317988 4824473, -143…
#> 8 120 AL-07 (((-14295373 4625756, -14290849 4586012, -14323007 4562223, -143…
#> 9 120 AR-01 (((-15039103 5005152, -15040669 5045121, -15053279 5051947, -149…
#> 10 120 AR-02 (((-15039103 5005152, -15003705 4986524, -15002139 4946554, -150…
#> # ℹ 425 more rows
# plot points combined with state outline
library(ggplot2)
cd_hexmap(year = 2019) |>
ggplot() +
geom_sf() +
theme_void()
