johnaschroeder / zip-code-radius

Generate minimum sets of zip codes that can be used in a series of searches to cover the entire USA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zip-code-radius

Generate minimum sets of zip codes, based on a radius, that can be used in a series of searches to cover the entire USA

Features

  • downloads an up-to-date reference set of US postal codes from a repository hosted on github.com

Installation

pip install zip-code-radius

Usage

import 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))

Tests

Unit Tests

pip install nose

nosetests

To run tox:

Tox

pip install tox

tox setup.py

Notes

zip-code-radius stores the US postal code data at your os temp dir (e.g. /tmp/).

About

Generate minimum sets of zip codes that can be used in a series of searches to cover the entire USA

License:Apache License 2.0


Languages

Language:Python 100.0%