Makes dealing with U.S. ZIP codes painless.

zipcodeR is an R library that makes working with ZIP codes in R easier. It provides data on all U.S. ZIP codes using multiple open data sources, making it easier for social science researchers and data scientists to work with ZIP code-level data in projects.


Install the current release from CRAN:


The latest development version can be installed like so using devtools:

devtools::install_github('gavinrozzi/zipcodeR', ref = "develop")


# Load the zipcodeR library into R

# Find all ZIP codes for a state

# Find all ZIP codes for a county

# Find ZIP codes for a city

# Find all ZIP codes for a timezone

# Get all Census tracts for a given ZIP code


Documentation for the current release is available here. See the reference section for full details on how to use each of the functions provided by zipcodeR.

Documentation for the current development version can be viewed here. This version contains new features and functions that may have not been fully tested, but may be used in a future release.

Data Sources

This project was inspired by the excellent uszipcode library for Python and utilizes the same backend database released by its author under the MIT license. This project also incorporates open data from the U.S. Census Bureau and Department of Housing & Urban Development.