intake / intake-gsoc-gui

Panel GUI project for GSOC
3 stars 3 forks source link

Aggregations in the fields panel #21

Closed hdsingh closed 5 years ago

hdsingh commented 5 years ago

Implement feature in the fields panel to have aggregations like xr.mean().

martindurant commented 5 years ago

We will support the following options for dimensions which are not being used for plotting:

hdsingh commented 5 years ago

I have implemented these options:

on branch add_aggregate. Shall I wait for Pull Request #3 to merge before submitting this as PR?

I haven't been able to figure out what exactly to do with count (of non-nan), how to find and create graph for it. Can you please elaborate this? For the example dataset I tried

data.temp.count() - len(data.temp.isnull())

but I think this is not correct approach. Is count (of non-nan) supposed to be number which we can simply display?

martindurant commented 5 years ago

Count along dimension "time"

(~ data.temp.isnull()).sum(dim='time')
martindurant commented 5 years ago

The operator ~ is bit- or element-wise NOT in python.

hdsingh commented 5 years ago

Thanks!

hdsingh commented 5 years ago

Refer https://github.com/intake/xrviz/pull/4

hdsingh commented 5 years ago

The user can aggregate along remaining dimensions (not selected in x and y). The option to create a Select widget or Animate is also present in case the user does not wish to apply any aggregation on the dimension.

Screenshot from 2019-06-22 13-12-07