ropensci/USAboundaries

Name: USAboundaries

Owner: rOpenSci

Description: Historical and Contemporary Boundaries of the United States of America

Created: 2014-10-09 21:41:11.0

Updated: 2018-01-06 14:03:01.0

Pushed: 2017-10-16 15:09:29.0

Homepage: http://ropensci.github.io/USAboundaries/

Size: 15839

Language: R

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

USAboundaries: Historical and Contemporary Boundaries of the United States of America

CRAN\_Status\_Badge Build Status AppVeyor Build Status Coverage Status

This R package includes contemporary state, county, and Congressional district boundaries, as well as zip code tabulation area centroids. It also includes historical boundaries from 1629 to 2000 for states and counties from the Newberry Library's Atlas of Historical County Boundaries, as well as historical city population data from Erik Steiner's “United States Historical City Populations, 1790-2010.” The package has some helper data, including a table of state names, abbreviations, and FIPS codes, and functions and data to get State Plane Coordinate System projections as EPSG codes or PROJ.4 strings.

Installation

You can install this package from CRAN.

install.packages("USAboundaries")

Almost all of the data for this package is provided by the USAboundariesData package. That package will be automatically installed (with your permission) from the rOpenSci package repository the first time that you need it.

Or you can install the development versions from GitHub using devtools.

devtools::install_github("ropensci/USAboundaries")
devtools::install_github("ropensci/USAboundariesData")
Use

This package provides a set of functions, one for each of the types of boundaries that are available. These functions have a consistent interface.

Passing a date to us_states(), us_counties(), and us_cities() returns the historical boundaries for that date. If no date argument is passed, then contemporary boundaries are returned. The functions us_congressional() and us_zipcodes() only offer contemporary boundaries.

For any function, pass a character vector of state names or abbreviations to the states = argument to return only those states or territories.

For certain functions, more or less detailed boundary information is available by passing an argument to the resolution = argument.

See the examples below to see how the interface works, and see the documentation for each function for more details.

ary(USAboundaries) 
ary(sf) # for plotting and projection methods
inking to GEOS 3.6.1, GDAL 2.2.0, proj.4 4.9.3

es_1840 <- us_states("1840-03-12")
(st_geometry(states_1840))
e("U.S. state boundaries on March 3, 1840")

es_contemporary <- us_states()
(st_geometry(states_contemporary))
e("Contemporary U.S. state boundaries")

ties_va_1787 <- us_counties("1787-09-17", states = "Virginia")
(st_geometry(counties_va_1787))
e("County boundaries in Virginia in 1787")

ties_va <- us_counties(states = "Virginia")
(st_geometry(counties_va))
e("Contemporary county boundaries in Virginia")

ties_va_highres <- us_counties(states = "Virginia", resolution = "high")
(st_geometry(counties_va_highres))
e("Higher resolution contemporary county boundaries in Virginia")

ress <- us_congressional(states = "California")
(st_geometry(congress))
e("Congressional district boundaries in California")

State plane projections

The state_plane() function returns EPSG codes and PROJ.4 strings for the State Plane Coordinate System. You can use these to use suitable projections for specific states.

- us_states(states = "VA", resolution = "high")
(st_geometry(va), graticule = TRUE)

rojection <- state_plane("VA")
- st_transform(va, va_projection)
(st_geometry(va), graticule = TRUE)

Related packages

Each function returns an sf object from the sf package, which can be mapped using the leaflet or ggplot2 packages.

If you need U.S. Census Bureau boundary files which are not provided by this package, consider using the tigris package, which downloads those shapefiles.

Citation and license

The historical boundary data provided in this package is available under the CC BY-NC-SA 2.5 license from John H. Long, et al., Atlas of Historical County Boundaries, Dr. William M. Scholl Center for American History and Culture, The Newberry Library, Chicago (2010). Please cite that project if you use this package in your research and abide by the terms of their license if you use the historical information.

The historical population data for cities is provided by U.S. Census Bureau and Erik Steiner, Spatial History Project, Center for Spatial and Textual Analysis, Stanford University. See the data in this repository.

The contemporary data is provided by the U.S. Census Bureau and is in the publication domain.

All code in this package is copyright Lincoln Mullen and is released under the MIT license.

If you use this package in your research, I would appreciate a citation.

tion("USAboundaries")

o cite package 'USAboundaries' in publications use:

 Lincoln Mullen and Jordan Bratt (2017). USAboundaries:
 Historical and Contemporary Boundaries of the United States of
 America. R package version 0.3.0.
 https://github.com/ropensci/USAboundaries

 BibTeX entry for LaTeX users is

 @Manual{,
   title = {USAboundaries: Historical and Contemporary Boundaries of the United States of America},
   author = {Lincoln Mullen and Jordan Bratt},
   year = {2017},
   note = {R package version 0.3.0},
   url = {https://github.com/ropensci/USAboundaries},
 }

rOpenSci footer


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.