| Type: | Package |
| Title: | Historical and Contemporary Boundaries of the United States of America |
| Version: | 0.5.1 |
| 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. |
| License: | MIT + file LICENSE |
| URL: | https://docs.ropensci.org/USAboundaries/, https://github.com/ropensci/USAboundaries |
| BugReports: | https://github.com/ropensci/USAboundaries/issues |
| Depends: | R (≥ 3.5) |
| Imports: | cli |
| Suggests: | covr, dplyr, knitr, leaflet, pak, rmarkdown, sf (≥ 1.0.0), testthat (≥ 3.0.0), tibble, USAboundariesData (≥ 0.5.0) |
| RoxygenNote: | 7.3.3 |
| Additional_repositories: | https://ropensci.r-universe.dev |
| LazyData: | true |
| LazyDataCompression: | xz |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| Config/Needs/website: | rmarkdown |
| NeedsCompilation: | no |
| Packaged: | 2026-01-25 21:46:05 UTC; jacci |
| Author: | Lincoln Mullen |
| Maintainer: | Jacci Ziebert <jacciziebert@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-01-29 20:20:12 UTC |
USAboundaries: Historical and Contemporary Boundaries of the United States of America
Description
This package provides contemporary (2024) 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.
Details
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.
Author(s)
Maintainer: Jacci Ziebert jacciziebert@gmail.com
Authors:
Lincoln Mullen lincoln@lincolnmullen.com (ORCID)
Jordan Bratt jfbratt@gmail.com (ORCID)
Other contributors:
United States Census Bureau [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/ropensci/USAboundaries/issues
Check whether to install USAboundariesData and install if necessary
Description
If the USAboundariesData package is not installed, install it from the
Usage
check_data_package()
Value
No return value, called for side effects: if USAboundariesData is not installed or a newer version is required, a console message will appear asking to install USAboundariesData. Else nothing will return.
Install the USAboundariesData package after checking with the user
Description
Install the USAboundariesData package after checking with the user
Usage
install_USAboundariesData()
Value
No return value, called for side effects: if USAboundariesData is not installed, it will ask the user if they want to install it. If user selects "yes" then it will be installed. If no, abort.
State codes and abbreviations for U.S. states and territories
Description
This data frame includes abbreviations and codes for states and territories in the United States. It is intended as a lookup table.
Usage
state_codes
Format
A data.frame with 69 rows and 4 variables:
- state_name
The state or territory name
- state_abbr
The two character abbreviation for the state or territory.
- state_code
A 3-digit numeric FIPS code for the state or territory.
- jurisdiction_type
One of
state,territory, ordistrict.
References
U.S. Census Bureau, Ameri. National Standards Institute (ANSI), Federal Information Processing Series (FIPS), and Other Standardized Geographic Codes U.S. Census Bureau (2025).
Projections from the State Plane Coordinate System
Description
Get EPSG codes or PROJ.4 codes for projections from the State Plane Coordinate System.
Usage
state_plane(state, plane_id = NULL, type = c("epsg", "proj4"))
Arguments
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. |
Value
Either a PROJ4 string as a character vector or an EPSG code as an integer.
See Also
For documentation of the underlying State Plane Coordinate System
projection data frame, see state_proj.
Examples
if (require(USAboundariesData, quietly = TRUE)) {
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, quietly = TRUE)) {
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)
}
}
Data for projections from the State Plane Coordinate System
Description
This data frame includes state abbreviations, EPSG codes, and proj4 strings for projections from the State Plane Coordinate System.
Usage
state_proj
Format
A data frame with 123 rows and 5 variables:
- state
The state or territory abbreviation.
- zone
Name of the state plane zone.
- epsg
The EPSG code for each state plane zone.
- proj4_string
The PROJ4 string for the state plane projection.
- statewide_proj
State plane zone for projecting the entire state.
References
U.S. state boundaries
Description
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.
Usage
states_contemporary_lores
Format
An object of class sf (inherits from data.frame) with 52 rows and 13 columns.
See Also
For citations for the other Census boundary files provided by the
USAboundariesData package, see the census_boundaries documentation
in that package.
City locations and populations (historical and contemporary)
Description
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.
Usage
us_cities(map_date = NULL, states = NULL)
Arguments
map_date |
If |
states |
A character vector of state or territory names or
abbreviations. Only boundaries for those states/territories will be
returned. If |
Value
An sf object.
References
The data was compiled by Erik Steiner and Jason Heppler at the Center for Spatial and Textual Analysis, Stanford University. See their the description of the data for a fuller accounting of how the data was gathered.
Examples
if (require(USAboundariesData, quietly = TRUE)) {
us_cities(1805)
us_cities("1828-05-08")
us_cities()
}
Congressional district boundaries (contemporary)
Description
Get the current (2024) 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 |
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
if (require(USAboundariesData, quietly = TRUE) && require(sf, quietly = TRUE)) {
us_congressional <- us_congressional()
va_congressional <- us_congressional(
states = "Virginia", resolution = "high")
plot(st_geometry(us_congressional))
plot(st_geometry(va_congressional))
}
County boundaries (contemporary and historical)
Description
Get the current (2024) 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.
Usage
us_counties(map_date = NULL, resolution = c("low", "high"), states = NULL)
Arguments
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 |
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. 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.
Examples
if (require(USAboundariesData, quietly = TRUE) && require(sf, quietly = TRUE)) {
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))
}
State boundaries (contemporary and historical)
Description
Get the current (2019) 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.
Usage
us_states(map_date = NULL, resolution = c("low", "high"), states = NULL)
Arguments
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 |
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 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.
Examples
contemporary_us <- us_states()
if (require(USAboundariesData, quietly = TRUE) && require(sf, quietly = TRUE)) {
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))
}
Zip Code Tabulation Areas (contemporary)
Description
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.
Usage
us_zipcodes()
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 documentation in the USAboundariesData package.
Examples
if (require(USAboundariesData, quietly = TRUE)) {
us_zipcodes()
}