Skip to content

Commit

Permalink
Init Commit, data manipulation in prog
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaiau committed Mar 16, 2020
1 parent a09a1da commit fb62cd1
Show file tree
Hide file tree
Showing 7 changed files with 1,597 additions and 0 deletions.
451 changes: 451 additions & 0 deletions data/time_series_19-covid-Confirmed.csv

Large diffs are not rendered by default.

451 changes: 451 additions & 0 deletions data/time_series_19-covid-Deaths.csv

Large diffs are not rendered by default.

451 changes: 451 additions & 0 deletions data/time_series_19-covid-Recovered.csv

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
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"
}
26 changes: 26 additions & 0 deletions play.js
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)



});
4 changes: 4 additions & 0 deletions readme.md
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

0 comments on commit fb62cd1

Please sign in to comment.