DataSet.cor_time(var1=None, var2=None)

cor_time: Calculate the correlation correct in time between two variables

The correlation is calculated for each grid cell, 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 temporal correlation coefficient between variables x and y in a dataset, you would do this:

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

The correlation coefficient will be calculated for each grid cell. This method will indicate how temporally correlated variables are in different spatial regions.