Learn R Programming

tigris (version 1.0)

voting_districts: Download a voting districts shapefile (2012 TIGER/Line) into R

Description

This function allows you to download a voting districts boundary file into R. The voting districts shapefile is found in the 2012 TIGER/Line dataset, and has not been updated since then. The Census Bureau (see link for source) describes voting districts as follows: " 'Voting district' is the generic name for geographic entities such as precincts, wards, and election districts established by state and local governments for the purpose of conducting elections. States participating in the Census 2010 Redistricting Data Programs as part of Public Law 94-171 (1975) provided the Census Bureau with boundaries, codes, and names for their voting districts."

Usage

voting_districts(state, ...)

Arguments

state

The state for which you'd like to retrieve data. Can be a state name, state abbreviation, or FIPS code.

...

arguments to be passed to the underlying `load_tiger` function, which is not exported. Options include class, which can be set to "sf" (the default) or "sp" to request sf or sp class objects, and refresh, which specifies whether or not to re-download shapefiles (defaults to FALSE).

See Also

Other legislative district functions: congressional_districts(), state_legislative_districts()

Examples

Run this code
# NOT RUN {
#'
library(tigris)
library(sp)

ia <- voting_districts("Iowa")

plot(ia$geometry)

# }

Run the code above in your browser using DataLab