diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-10-08 01:05:13 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-10-08 01:05:13 +0200 |
| commit | 9e824cc6d358fc902b27e00e5a1e8f88e3610823 (patch) | |
| tree | b2aa1f0e514ddcc9a6843ba42481b75ae7127329 /bin | |
| parent | 81adbc30b2dbf9a24917694e22042762a930e00d (diff) | |
group and midi stuff
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/group.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/bin/group.js b/bin/group.js index e2e1681..d0d93ce 100644 --- a/bin/group.js +++ b/bin/group.js @@ -99,9 +99,9 @@ const filter_names = [ ] const filters = [ (row, participants) => row[fields.participant_age_group].indexOf('Child') !== -1, - (row, participants) => participants[1].reduce((a, s) => ( (s && s.indexOf('Child')) !== -1 ? a + 1 : a ), 0), + (row, participants) => participants[1].reduce((a, s) => { (s && s.indexOf('Child')) !== -1 ? a + 1 : a }, 0), (row, participants) => row[fields.participant_age_group].indexOf('Teen') !== -1, - (row, participants) => participants[1].reduce((a, s) => ( (s && s.indexOf('Teen')) !== -1 ? a + 1 : a ), 0), + (row, participants) => participants[1].reduce((a, s) => { (s && s.indexOf('Teen')) !== -1 ? a + 1 : a }, 0), (row, participants) => row[fields.gun_type].indexOf('AR-15') !== -1, (row, participants) => row[fields.incident_characteristics].indexOf('Shootout') !== -1, (row, participants) => row[fields.incident_characteristics].indexOf('Samaritan') !== -1, @@ -170,17 +170,6 @@ function groupParticipants(row){ function groupByMonth(row){ return row[fields.date].substr(0, 7) } -function transpose(a) { - let i_len = a.length, j_len = a[0].length - let T = new Array(i_len) - for (let i = 0; i < i_len; i++) { - T[i] = new Array(j_len) - for (var j = 0; j < j_len; j++) { - T[i][j] = a[j][i] - } - } - return T -} function zeroes(n) { const a = new Array (n) for (var k = 0; k < n; k++) { |
