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 /client/data.js | |
| parent | 81adbc30b2dbf9a24917694e22042762a930e00d (diff) | |
group and midi stuff
Diffstat (limited to 'client/data.js')
| -rw-r--r-- | client/data.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/data.js b/client/data.js index 733d3bf..1ddd664 100644 --- a/client/data.js +++ b/client/data.js @@ -1,6 +1,7 @@ const files = [ // "gun_violence", "mass_shootings", + "gun_violence_by_month", ] const parse = require('csv-parse') @@ -9,7 +10,7 @@ const dataPromises = files.map(name => { return rows.text() }).then(text => { return new Promise((resolve, reject) => { - parse(text, {}, (err, lines) => resolve(lines)) + parse(text, {}, (_, lines) => resolve(lines)) }) }).then(lines => { console.log(name, lines) @@ -24,7 +25,7 @@ const dataPromises = files.map(name => { const allPromises = Promise.all(dataPromises).then(data => { return data.reduce((a,b) => { console.log(b) - a[b.name.replace(/-/g, '_')] = b + a[b.name] = b return a }, {}) }) |
