-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init Commit, data manipulation in prog
- Loading branch information
Showing
7 changed files
with
1,597 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
{ | ||
"name": "ftc", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "play.js", | ||
"dependencies": { | ||
"csv-parser": "^2.3.2", | ||
"lodash": "^4.17.15" | ||
}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
} |
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,26 @@ | ||
const csv = require('csv-parser') | ||
const fs = require('fs') | ||
const results = []; | ||
const _ = require('lodash') | ||
|
||
fs.createReadStream('data/time_series_19-covid-Confirmed.csv') | ||
.pipe(csv()) | ||
.on('data', (data) => { | ||
results.push(data) | ||
}) | ||
.on('end', () => { | ||
|
||
let american_results = [] | ||
|
||
|
||
american_results = results.filter( (result) => result['Country/Region'] == 'US' ) | ||
chinese_results = results.filter( (result) => result['Country/Region'] == 'China' ) | ||
australian_results = results.filter( (result) => result['Country/Region'] == 'Australia' ) | ||
|
||
console.log("american results", american_results.length) | ||
console.log("chinese results", chinese_results.length) | ||
console.log("australian results", australian_results.length) | ||
|
||
|
||
|
||
}); |
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,4 @@ | ||
# WIP: Flatten the curve | ||
Open Source data visualiser related to COVID-19 that aims to provide some reasoning for social distancing without relying on graphs, data or math. | ||
|
||
Data from John Hopkins |