Skip to main content

Using data from the U.S. Census Bureau, this code allows you to trivially calculate distances between all zip codes. This permits extremely fast lookups for geospatial calculations on the zip code level -- for example, in determining what cities are neighbors of a given city, how far it is (as the crow flies) between two different zip codes, and so on.