All,
I'm trying to find something that'll give me the distance (preferably miles, but anything is fine and I can convert to miles after-the-fact) between two zip codes. I've got a filed that looks like this, basically
Column 1: Observation zip code; unique to each observation
Column 2: A constant zip code; same value for all observations in the file.
What I'd *like* is a command that gives me Column 3: Distance between the ZIP codes referenced in Column 1 and Column 2.
Did a bit of searching and came up with the vincenty command, but that looks like it runs off of lat/lon coordinates. Which I suppose is fine; I can just translate my ZIP codes into lat/long coordinates based off a separate file and THEN run vincenty.
But if someone could help me with the code that'd actually do the calculation of column 3, I'd very much appreciate it. It's been years since I've had to do much more than out-of-the-box stuff in STATA and I'm rustier than I care to admit.
Thanks.
I'm trying to find something that'll give me the distance (preferably miles, but anything is fine and I can convert to miles after-the-fact) between two zip codes. I've got a filed that looks like this, basically
Column 1: Observation zip code; unique to each observation
Column 2: A constant zip code; same value for all observations in the file.
What I'd *like* is a command that gives me Column 3: Distance between the ZIP codes referenced in Column 1 and Column 2.
Did a bit of searching and came up with the vincenty command, but that looks like it runs off of lat/lon coordinates. Which I suppose is fine; I can just translate my ZIP codes into lat/long coordinates based off a separate file and THEN run vincenty.
But if someone could help me with the code that'd actually do the calculation of column 3, I'd very much appreciate it. It's been years since I've had to do much more than out-of-the-box stuff in STATA and I'm rustier than I care to admit.
Thanks.
Comment