title: Clustering algorithm which accounts for spatio-temporal effects to cluster weather station locations?
body: <p>I have a dataset of ozone measurements collected over the course of 1 year (30 min resolution) at approximately 300 weather stations. I would like to cluster the measurement sites in order to calculate some summary statistics for regions. However, I would like to use an algorithm which accounts for spatio-temporal effects. Specifically, I want areas where ozone measurements are similar within a certain temporal distance to be considered similar and clustered together (rather than simply analyzing similarity within individual time steps).</p>
  <p>I have read about the ST-DBSCAN algorithm (<a href="https://www.sciencedirect.com/science/article/pii/S0169023X06000218" rel="nofollow noreferrer">https://www.sciencedirect.com/science/article/pii/S0169023X06000218</a>), which seems perfectly suited to the task. Figure 7 even appears to be the type of desired output I would like to achieve, and seems to be a similar problem.</p>
  <p><a href="https://i.stack.imgur.com/WbroK.png" rel="nofollow noreferrer">Birant et al., Fig 7</a></p>
  <p>I began using this algorithm, inputting my data (an integer timestep column, a x-coordinate column (scaled), a y-coordinate column (scaled), and an ozone measurement column (scaled). I am using eps1 = .4, eps2 = 3. However, when I started looking at the results, I realized that as far as I can tell, it has no clear way of assigning a single cluster label for the entire time period. Instead, the same location (recall, the locations do not change) can be assigned to different clusters at different periods in the analysis. Hence, this doesn't provide a useful output for me.</p>
  <p>For reference, I am using the following implementation of the algorithm:
  <a href="https://github.com/eren-ck/st_dbscan" rel="nofollow noreferrer">https://github.com/eren-ck/st_dbscan</a></p>
  <p>Does anyone have any recommended clustering algorithms for this type of problem? Again, the main requirements are:</p>
  <ol>
  <li>Accounts for spatio-temporal effects</li>
  <li>Somehow restricts locations that are static to always be in the same cluster (one overall clustering for the entire dataset)</li>
  <li>Due to the large amount of data, I will need to be careful of memory-intensive algorithms (though I am also willing to cluster on a subset of a few months of data as necessary, rather than the 1-year period).</li>
  </ol>