Learn R Programming

USAboundaries (version 0.4.0)

us_congressional: Congressional district boundaries (contemporary)

Description

Get the current (2020) boundaries for U.S. Congressional districts.

Usage

us_congressional(resolution = c("low", "high"), states = NULL)

Arguments

resolution

The resolution of the boundaries.

states

A character vector of state or territory names. Only boundaries inside these states/territories will be returned. If NULL, all boundaries will be returned.

Value

An sf object.

See Also

For documentation of and citation to the underlying shapefiles for contemporary data from the U.S. Census Bureau, see the census_boundaries help file in the USAboundariesData package.

Examples

Run this code
# NOT RUN {
if (require(USAboundariesData) && require(sf)) {
  us_congressional <- us_congressional()
  va_congressional <- us_congressional(states = "Virginia", resolution = "high")
  plot(st_geometry(us_congressional))
  plot(st_geometry(va_congressional))
}

# }

Run the code above in your browser using DataLab