I have a problem with pdist function in python. I have coordinates of points that I want to find the distance between them but it does not consider them as coordinates and find distance between two points rather than coordinate (it consider coordinates as decimal numbers rather than coordinates). I could not find anything so far of how to fix this problem. Any help is appreciated. In other words, should I do any transformation on my coordinates? Here is a sample code:
p1=[39.1653, -86.5264]
p2=[39.704166670000049, -86.399444439999826]
X=[p1[0],p2[0]]
Y=[p1[1],p2[1]]
spdist.pdist(zip(X,Y), 'euclidean')
The result it gives me is 0.55361991 miles but when I put the coordinates in google map, it give me 42 miles.
Thanks