Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Calculate Distance between Properties within Portfolios
From
"S. McKay Price" <[email protected]>
To
[email protected]
Subject
st: Calculate Distance between Properties within Portfolios
Date
Tue, 10 Sep 2013 18:28:25 -0400
Hello,
I'm trying to calculate the distance, in miles or kilometers, between
all possible pairwise combinations of properties within a given
portfolio. Is there an efficient way to structure the data to
accomplish this?
My data include numerous portfolios (roughly 200), each with a unique
portfolio identifier (portfolio_id). And, there are multiple properties
within each portfolio (180 on average), where each property has a unique
property identifier (property_id). I have latitude and longitude
coordinates in decimal form for each property (e.g. 42.270873
-83.726329) for use in a command such as -geodist- from SSC, or
something similar. The data are organized as follows:
portfolio_id property_id latitude longitude
1 1 lat lon
1 2 lat lon
1 3 lat lon
...
2 1 lat lon
2 2 lat lon
2 3 lat lon
etc...
Any suggestions? Thank you for your consideration.
McKay
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/