{"id":18859676,"url":"https://github.com/pdil/usmapdata","last_synced_at":"2025-04-14T12:21:18.910Z","repository":{"id":102898351,"uuid":"302762454","full_name":"pdil/usmapdata","owner":"pdil","description":"🗺 Data repository for the usmap R package","archived":false,"fork":false,"pushed_at":"2025-03-06T23:43:36.000Z","size":20261,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T01:26:20.697Z","etag":null,"topics":["counties","data","fips","mapping","r","states","usa"],"latest_commit_sha":null,"homepage":"https://usmap.dev","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdil.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","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}},"created_at":"2020-10-09T22:04:19.000Z","updated_at":"2025-03-06T23:42:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"73897239-d643-4c81-b1ba-eb13fe433c0c","html_url":"https://github.com/pdil/usmapdata","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdil%2Fusmapdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdil%2Fusmapdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdil%2Fusmapdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdil%2Fusmapdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdil","download_url":"https://codeload.github.com/pdil/usmapdata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877968,"owners_count":21176244,"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","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":["counties","data","fips","mapping","r","states","usa"],"created_at":"2024-11-08T04:18:51.722Z","updated_at":"2025-04-14T12:21:18.870Z","avatar_url":"https://github.com/pdil.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗺 usmapdata\n\n[![CRAN](https://www.r-pkg.org/badges/version/usmapdata?color=blue)](https://cran.r-project.org/package=usmapdata) [![check](https://github.com/pdil/usmap/actions/workflows/check.yaml/badge.svg)](https://github.com/pdil/usmap/actions/workflows/check.yaml) [![codecov](https://codecov.io/gh/pdil/usmapdata/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pdil/usmapdata)\n\nYou might be looking for the `usmap` package: [CRAN](https://cran.r-project.org/package=usmap) | [GitHub](https://github.com/pdil/usmap) | [Website](https://usmap.dev)\n\n## Purpose\n\n`usmapdata` is a container package for the map data frame used in the [`usmap`](https://github.com/pdil/usmap) package. This data has been extracted to keep `usmap` small and easier to maintain, while allowing the ability to keep the US map data frame updated as often as possible (independently of `usmap` updates).\n\nThis package and repository will only contain functions and data relevant to the actual map and FIPS data used to draw the map in the `usmap` package. All other functions, including FIPS and mapping convenience functions, will be contained in the `usmap` [repository](https://github.com/pdil/usmap).\n\n## Map Data\nThe map data files that we use to plot the maps in R are located in the `inst/extdata` folder. They are generated from shapefiles published by the [US Census Bureau](https://www.census.gov/). Data files for maps and FIPS codes at both the state and county levels are included.\n\nThe [Cartographic Boundary Files](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.html) are used for mapping in `usmap`—specifically the 1:20m scale files. This low resolution allows for small file sizes while still allowing enough detail for simple choropleths. The file description can be read [here](https://www.census.gov/programs-surveys/geography/technical-documentation/naming-convention/cartographic-boundary-file.html).\n\nShapefiles are updated yearly by the US Census Bureau. This repository contains scripts which periodically check for new shapefiles and update the data in the package accordingly. For more details see the [`data-raw`](https://github.com/pdil/usmapdata/tree/master/data-raw) directory.\n\n## Installation\nThis package should only be installed if you intend to manipulate the US mapping data frame, which contains coordinates to draw the US state and county boundaries. If you're interested in plotting data on a US map, use the [`usmap`](https://github.com/pdil/usmap) package.\n\n📦 To install from CRAN (recommended), run the following code in an R console:\n```r\ninstall.packages(\"usmapdata\")\n```\n\n### Developer Build\n⚠️ The developer build may be unstable and not function correctly, use with caution.\n\nTo install the package from this repository, run the following code in an R console:\n```r\n# install.package(\"devtools\")\ndevtools::install_github(\"pdil/usmapdata\")\n```\nThis method will provide the most recent developer build of `usmapdata`.\n\n## Usage\nTo begin using `usmapdata`, import the package using the `library` command:\n```r\nlibrary(usmapdata)\n```\n\n## Additional Information\n\n### Coordinate System\n`usmap` uses the [US National Atlas Equal Area](https://epsg.io/9311) coordinate system:\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ccode\u003esf::st_crs(9311)\u003c/code\u003e\u003c/summary\u003e\n\n    ```r\n    #\u003e Coordinate Reference System:\n    #\u003e   User input: EPSG:9311\n    #\u003e   wkt:\n    #\u003e PROJCRS[\"NAD27 / US National Atlas Equal Area\",\n    #\u003e     BASEGEOGCRS[\"NAD27\",\n    #\u003e         DATUM[\"North American Datum 1927\",\n    #\u003e             ELLIPSOID[\"Clarke 1866\",6378206.4,294.978698213898,\n    #\u003e                 LENGTHUNIT[\"metre\",1]]],\n    #\u003e         PRIMEM[\"Greenwich\",0,\n    #\u003e             ANGLEUNIT[\"degree\",0.0174532925199433]],\n    #\u003e         ID[\"EPSG\",4267]],\n    #\u003e     CONVERSION[\"US National Atlas Equal Area\",\n    #\u003e         METHOD[\"Lambert Azimuthal Equal Area (Spherical)\",\n    #\u003e             ID[\"EPSG\",1027]],\n    #\u003e         PARAMETER[\"Latitude of natural origin\",45,\n    #\u003e             ANGLEUNIT[\"degree\",0.0174532925199433],\n    #\u003e             ID[\"EPSG\",8801]],\n    #\u003e         PARAMETER[\"Longitude of natural origin\",-100,\n    #\u003e             ANGLEUNIT[\"degree\",0.0174532925199433],\n    #\u003e             ID[\"EPSG\",8802]],\n    #\u003e         PARAMETER[\"False easting\",0,\n    #\u003e             LENGTHUNIT[\"metre\",1],\n    #\u003e             ID[\"EPSG\",8806]],\n    #\u003e         PARAMETER[\"False northing\",0,\n    #\u003e             LENGTHUNIT[\"metre\",1],\n    #\u003e             ID[\"EPSG\",8807]]],\n    #\u003e     CS[Cartesian,2],\n    #\u003e         AXIS[\"easting (X)\",east,\n    #\u003e             ORDER[1],\n    #\u003e             LENGTHUNIT[\"metre\",1]],\n    #\u003e         AXIS[\"northing (Y)\",north,\n    #\u003e             ORDER[2],\n    #\u003e             LENGTHUNIT[\"metre\",1]],\n    #\u003e     USAGE[\n    #\u003e         SCOPE[\"Statistical analysis.\"],\n    #\u003e         AREA[\"United States (USA) - onshore and offshore.\"],\n    #\u003e         BBOX[15.56,167.65,74.71,-65.69]],\n    #\u003e     ID[\"EPSG\",9311]]\n    ```\n\u003c/details\u003e\n\nThis [coordinate reference system (CRS)](https://www.nceas.ucsb.edu/sites/default/files/2020-04/OverviewCoordinateReferenceSystems.pdf) can also be obtained with `usmap::usmap_crs()`.\n\n## Acknowledgments\nThe code used to generate the map files was based on this blog post by [Bob Rudis](https://github.com/hrbrmstr):\n[Moving The Earth (well, Alaska \u0026 Hawaii) With R](https://rud.is/b/2014/11/16/moving-the-earth-well-alaska-hawaii-with-r/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdil%2Fusmapdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdil%2Fusmapdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdil%2Fusmapdata/lists"}