Title: | Historical and Contemporary Boundaries of the United States of America |
---|---|
Description: | The boundaries for geographical units in the United States of America contained in this package include state, county, congressional district, and zip code tabulation area. Contemporary boundaries are provided by the U.S. Census Bureau (public domain). Historical boundaries for the years from 1629 to 2000 are provided form the Newberry Library's 'Atlas of Historical County Boundaries' (licensed CC BY-NC-SA). Additional data is provided in the 'USAboundariesData' package; this package provides an interface to access that data. |
Authors: | Lincoln Mullen [aut, cre] , Jordan Bratt [aut] , United States Census Bureau [cph] |
Maintainer: | Lincoln Mullen <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.4.0 |
Built: | 2024-12-19 04:53:20 UTC |
Source: | https://github.com/ropensci/USAboundaries |
USAboundariesData
package after checking with the userInstall the USAboundariesData
package after checking with the user
install_data_package()
install_data_package()
This data frame includes abbreviations and codes for states and territories in the United States. It is intended as a lookup table.
state_codes
state_codes
A data.frame with 69 rows and 4 variables:
The state or territory name
The two character abbreviation for the state or territory.
A three digit numeric FIPS code for the state or territory.
One of state
, territory
, or district
.
U.S. Census Bureau, U.S. Gazeteer Files (2014).
Federal Information Processing Standard state code, Wikipedia (accessed July 23, 2015).
Get EPSG codes or PROJ.4 codes for projections from the State Plane Coordinate System.
state_plane(state, plane_id = NULL, type = c("epsg", "proj4"))
state_plane(state, plane_id = NULL, type = c("epsg", "proj4"))
state |
The postal code for the state. |
plane_id |
The state plane geographic zone identifier. A |
type |
The type of output to return: either an EPSG code or PROJ4 string. |
Either a PROJ4 string as a character vector or an EPSG code as an integer.
For documentation of the underlying State Plane Coordinate System
projection data frame, see state_proj
.
if (require(USAboundariesData)) { state_plane(state = "MA", type = "epsg") state_plane(state = "MA", type = "proj4") state_plane(state = "MA", plane_id = "island", type = "epsg") state_plane(state = "MA", plane_id = "island", type = "proj4") # Show the difference made by a state plane projection if (require(sf)) { va <- us_states(states = "VA", resolution = "high") plot(st_geometry(va), graticule = TRUE) va <- st_transform(va, state_plane("VA")) plot(st_geometry(va), graticule = TRUE) } }
if (require(USAboundariesData)) { state_plane(state = "MA", type = "epsg") state_plane(state = "MA", type = "proj4") state_plane(state = "MA", plane_id = "island", type = "epsg") state_plane(state = "MA", plane_id = "island", type = "proj4") # Show the difference made by a state plane projection if (require(sf)) { va <- us_states(states = "VA", resolution = "high") plot(st_geometry(va), graticule = TRUE) va <- st_transform(va, state_plane("VA")) plot(st_geometry(va), graticule = TRUE) } }
This data frame includes state abbreviations, EPSG codes, and proj4 strings for projections from the State Plane Coordinate System.
state_proj
state_proj
A data frame with 123 rows and 5 variables:
The state or territory abbreviation.
Name of the state plane zone.
The EPSG code for each state plane zone.
The PROJ4 string for the state plane projection.
State plane zone for projecting the entire state.
The U.S. Census Bureau provides cartographic boundary files for current U.S. boundaries. This package has only the low-resolution contemporary state boundaries. Other census boundary files are provided by and documented in the USAboundariesData package.
states_contemporary_lores
states_contemporary_lores
An object of class sf
(inherits from data.frame
) with 52 rows and 13 columns.
For citations for the other Census boundary files provided by the
USAboundariesData package, see the census_boundaries
documentation
in that package.
This function returns an sf
object of cities (or populated places)
with their populations and latitudes and longitudes. Population data is taken
from the U.S. Census.
us_cities(map_date = NULL, states = NULL)
us_cities(map_date = NULL, states = NULL)
map_date |
If |
states |
A character vector of state or territory names or
abbreviations. Only boundaries for those states/territories will be
returned. If |
The data was compiled by Erik Steiner and Jason Heppler at the Center for Spatial and Textual Analysis, Stanford University. See their description of the data for a fuller accounting of how the data was gathered.
if (require(USAboundariesData)) { us_cities(1805) us_cities("1828-05-08") us_cities() }
if (require(USAboundariesData)) { us_cities(1805) us_cities("1828-05-08") us_cities() }
Get the current (2020) boundaries for U.S. Congressional districts.
us_congressional(resolution = c("low", "high"), states = NULL)
us_congressional(resolution = c("low", "high"), states = NULL)
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 |
An sf
object.
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.
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)) }
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)) }
Get the current (2020) boundaries for U.S counties from the U.S. Census Bureau, or get historical county boundaries for dates between 30 December 1636 and 31 December 2000.
us_counties(map_date = NULL, resolution = c("low", "high"), states = NULL)
us_counties(map_date = NULL, resolution = c("low", "high"), states = NULL)
map_date |
The date of the boundaries as some object coercible to a date
with |
resolution |
The resolution of the map. |
states |
A character vector of state or territory names or
abbreviations. Only boundaries for those states/territories will be
returned. If |
An sf
object.
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. For
documentation of and citation to the underlying shapefiles for historical
data from the Atlas of Historical County Boundaries, see the
ahcb_boundaries
help file in the USAboundariesData package.
if (require(USAboundariesData) && require(sf)) { contemporary_us <- us_counties() historical_us <- us_counties("1820-07-04") contemporary_ne <- us_counties(states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut")) historical_ne <- us_counties("1803-04-28", states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut"), resolution = "high") plot(st_geometry(contemporary_us)) plot(st_geometry(historical_us)) plot(st_geometry(contemporary_ne)) plot(st_geometry(historical_ne)) }
if (require(USAboundariesData) && require(sf)) { contemporary_us <- us_counties() historical_us <- us_counties("1820-07-04") contemporary_ne <- us_counties(states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut")) historical_ne <- us_counties("1803-04-28", states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut"), resolution = "high") plot(st_geometry(contemporary_us)) plot(st_geometry(historical_us)) plot(st_geometry(contemporary_ne)) plot(st_geometry(historical_ne)) }
Get the current (2020) boundaries for U.S states from the U.S. Census Bureau, or get historical state boundaries for dates between 3 September 1783 and 31 December 2000.
us_states(map_date = NULL, resolution = c("low", "high"), states = NULL)
us_states(map_date = NULL, resolution = c("low", "high"), states = NULL)
map_date |
The date of the boundaries as some object coercible to a date
with |
resolution |
The resolution of the map. |
states |
A character vector of state or territory names or
abbreviations. Only boundaries for those states/territories will be
returned. If |
An sf
object.
For documentation of and citation to the underlying shapefiles for
contemporary data from the U.S. Census Bureau, see census_boundaries
documentation in the USAboundariesData package. For documentation of and
citation to the underlying shapefiles for historical data from the Atlas of
Historical County Boundaries, see the ahcb_boundaries
documentation
in the USAboundariesData package.
contemporary_us <- us_states() if (require(USAboundariesData) && require(sf)) { historical_us <- us_states("1820-07-04") contemporary_ne <- us_states(states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut")) historical_ne <- us_states(as.Date("1805-03-12"), states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut"), resolution = "high") plot(st_geometry(contemporary_us)) plot(st_geometry(historical_us)) plot(st_geometry(contemporary_ne)) plot(st_geometry(historical_ne)) }
contemporary_us <- us_states() if (require(USAboundariesData) && require(sf)) { historical_us <- us_states("1820-07-04") contemporary_ne <- us_states(states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut")) historical_ne <- us_states(as.Date("1805-03-12"), states = c("Massachusetts", "Vermont", "Maine", "New Hampshire", "Rhode Island", "Connecticut"), resolution = "high") plot(st_geometry(contemporary_us)) plot(st_geometry(historical_us)) plot(st_geometry(contemporary_ne)) plot(st_geometry(historical_ne)) }
Get the current (2019) centroids for U.S Zipcode Tabulation Areas from the U.S. Census Bureau. The centroids were calculated from the ZCTA boundary files available on the U.S. Census Bureau website.
us_zipcodes()
us_zipcodes()
An sf
object.
For documentation of and citation to the underlying shapefiles for
contemporary data from the U.S. Census Bureau, see the
census_boundaries
documentation in the USAboundariesData package.
if (require(USAboundariesData)) { us_zipcodes() }
if (require(USAboundariesData)) { us_zipcodes() }
This package provides contemporary (2014) boundaries for states, counties, zip code tabulation areas, and congressional districts in the United States of America. This data is provided by the U.S. Census Bureau.
This package also provides spatial objects with historical boundaries of
states or counties in the United States of America from 1629 to 2000. It
provides data from the Atlas
of Historical County Boundaries. The copyright to the historical data used
in this package is owned by the Newberry Library, and it is included in the
USAboundariesData
package under the terms of the
Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 Generic (CC BY-NC-SA 2.5) license.
The code in this package is copyrighted by Lincoln Mullen, and is released under the terms of the MIT License.