-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[describe-] collect aggr funcs that operate on list of values in Orde…
…redDict aggregator() converts a func, which operates on a list, into a _func, which operates on a srccol and a list of rows. The original functions were then added into Globals, but this caused problems for a function like `sum()` which appears naturally in Python code. I created an OrderedDict, and named it aggregators_vals as a place to store them. Other possible options: * We could include the optional funcvals along with func(srccol) for Aggregator. Describe Sheet could then grab the funcvals if it exists. * Describe Sheet could pass the srccol and list of rows, instead of vals. This is not ideal because it means for each aggregator, we call getValues once-more. This would cause a performance degradation. * Add them to vd.aggregators, possibly with the suffix "_vals", and create an Aggregator out of them as well. Have Describe Sheet pull aggrname_vals. * Similarly use the vd.aggregator_vals, but have a less terrible name. Optional: Do we want to do the work of porting quantiles and percentiles to be useable by Describe Sheet? Currently, an aggregator that does not go through aggregator() is not useable by Describe Sheet.
- Loading branch information
1 parent
9ec71f3
commit fe29f0e
Showing
4 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Units count Units_sum | ||
2 1 2 | ||
3 1 3 | ||
4 1 4 | ||
5 1 5 | ||
7 2 14 | ||
11 1 11 | ||
14 1 14 | ||
15 1 15 | ||
16 1 16 | ||
27 1 27 | ||
28 2 56 | ||
29 1 29 | ||
32 1 32 | ||
35 1 35 | ||
36 1 36 | ||
42 1 42 | ||
46 1 46 | ||
50 2 100 | ||
53 1 53 | ||
55 1 55 | ||
56 1 56 | ||
57 1 57 | ||
60 2 120 | ||
62 1 62 | ||
64 1 64 | ||
66 1 66 | ||
67 1 67 | ||
74 1 74 | ||
75 1 75 | ||
76 1 76 | ||
80 1 80 | ||
81 1 81 | ||
87 1 87 | ||
90 2 180 | ||
94 1 94 | ||
95 1 95 | ||
96 2 192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sheet col row longname input keystrokes comment | ||
open-file sample_data/sample.tsv o | ||
sample Units type-int # set type of current column to int | ||
sample Units aggregate-col sum + Add aggregator to current column | ||
sample Units freq-col Shift+F open Frequency Table grouped on current column, with aggregations of other columns | ||
sample_Units_freq Units sort-asc [ sort ascending by current column; replace any existing sort criteria |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters