Learn R Programming

geomander (version 2.5.2)

get_lewis: Get historical United States Congressional District Shapefiles

Description

Data sourced from the United States Congressional District Shapefiles, primarily hosted at https://cdmaps.polisci.ucla.edu/. Files are fetched through the GitHub repository at https://github.com/JeffreyBLewis/congressional-district-boundaries.

Usage

get_lewis(state, congress, path_only = FALSE)

Value

a sf tibble of the congressional district boundaries

Arguments

state

two letter state abbreviation

congress

congress number, from 1 to 114.

path_only

logical. If TRUE, returns only the URL to the file.

References

Jeffrey B. Lewis, Brandon DeVine, Lincoln Pitcher, and Kenneth C. Martis. (2013) Digital Boundary Definitions of United States Congressional Districts, 1789-2012. [Data file and code book]. Retrieved from https://cdmaps.polisci.ucla.edu on [date of download].

Examples

Run this code
path <- get_lewis(state = 'NM', congress = 111, path_only = TRUE)
if (attr(curlGetHeaders(path), 'status') == 200) {
  get_lewis(state = 'NM', congress = 111)
}

Run the code above in your browser using DataLab