views:

726

answers:

2

I'm working on a shopping cart that needs to calculate tax rates based on the ship-to county. I don't want to ask the customer for the county but instead I'd like to look up the county by using the address they provided.

And to top it off, this should be free.

So, does a [free] service like this exist? I couldn't find anything via UPS or USPS for looking up a county and the Google Maps API doesn't return the county from an address - only the state and country codes.

MelissaData.com offers this (and tons more) for a price. Anyone know where MelissaData gets its data?

Note: I first assumed that I could just look up a county by the zip code; but I found that this won't work because one zip code can span multiple counties (as demonstrated by MelissaData).

A: 

Couldn't find one for you. Not sure whether there is any API. The best I can think of is making a guess using ip and check with the user(?).

Shoban
+2  A: 

Having done this myself, my experience has been that with geographic data, you get what you pay for -- either in dollars or effort.

The USPS and US Census both collect geographic-like data in their respective datasets, but often have holes in their datasets and aren't entirely current. (The USPS once told me they didn't have all the info about their own zip codes. Seriously.)

Most of the smaller commercial datasets on the market are simply collaborations of multiple geographic datasets. MelissaData, as far as I know, actually put forth some research into verifying data in the rural areas, which is where most of the data is lacking.

The free datasets out there are either incomplete or woefully out-of-date (yes, the data does change).

The query-based services that might have your data, i.e. Google Maps, will often pull just enough data out of the application to keep you from using them as a data-source.

This is cost/benefit analysis: do you pay for the data that's all served up with address-->county data, or do you cobble your own together from data sets you find on your own?

One recommendation: consider a for-pay service. The free sources/services were more trouble than solution for me.

jro
Thanks for your experienced answer. Do you have any recommendations of pay-for services/datasets?
David Murdoch
Just letting everyone know that the MelissaData dataset their sales person suggested cost nearly $4,000 per year for their least expensive "programmable" option (the other, less expensive solutions, are GUI based).
David Murdoch
David, I found the answer depends on your lookup basis. If you have a street address and need the corresponding county, the guys at zipinfo.com make a decent product for the price. They map addresses to county FIPS codes and include the names for you as well.
jro