zipcodeR: Advancing the analysis of spatial data at the ZIP code level in R
Software Impacts
Abstract
This paper presents zipcodeR, an R package that facilitates analysis of ZIP code-level data by providing an offline database of ZIP codes and functions for geocoding, normalizing and retrieving data about ZIP codes and relating them to other geographies in R without depending on any external services.
Overview
The United States Postal Service (USPS) assigns unique identifiers for postal service areas known as ZIP codes which are commonly used to identify cities and regions throughout the United States in datasets.
Despite the widespread use of ZIP codes, there are challenges in using them for geospatial analysis in the social sciences. This paper presents zipcodeR, an R package that facilitates analysis of ZIP code-level data by providing an offline database of ZIP codes and functions for geocoding, normalizing and retrieving data about ZIP codes and relating them to other geographies in R without depending on any external services.
Key Features
- Offline database of all US ZIP codes
- Geocoding without external API dependencies
- Distance calculations between ZIP codes
- Radius searches for nearby ZIP codes
- Demographic data integration
- Cross-walking to other census geographies
Installation
# Install from CRAN
install.packages("zipcodeR")
# Or from GitHub for development version
devtools::install_github("gavinrozzi/zipcodeR")
Impact
zipcodeR has been downloaded over 100,000 times from CRAN and is used by researchers across academia, government, and industry for spatial analysis involving ZIP code-level data.