Learn R Programming

⚠️There's a newer version (2.2.1) of this package.Take me there.

tigris

Download and use Census TIGER/Line shapefiles in R

CRAN version: 0.3.3 (updated 5 July 2016)

Dev version: 0.5 (updated 1 May 2017)

tigris is an R package that allows users to directly download and use TIGER/Line shapefiles (https://www.census.gov/geo/maps-data/data/tiger-line.html) from the US Census Bureau.

To install the package from CRAN, issue the following command in R:

install.packages('tigris')

Or, get the development version from GitHub:

devtools::install_github('walkerke/tigris')

In Version 0.5:

  • tigris now supports simple features! To load your data as an object of class sf, specify class = "sf" in the function call, or set this globally with options(tigris_class = "sf").

  • Historic boundaries are available for states, counties, Census tracts, and block groups; 1990 (cb = TRUE only), 2000, and 2010 boundaries can be obtained with the year parameter in an associated function call.

Basic usage:

library(tigris)

# Basic plot of US urbanized areas

ua <- urban_areas(cb = TRUE)

plot(ua)

# Interactive Leaflet map (requires the leaflet R package)

library(leaflet)

ua %>% leaflet() %>% addTiles() %>% addPolygons(popup = ~NAME10)

Available datasets:

Please note: cartographic boundary files in tigris are not available for 2011 and 2012.

FunctionDatasets availableYears available
nationcartographic (1:5m; 1:20m)2013, 2014, 2015
divisionscartographic (1:500k; 1:5m; 1:20m)2013, 2014, 2015
regionscartographic (1:500k; 1:5m; 1:20m)2013, 2014, 2015
statesTIGER/Line; cartographic (1:500k; 1:5m; 1:20m)1990, 2000, 2010, 2011, 2012, 2013, 2014, 2015
countiesTIGER/Line; cartographic (1:500k; 1:5m; 1:20m)1990, 2000, 2010, 2011, 2012, 2013, 2014, 2015
tractsTIGER/Line; cartographic (1:500k)1990, 2000, 2010, 2011, 2012, 2013, 2014, 2015
block_groupsTIGER/Line; cartographic (1:500k)1990, 2000, 2010, 2011, 2012, 2013, 2014, 2015
blocksTIGER/Line2011, 2012, 2013, 2014, 2015
placesTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
pumasTIGER/Line; cartographic (1:500k)2012, 2013, 2014, 2015
school_districtsTIGER/Line2011, 2012, 2013, 2014, 2015
zctasTIGER/Line; cartographic (1:500k)2012, 2013, 2014, 2015
congressional_districts (114th Congress)TIGER/Line; cartographic (1:500k; 1:5m; 1:20m)2014, 2015
state_legislative_districtsTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
voting_districtsTIGER/Line2012
area_waterTIGER/Line2011, 2012, 2013, 2014, 2015
linear_waterTIGER/Line2011, 2012, 2013, 2014, 2015
coastlineTIGER/Line2013, 2014, 2015
core_based_statistical_areasTIGER/Line; cartographic (1:500k; 1:5m; 1:20m)2011, 2012, 2013, 2014, 2015
combined_statistical_areasTIGER/Line; cartographic (1:500k; 1:5m; 1:20m)2011, 2012, 2013, 2014, 2015
metro_divisionsTIGER/Line2011, 2012, 2013, 2014, 2015
new_englandTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
county_subdivisionsTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
urban_areasTIGER/Line; cartographic (1:500k)2012, 2013, 2014, 2015
primary_roadsTIGER/Line2011, 2012, 2013, 2014, 2015
primary_secondary_roadsTIGER/Line2011, 2012, 2013, 2014, 2015
roadsTIGER/Line2011, 2012, 2013, 2014, 2015
railsTIGER/Line2011, 2012, 2013, 2014, 2015
native_areasTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
alaska_native_regional_corporationsTIGER/Line; cartographic (1:500k)2011, 2012, 2013, 2014, 2015
tribal_block_groupsTIGER/Line2011, 2012, 2013, 2014, 2015
tribal_census_tractsTIGER/Line2011, 2012, 2013, 2014, 2015
tribal_subdivisions_nationalTIGER/Line2011, 2012, 2013, 2014, 2015
landmarksTIGER/Line2011, 2012, 2013, 2014, 2015
militaryTIGER/Line2011, 2012, 2013, 2014, 2015

Copy Link

Version

Install

install.packages('tigris')

Monthly Downloads

11,544

Version

0.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Kyle Walker

Last Published

May 1st, 2017

Functions in tigris (0.5)

alaska_native_regional_corporations

Download an Alaska Native Regional Corporation shapefile into R.
area_water

Download an area water shapefile into R
counties

Download a US Counties shapefile into R, and optionally subset by state
county_subdivisions

Download a county subdivision shapefile into R
block_groups

Download a Census block groups shapefile into R, and optionally subset by county
blocks

Download a Census block shapefile into R
landmarks

Download a point or area landmarks shapefile into R
linear_water

Download an linear water shapefile into R
metro_divisions

Download a metropolitan divisions shapefile into R.
military

Download the Military Installation National Shapefile into R
list_states

Return a list of all the states in a
lookup_code

Look up state and county codes
pumas

Download a Public Use Microdata Area (PUMA) shapefile into R
rails

Download a national rails shapefile into R
tigris-exports

tigris exported operators
tigris

Download and use U.S. Census TIGER shapefiles in R
grep_state

Find states matching a term in a
is_tigris

Returns
nation

Download a US national boundary shapefile into R
filter_state

Filter a
fips_codes

Dataset with FIPS codes for US states and counties
new_england

Download a New England City and Town Area shapefile into R
places

Download a Census-designated places shapefile into R
roads

Download a roads shapefile into R
school_districts

Download a school district shapefile into R
tribal_subdivisions_national

Download an American Indian Tribal Subdivision National shapefile into R.
congressional_districts

Download a congressional districts shapefile for the 114th Congress into R
core_based_statistical_areas

Download a core-based statistical area shapefile into R
divisions

Download a US Census divisions cartographic boundary shapefile into R
filter_place

Filter a
list_counties

Return a data frame of county names & FIPS codes for a given state
list_places

Return a list of all the places in a
state_legislative_districts

Download a state legislative districts shapefile into R - upper or lower
states

Download shapefile for all states into R
tribal_block_groups

Download a Tribal block groups shapefile into R.
tribal_census_tracts

Download a Tribal Census tract shapefile into R.
native_areas

Download an American Indian / Alaska Native / Native Hawaiian Areas shapefile into R.
primary_roads

Download a national primary roads shapefile into R
primary_secondary_roads

Download a primary & secondary roads shapefile into R
tigris_type

Get the type of
coastline

Download a shapefile of the US coastline into R
combined_statistical_areas

Download a combined statistical areas shapefile into R
geo_join

Easily merge a data frame to a spatial data frame
grep_place

Find places matching a term in a
urban_areas

Download an urban areas shapefile into R
rbind_tigris

Row-bind
regions

Download a US regions cartographic boundary shapefile into R
voting_districts

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

Download a Zip Code Tabulation Area (ZCTA) shapefile into R
tracts

Download a Census tracts shapefile into R, and optionally subset by county