Generate minimum sets of zip codes, based on a radius, that can be used in a series of searches to cover the entire USA
- downloads an up-to-date reference set of US postal codes from
a repository hosted on
github.com
pip install zip-code-radiusimport sys
from zip_code_radius import solver
radius = float(sys.argv[1])
results = solver.solve(radius)
print "radius: %d, zip-codes: %d" % (radius, len(results))pip install nose
nosetestsTo run tox:
pip install tox
tox setup.pyzip-code-radius stores the US postal code data at your os temp dir (e.g. /tmp/).