Skip to contents

Retrieve descriptive geographical names for congressional districts in one or more Congresses.

Usage

cd_names(year = NULL, congress = NULL)

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).

Value

A tibble with 435 rows per requested Congress and columns cong, cd, and cd_description. Multiple Congresses are stacked by row.

Details

Supply year or congress. Bundled district names cover Congresses 109-120 (start years 2005-2027).

See also

info for column definitions and sources, and ccesMRPprep's cd_info documentation for upstream background.

cd_available() for supported years and Congresses.

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

Author

Zachary Donnini, Shiro Kuriwaki, Daily Kos, Downballot

Examples

# load one dataset
cd_names(year = 2011)
#> # A tibble: 435 × 3
#>     cong cd    cd_description                                
#>    <dbl> <chr> <chr>                                         
#>  1   112 AK-01 All of Alaska                                 
#>  2   112 AL-01 Southern Alabama                              
#>  3   112 AL-02 Southeast Alabama                             
#>  4   112 AL-03 East-central Alabama                          
#>  5   112 AL-04 North-central Alabama                         
#>  6   112 AL-05 Northern Alabama                              
#>  7   112 AL-06 Birmingham and Tuscaloosa suburbs             
#>  8   112 AL-07 Birmingham, Tuscaloosa, and western Black Belt
#>  9   112 AR-01 Northeastern Arkansas                         
#> 10   112 AR-02 Greater Little Rock                           
#> # ℹ 425 more rows
cd_names(congress = 109)
#> # A tibble: 435 × 3
#>     cong cd    cd_description                                
#>    <dbl> <chr> <chr>                                         
#>  1   109 AK-01 All of Alaska                                 
#>  2   109 AL-01 Southern Alabama                              
#>  3   109 AL-02 Southeast Alabama                             
#>  4   109 AL-03 East-central Alabama                          
#>  5   109 AL-04 North-central Alabama                         
#>  6   109 AL-05 Northern Alabama                              
#>  7   109 AL-06 Birmingham and Tuscaloosa suburbs             
#>  8   109 AL-07 Birmingham, Tuscaloosa, and western Black Belt
#>  9   109 AR-01 Northeastern Arkansas                         
#> 10   109 AR-02 Greater Little Rock                           
#> # ℹ 425 more rows

# stack multiple Congresses
cd_names(congress = 109:119)
#> # A tibble: 4,785 × 3
#>     cong cd    cd_description                                
#>    <dbl> <chr> <chr>                                         
#>  1   109 AK-01 All of Alaska                                 
#>  2   109 AL-01 Southern Alabama                              
#>  3   109 AL-02 Southeast Alabama                             
#>  4   109 AL-03 East-central Alabama                          
#>  5   109 AL-04 North-central Alabama                         
#>  6   109 AL-05 Northern Alabama                              
#>  7   109 AL-06 Birmingham and Tuscaloosa suburbs             
#>  8   109 AL-07 Birmingham, Tuscaloosa, and western Black Belt
#>  9   109 AR-01 Northeastern Arkansas                         
#> 10   109 AR-02 Greater Little Rock                           
#> # ℹ 4,775 more rows