zipcodeR

zipcodeR is an R package that makes dealing with ZIP codes painless.

The package provides an integrated set of data and functions that help you save time when working with ZIP code data in R by making it easy to lookup ZIP codes across multiple geographies withour relying on web services.

The current release of the package can be installed from CRAN by entering the following at the R console:

install.packages(‘zipcodeR’)

The latest development version of the package can currently be installed from Github using devtools:

library(devtools)
install_github("gavinrozzi/zipcodeR")

Once installed, it’s easy to start using zipcodeR to obtain ZIP code data for your next project:

# 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 all ZIP codes for a timezone
search_tz('Eastern')

# Get all Census tracts for a given ZIP code
get_tracts('08731')

The functions contained within zipcodeR return a dataframe containing the ZIP code and related geographic and demographic information. zipcodeR helps facilitate relating ZIP code-level data to Census tracts and other Census units by providing helper functions.

Report any issues with the package here.

Pull requests and suggestions for new features / changes are welcome via Github

Gavin C. Rozzi
Gavin C. Rozzi
Pushing the boundaries of data, technology & public policy

Gavin Rozzi is a data scientist from New Jersey. Gavin studies urban informatics, environmental factors affecting the spread of COVID-19 & public policy development.

comments powered by Disqus

Related