# Is there a statistical test to calculate difference/similarity between two sets of lat/lng data points?

I have two sets of data points where each data point is a latitude-longitude combination. The two sets represent two different time frames, let's say 2010-2014 and 2015-2018. The number of data points within the first time frame does not equal the number of data points in the second time frame. The data points are also independent, meaning that there exists no mapping from time frame 1 to time frame 2.

I would like to know if there exists a statistical test to compare the two sets of data points and see if the data points have shifted in geographical location, or stayed the same?

For instance, let's say the bulk of data points from 2010-2014 lies within the US, and within time frame 2015-2018 the majority of points is still in the US but also in Canada. Can we statistically say something about the shifting spatial characteristics of the two time frames.

I have tried figuring out a way to do this (PySAL for Python) but I seem to be lost.

• So, do you wish to assess the two datasets relative to some underlying geography (e.g., US/Canda), or do you wish to compare them directly with each other? These are very different goals.
– Tom
Jul 2, 2018 at 20:29
• I wish to compare them directly with each other. The geographical reference was just to illustrate the question I would like answer: have the data points (statistically?) moved/changed from time frame 1 to time frame 2. Jul 3, 2018 at 8:07
• You are generally referring to branch of spatial statistics called Point Pattern Analysis (PPA). There may be a Python package that I am not aware of but PySAL does not have the functionality that you are after. You want to not only test the significance of the difference between the point features but also if they are significant from a Complete Spatial Random (CSR) Poisson process, otherwise you cannot infer any spatial process in the observed time-periods. There is a huge body of literature on this topic. Jul 5, 2018 at 16:17