Skip to content

ZIP Codes

Matt Schell edited this page Mar 8, 2023 · 4 revisions

General refresher on United States Postal Service (USPS) ZIP codes, which aren't real geographies, and ZIP Code Tabulation Areas (ZCTAs, pronounced "zic-tuhs"), which are approximations of ZIP codes.

https://github.com/iandees/wtf-zipcodes

Since ZIP codes aren't even real geographies to begin with, they are super susceptible to the modifiable areal unit problem.

https://en.wikipedia.org/wiki/Modifiable_areal_unit_problem

The USPS site for pricing direct mailers may be useful for visualizing mail carrier routes and PO boxes relative to USPS ZIP codes:

https://eddm.usps.com/eddm/customer/routeSearch.action

If you read all of the above and, thus familiarized, still want to use ZIP codes good luck with the data sources below.

NYC Open Data

https://data.cityofnewyork.us/Business/Zip-Code-Boundaries/i8iw-xf4u

The polygons in this dataset overlap, with smaller ZIP codes fully contained within larger ZIP codes (ex 10151 contained by 10022). Most mapping software orders shape rendering by the order of records in the data, usually a synthetic key. So a naive mapping of these ZIP codes will often cause 10151 to disappear "behind" 10022.

There's no clear metadata on the source of this Open Data Portal file other than a source of "Department of Information Technology and Telecommunications" (DoITT). The name of the downloaded shape file is "ZIP_CODE_040114" and the metadata also appears to indicate that the data was created circa 2014 A.D. When the Open Data team reached out to folks at the Department of City Planning and the Department of Information Technology and Telecommunications (now OTI, Office of Technology and Innovation) no one in either of the relevant groups claimed responsibility for this dataset.

Some staff at the NYC Office of Technology and Innovation recall that these ZIP codes were hand crafted from US Census Bureau ZIP Code Tabulation Areas after the 2000 census. NYC ZIP Codes may have been updated by hand as recently as around 2010 as new US Postal Service ZIP codes came online. At some point the updates to the NYC file stopped and the same NYC ZIP Code boundaries have been kicking around city agencies as the official ZIP codes for years with little attention paid to details like you are for some reason reading on this page.

NYC Street Centerline Database

The Department of Information Technology and Telecommunications, in partnership with the Department of City Planning, maintains a ZIP code feature class in the Citywide Street Centerline (CSCL) database. The data is not published. It likely feeds into New York City's geocoders of record (see below, "Geocoding and Addresses").

Should you find yourself with a copy of this unpublished ZIP code layer, be aware that it may look different than the Open Data ZIP codes, but that's likely due to a repeat of the issue described above, where overlapping shapes obscure each other depending on the drawing order of your visualization software.

Other Sources

US Census Bureau Tiger Line Shape Files (ZCTAs)

https://www.census.gov/cgi-bin/geo/shapefiles/index.php

US Census Bureau ZCTA Cartographic Boundary Files ("cartographic" = "generalized").

https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html

Geocoding and Addresses

Given an address we can also derive ZIP Codes from New York City's geocoders. See for example:

ZIP codes are also baked into Address-Points

All three of the links above should return the same ZIP code for an address. Given the buffet of ZIP code boundaries available however, the ZIP code returned may or may not correspond to any of the other known ZIP code boundaries.

Seriously, are you still reading this? Well then you may be the only other person interested in a case where an address can be in different ZIP codes depending on the source. 55 Water Street (https://en.wikipedia.org/wiki/55_Water_Street) is an interesting address both because of the massive but rarely commented-upon building at that address, and also because (and possibly related) it belongs to either ZIP code 10041 or 10004.

Clone this wiki locally