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:
# Load the zipcodeR library into R library(zipcodeR) # Find all ZIP codes for a state search_state('NJ') # Find all ZIP codes for a county search_county('Ocean','NJ') # Find ZIP codes for a city search_city('Chappaqua','NY') # Find all ZIP codes for a timezone search_tz('Eastern') # Get all Census tracts for a given ZIP code get_tracts('08731')
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.