LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 10 Dec 1999 07:31:55 -0800
Reply-To:     dward <dwardNOdwSPAM@SASHELP.COM.INVALID>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         dward <dwardNOdwSPAM@SASHELP.COM.INVALID>
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject:      Re: Help: distance between zip codes

I had to solve a problem concerning this same issue a little while back. I had the zip codes for a population of about 700,000 doctors and needed to define communities of doctors within x miles from various hospitals. Two things are needed: 1) The longitude and latitude of the zip codes. We got this using proprietary software built by our own company. I don't know exactly how you could get this, but you'll need the lat/long of the "zipcode centroid" 2) Use the following code to compute the distance from two lat/long pairs: http://www.sashelp.com/CodeLibrary/getcode.asp?codeID=3 This shows how to use the haversine formula to get the distance in miles from two points.

HTH, David Ward

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!


Back to: Top of message | Previous page | Main SAS-L page