Hi,
I've got a DataArray with three dimensions: x, y and time. I'd like to do a linear regression for the value at each (x, y) location over time - so I get a slope and intercept value for each 'pixel' of my data. To make things more interesting, each (x, y) location has missing data at some time periods.
What's the best way to do this using a DataArray? Would it just involve just grabbing the values and the time index from the DataArray and then looping over these? Is there a better way?
I imagine I can't be the first person who has tried to do this in xarray - any advice would be much appreciated,
Cheers,
Robin