{"id":31297263,"url":"https://github.com/ropensci/usaboundaries","last_synced_at":"2025-09-24T22:06:07.895Z","repository":{"id":21688477,"uuid":"25009759","full_name":"ropensci/USAboundaries","owner":"ropensci","description":"Historical and Contemporary Boundaries of the United States of America","archived":false,"fork":false,"pushed_at":"2021-10-12T14:59:23.000Z","size":16868,"stargazers_count":62,"open_issues_count":2,"forks_count":9,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-09-19T05:48:39.451Z","etag":null,"topics":["digital-history","history","r","r-package","rstats","spatial-data"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/USAboundaries","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ropensci.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-09T21:41:11.000Z","updated_at":"2025-07-24T16:27:02.000Z","dependencies_parsed_at":"2022-08-05T13:18:15.499Z","dependency_job_id":null,"html_url":"https://github.com/ropensci/USAboundaries","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ropensci/USAboundaries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2FUSAboundaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2FUSAboundaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2FUSAboundaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2FUSAboundaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/USAboundaries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2FUSAboundaries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276824969,"owners_count":25711261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digital-history","history","r","r-package","rstats","spatial-data"],"created_at":"2025-09-24T22:06:06.158Z","updated_at":"2025-09-24T22:06:07.886Z","avatar_url":"https://github.com/ropensci.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\npagetitle: Historical and Contemporary Boundaries of the United States of America\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\nset.seed(87737)\n```\n\n# USAboundaries\n\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/USAboundaries)](https://cran.r-project.org/package=USAboundaries)\n[![JOSS Status](https://joss.theoj.org/papers/3458a33133aa6c069ab4dd8df0b5f3b5/status.svg)](https://doi.org/10.21105/joss.00314)\n[![R-CMD-check](https://github.com/ropensci/USAboundaries/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/USAboundaries/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/ropensci/USAboundaries/master.svg)](https://codecov.io/github/ropensci/USAboundaries?branch=master)\n\n## Overview\n\nThis 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](https://publications.newberry.org/ahcbp/), as well as historical city population data from Erik Steiner's \"[United States Historical City Populations, 1790-2010](https://github.com/cestastanford/historical-us-city-populations).\" 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](https://en.wikipedia.org/wiki/State_Plane_Coordinate_System) projections as EPSG codes or PROJ.4 strings.\n\nThis package can serve a number of purposes. The spatial data can be joined to any other kind of data in order to make thematic maps. Unlike other R packages, this package also contains historical data for use in analyses of the recent or more distant past. See the [\"A sample analysis using USAboundaries\"](http://lincolnmullen.com/software/usaboundaries/articles/usaboundaries-sample-analysis.html) vignette for an example of how the package can be used for both historical and contemporary maps.\n\n## Citation\n\nIf you use this package in your research, we would appreciate a citation.\n\n```{r}\ncitation(\"USAboundaries\")\n```\n\n## Installation\n\nYou can install this package from CRAN.\n\n```\ninstall.packages(\"USAboundaries\")\n```\n\nAlmost all of the data for this package is provided by the [USAboundariesData package](https://github.com/ropensci/USAboundariesData). That package will be automatically installed (with your permission) from the [rOpenSci package repository](https://ropensci.r-universe.dev) the first time that you need it.\n\nOr you can install the development versions from GitHub using [remotes](https://remotes.r-lib.org). \n\n```\n# install.packages(\"remotes\")\nremotes::install_github(\"ropensci/USAboundaries\")\nremotes::install_github(\"ropensci/USAboundariesData\")\n```\n\n## Use\n\nThis package provides a set of functions, one for each of the types of boundaries that are available. These functions have a consistent interface. \n\nPassing 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.\n\nFor almost all functions, pass a character vector of state names or abbreviations to the `states =` argument to return only those states or territories.\n\nFor certain functions, more or less detailed boundary information is available by passing an argument to the `resolution =` argument.\n\nSee the examples below to see how the interface works, and see the documentation for each function for more details.\n\n```{r}\nlibrary(USAboundaries) \nlibrary(sf) # for plotting and projection methods\n\nstates_1840 \u003c- us_states(\"1840-03-12\")\nplot(st_geometry(states_1840))\ntitle(\"U.S. state boundaries on March 3, 1840\")\n\nstates_contemporary \u003c- us_states()\nplot(st_geometry(states_contemporary))\ntitle(\"Contemporary U.S. state boundaries\")\n\ncounties_va_1787 \u003c- us_counties(\"1787-09-17\", states = \"Virginia\")\nplot(st_geometry(counties_va_1787))\ntitle(\"County boundaries in Virginia in 1787\")\n\ncounties_va \u003c- us_counties(states = \"Virginia\")\nplot(st_geometry(counties_va))\ntitle(\"Contemporary county boundaries in Virginia\")\n\ncounties_va_highres \u003c- us_counties(states = \"Virginia\", resolution = \"high\")\nplot(st_geometry(counties_va_highres))\ntitle(\"Higher resolution contemporary county boundaries in Virginia\")\n\ncongress \u003c- us_congressional(states = \"California\")\nplot(st_geometry(congress))\ntitle(\"Congressional district boundaries in California\")\n```\n\n## State plane projections\n\nThe `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.\n\n```{r}\nva \u003c- us_states(states = \"VA\", resolution = \"high\")\nplot(st_geometry(va), graticule = TRUE)\n\nva_projection \u003c- state_plane(\"VA\")\nva \u003c- st_transform(va, va_projection)\nplot(st_geometry(va), graticule = TRUE)\n```\n\n## Related packages\n\nEach function returns an `sf` object from the [sf](https://cran.r-project.org/package=sf) package, which can be mapped using the [leaflet](https://cran.r-project.org/package=leaflet) or [ggplot2](https://cran.r-project.org/package=ggplot2) packages.\n\nIf you need U.S. Census Bureau boundary files which are not provided by this package, consider using the [tigris](https://cran.r-project.org/package=tigris) package, which downloads those shapefiles.\n\n## License\n\nThe 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](https://publications.newberry.org/ahcbp/), 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.\n\nThe 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](https://github.com/cestastanford/historical-us-city-populations).\n\nThe contemporary data is provided by the U.S. Census Bureau and is in the public domain.\n\nAll code in this package is copyright [Lincoln Mullen](http://lincolnmullen.com) and is released under the MIT license.\n\n---\n[![rOpenSci footer](https://ropensci.org//public_images/github_footer.png)](https://ropensci.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fusaboundaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropensci%2Fusaboundaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fusaboundaries/lists"}