DataSet.cor_space(self, var1=None, var2=None)#

cor_space: Calculate the correlation correct between two variables in space.

This is calculated for each time step. The correlation coefficient coefficient is calculated using values in all grid cells, ignoring missing values.

This calculates the Pearson correlation coefficient.

  • var1 (str) – The first variable

  • var2 (str) – The second variable


If you wanted to calculate the spatial correlation coefficient between variables x and y in a dataset, you would do this:

>>> ds.cor_space("x", "y")

The correlation coefficient will be calculated for each time step.