I have rainfall data (corresponding to latitude, longitude, and amount of rainfall at that latitude and longitude.) I plotted this data using a 2D matrix, with matrix(i,j)
corresponding to the i
'th and j
'th (sorted) latitudes and longitudes in my dataset. I want to find out the direction of maximum variance of my rainfall data. How do I do this? Here's an illustrative example:
Suppose my matrix is as follows: (mapped onto a world grid i.e. the smaller latitudes are at the bottom and the smaller longitudes and towards the left of the matrix)
1 2 3 4
2 3 3 4
3 2 5 4
4 2 3 7
Row i
and column j
correspond to a grid of longitudes and latitudes defined by, say, 34, 35, 37, 43
and -43, -24, 0, 12
respectively (i.e. the bottom-most and left-most point corresponds to the longitude and latitude 34,-43
) while the actual value in the matrix corresponds to the amount of rainfall at that position. In this toy example, the direction of highest variance is obviously along the top-left-to-bottom-right diagonal. Therefore, I essentially have a three dimensional dataset where each element is [longitude, latitude, rainfall]. How would I find out the direction of maximum variance for the actual rainfall values themselves? I tried using PCA but that takes into account the variation in the latitudes and longitudes themselves.
As a side question, would this question become easier if the latitudes and longitudes are regularly separated? I think it's a different problem altogether but would like to hear others' perspective on this.