summaryrefslogtreecommitdiff
path: root/client/data.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/data.js')
-rw-r--r--client/data.js5
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
}, {})
})