From 9e824cc6d358fc902b27e00e5a1e8f88e3610823 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 8 Oct 2018 01:05:13 +0200 Subject: group and midi stuff --- client/data.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/data.js') 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 }, {}) }) -- cgit v1.2.3-70-g09d2