Research: zipcodeR integrates open-source datasets, official government crosswalk files to provide data on over 41,000 ZIP codes

July 12, 2021

In “zipcodeR: Advancing the analysis of spatial data at the ZIP code level in R,” (Software Impacts) Gavin Rozzi, Research Computing Specialist with the Rutgers Urban & Civic Informatics Lab at the Bloustein School, looks at the development of the zipcodeR R package and its implications for data analysis by academics and social scientists. 

ZIP codes are one of the most common forms of geographic data encountered by researchers in the social sciences.  Among other things, data aggregated at the ZIP code level are used to predict social determinants of health and reveal inequalities in small areas.  However, the use of ZIP codes is not as valuable when studying changes over time compared to Census tracts.  zipcodeR is a package for the R (available on the Comprehensive R Archive Network or CRAN) that seeks to make research using ZIP codes easier and more accessible for researchers conducting geospatial analysis.

zipcodeR contributes to the R data science ecosystem by integrating multiple open-source datasets and official government crosswalk files to provide data on over 41,000 ZIP codes. These datasets are suitable for integration into larger projects via datasets and wrapper functions.

In addition to making these data sources available for integration, zipcodeR includes a suite of functions for programmatically retrieving data on ZIP codes by U.S. state, city, county, time zone, and other search parameters to support the rapid analysis of data. It allows searching of all ZIP codes located in a specific radius around a given coordinate pair with a single function call in R. These features make it possible to easily map zip-code level data without depending on external geocoding APIs. This makes it especially useful for working with restricted datasets that must not be sent outside of internal networks.

Since the package’s initial release in late 2020, zipcodeR has enabled the rapid prototyping of research and data science projects and has been implemented in a diverse range of R projects. It has been used to create an income tax dashboard that shows economic data by ZIP code.  It was used to create composite metrics of data collected during the COVID-19 pandemic, a study of physician mental health, and an analysis of how equitable COVID-19 vaccine distribution was in the state of Texas. Additionally, there are several peer-reviewed manuscripts from other institutions currently under review that has implemented zipcodeR.

zipcodeR has been adopted in academia for courses and projects in data science and urban informatics. Students used it in a project exploring the relationships between COVID-19 case counts and election data.  The package was used to analyze a program evaluation at a university cancer center.  On a technical level, it has been used to support the analysis of commonly available administrative data and eliminating repetitive tasks for R users seeking to gain experience with geospatial analysis.

The package has now had three major iterations published on CRAN. It is becoming more comprehensive as additional user feedback has been incorporated into the software. Further contributions from the community are welcome. While the package is relatively feature-complete at this stage, future iterations may see the integration of additional ZIP code crosswalk datasets available from the U.S. federal government, as well as the improvements to the existing functions. This will add to increased efficiency and broader applicability to research workflows.

As open-source software, the source code of the package is developed in public via a GitHub repository and further contributions from the academic community are welcome.

Recent Posts

Mian: Affordable housing in God’s backyard

Affordable housing in God’s backyard: Some religious congregations find a new use for their space By Nadia Mian, Ph.D., Senior Program Director, Ralph W. Voorhees Center for Civic Engagement Faced with declining membership, aging buildings and large, underutilized...

Do you have one of the most common jobs in New Jersey?

Nearly 4.6 million people work in New Jersey in thousands of different types of jobs. But nearly 840,000 positions make up the top 10 most common roles, according to data from the U.S Bureau of Labor Statistics. Laborers and freight stock and material movers — those...

NJSPL – The New Jersey Induced Travel Calculator

By Robert B. Noland Induced travel occurs when new roads or lanes are built with the goal of reducing traffic congestion. What this means in practice is that new travel fills the new roads or lanes such that the goal of congestion reduction is not met. While many...

Kelly O’Brien (MCRP ’09) Named Fairfax City Hometown Hero

On July 15th, Kelly O'Brien (MCRP '09)  was recognized as a Hometown Hero during Fox 5 DC's Zip Trip visit to Fairfax City. "Although I don't think of myself as a hero, I am grateful for the chance to express my dedication to serving my community and shed light on the...

Winecoff: Working Paper on Health Insurance Enrollment

Spillovers in Public Benefit Enrollment: How does Expanding Public Health Insurance for Working-Age Adults affect Future Health Insurance Choices? Abstract Enrollment in one public benefit program often affects enrollment in others. We study life-course spillovers by...

Upcoming Events

Event Series CAREERS

Virtual Career Drop-ins

Virtual

Stop by virtually on Mondays (except for holidays) beginning September 9th through December 16th between 11 am and 1 pm to ask a quick (15 min) career-related question of Bloustein […]