Subject: | |
From: | |
Reply To: | |
Date: | Fri, 20 Mar 2009 17:16:23 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Zip+4 should clarify it but I don't think you can get that DB without
spending a little money. The post office has it available for
purchase. $25 or something like that.
On Mar 20, 2009, at 5:03 PM, Stockly, Ed wrote:
>>>> set aZip to aZip div 100
>
> I was all set to use that until I saw a few dozen zips in the data
> with
> letters:
>
> 027HH MA
> 028HH RI
> 030HH NH
> 040HH ME
>
> So I'll do something like this:
>
> set aZip to "027HH"
> try
> set myZip to aZip div 10
> on error
> set myZip to ((characters 1 thru 3 of aZip) as text) as integer
> end try
>
>
>> There are 42 five-digit ZIP codes that cross state lines. The
>> code should
> probably flag those somehow.
>
> Wouldn't you know it, in the first set of live data they're using,
> one of
> those zip codes appears. I'm still hoping I can make this work
> efficiently
> with pure applescript.
>
>>> In those 42 cases, surely the Post Office itself doesn't straddle
>>> a state
> boundary. Why not use the state in which the Post Office building
> sits? For
> example, 99362's building is in Walla Walla, Washington, though it
> serves some
> rural areas in Oregon. One could additionally flag it as a dual-
> state zip code,
> if desired.
>
> These are for real estate listings, so they'll want to make sure
> they have
> the state the property is located in, and that's particularly
> important in
> border areas, where it seems that most of these shared zips appear.
>
> ES
>
>
|
|
|