How to Find Nearest City or Location in Stata Using GEONEAR Command

  Рет қаралды 2,315

The Data Hall

The Data Hall

Күн бұрын

Пікірлер: 13
@sknowlak4435
@sknowlak4435 3 жыл бұрын
how to get geoNear from one collecction to another collection??
@davitadunts7428
@davitadunts7428 3 жыл бұрын
Hi, thank you very much for your lecture. Geonear command provides wrong distance when I use coordinates from Google Maps. Do you have any idea why that happens? Thank you.
@thedatahall
@thedatahall 3 жыл бұрын
What do u mean by wrong distance? This command calculate distance by air and not by road. So the miles shown by the command and Google map will be different by small amount. If you are calculating large distances the probably it will not mattee
@davitadunts7428
@davitadunts7428 3 жыл бұрын
@@thedatahall I know that it calculates the distance by air. The problem is that it calculates the distance accurately when I use the coordinates provided in shape file, but fails to do so when I manually input the coordinates (I don't see any logical reasons why). I solved the issue by reducing the Earths radius to 4000km, with this parameter the distances are accurate to 200m.
@davitadunts7428
@davitadunts7428 3 жыл бұрын
@@thedatahall By any chance, do you know how to calculate the distance from multiple cities to a border line? Thank you?
@thedatahall
@thedatahall 3 жыл бұрын
I am afraid no
@horusleung123
@horusleung123 4 жыл бұрын
Hi, when I try to run this function, it states that “latitude (variable) or longitude (variable) not constant within (variable) group” May I know what is the problem here?
@thedatahall
@thedatahall 4 жыл бұрын
What is the exact command that you are running and can you upload screenshot of the data.
@horusleung123
@horusleung123 4 жыл бұрын
@@thedatahall So I have a bus stops data set and monitor station data set and I want to find the nearest monitor station for each stops. I am using the bus stops data set as master table and my command is as followed: geonear STOP_ID latitude longitude using station_latlon_1 8 (fix).dta , neighbors(station_n latitude longitude) Then it said "latitude or longitude not constant within STOP_ID group" I am not sure what happened. Btw I don't think I can upload a screenshot here
@thedatahall
@thedatahall 4 жыл бұрын
Thats interesting. Your command is correct, there might be some issue with dataset. If you can send me some sample dataset at info@thedatahall.com i will look into it.
@stefanospapalysandrou238
@stefanospapalysandrou238 Жыл бұрын
Hey! I have exactly the same problem.. Can you please provide some help? I am working on my thesis and this is the only part I am missing.
@thedatahall
@thedatahall Жыл бұрын
Hi, sure please email me the code and sample data at info@thedatahall.com and i shall look into it
Standardization and Normalization in Stata
8:58
The Data Hall
Рет қаралды 1 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Systematic and Unsystematic risk (idiosyncratic risk) in Stata
5:59
How to Perform Rolling Regression in R
18:28
The Data Hall
Рет қаралды 401
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 93 М.
Crossing US-Canada border without Passport & VISA..
15:27
Singh in USA
Рет қаралды 844 М.
OpenAI's o1 just hacked the system
26:31
AI Search
Рет қаралды 2 М.