Quantipy / quantipy

Python for people data
MIT License
66 stars 14 forks source link

I1113 sorting on nets #1122

Closed nitsrek closed 6 years ago

nitsrek commented 6 years ago

1113

Please merge #1121 first

nitsrek commented 6 years ago

1121 is merged, but please review anyway @alextanski

"rewrite" of Rules module (affecting 90% sorting + get proper rules-slicer even for inconsistent link_weight):

sorting "normal" columns:

sort_on always '@'
fix any categories
sort_by_weight default is unweighted (None), but each weight (included in data) can be used

sorting "expanded net" columns:

sort_on always '@'
fix any categories
sorting within or between net groups is available
sort_by_weight: as default the weight of the first found expanded-net-view is taken. Only weights of aggregated net-views are possible

sorting "array summaries":

sort_on can be any desc ('median', 'stddev', 'sem', 'max', 'min', 'mean', 'upper_q', 'lower_q') or nets ('net_1', 'net_2', .... enumerated by the net_def)
sort_by_weight: as default the weight of the first found desc/net-view is taken. Only weights of aggregated desc/net-views are possible
sort_on can also be any category, here each weight can be used to sort_on