In NY, for example, there are 3 things to consider. The state tax is 4%, then each county can add up to another 2% and finally each city or village can add an additional 2%.
With that in mind, zip codes won't work as many cities and towns and villages have multiple zip codes. For instance, I live just out side the village of Walton, the store near me the tax is 6%, but if I cross the village line to buy something, the tax is 8%.
It's very, very complicated.