Skip to content

Commit

Permalink
WIP WTF
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaiau committed Apr 6, 2020
1 parent 99cd1e4 commit c7af1e4
Show file tree
Hide file tree
Showing 8 changed files with 37,905 additions and 64,738 deletions.
5,080 changes: 5 additions & 5,075 deletions client/data/countries.json

Large diffs are not rendered by default.

46,362 changes: 19,318 additions & 27,044 deletions client/data/cumulative.json

Large diffs are not rendered by default.

21,232 changes: 0 additions & 21,232 deletions client/data/united-states-cum.json

This file was deleted.

11,364 changes: 0 additions & 11,364 deletions client/data/united-states.json

This file was deleted.

18,541 changes: 18,541 additions & 0 deletions client/package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@
"dependencies": {
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@fortawesome/fontawesome-svg-core": "^1.2.27",
"@fortawesome/free-brands-svg-icons": "^5.12.1",
"@fortawesome/free-solid-svg-icons": "^5.12.1",
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-brands-svg-icons": "^5.13.0",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/react-fontawesome": "^0.1.9",
"@material-ui/core": "^4.9.7",
"@material-ui/core": "^4.9.9",
"@material-ui/icons": "^4.9.1",
"bulma": "^0.8.0",
"date-fns": "^2.11.0",
"gatsby": "^2.19.7",
"gatsby-image": "^2.2.39",
"gatsby-plugin-emotion": "^4.2.0",
"gatsby-plugin-google-analytics": "^2.1.38",
"gatsby-plugin-manifest": "^2.2.39",
"gatsby-plugin-offline": "^3.0.32",
"bulma": "^0.8.1",
"date-fns": "^2.11.1",
"gatsby": "^2.20.12",
"gatsby-image": "^2.3.1",
"gatsby-plugin-emotion": "^4.2.1",
"gatsby-plugin-google-analytics": "^2.2.2",
"gatsby-plugin-manifest": "^2.3.3",
"gatsby-plugin-offline": "^3.1.2",
"gatsby-plugin-purgecss": "^4.0.1",
"gatsby-plugin-react-helmet": "^3.1.21",
"gatsby-plugin-sharp": "^2.4.3",
"gatsby-source-filesystem": "^2.1.46",
"gatsby-transformer-json": "^2.2.27",
"gatsby-transformer-sharp": "^2.3.13",
"gatsby-plugin-react-helmet": "^3.2.1",
"gatsby-plugin-sharp": "^2.5.4",
"gatsby-source-filesystem": "^2.2.2",
"gatsby-transformer-json": "^2.3.1",
"gatsby-transformer-sharp": "^2.4.4",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-helmet": "^5.2.1",
"recharts": "^1.8.5"
},
Expand Down
25 changes: 22 additions & 3 deletions processing/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const createFiles = (output_folder) => {

country_array.push(us_data.total_only)
country_array.push(nz_data)
cumulative = getCumulatives(country_array)



const advanced_countries = [
Expand Down Expand Up @@ -158,10 +158,29 @@ const createFiles = (output_folder) => {
}
]

// Creates a file

country_array= country_array.filter(c => c.population > 1000000)

country_array.forEach(c=>{
if(c.name == 'Timor-Leste') c.name = 'East Timor'
if(c.name == 'Guinea-Bissau') c.name = 'Guinea Bissau'
if(c.name == 'Taiwan*') c.name = 'Taiwan'
if(c.name == "Cote d'Ivoire") c.name ="Ivory Coast"
if(c.name == "Congo (Brazzaville)") c.name = "Congo Brazzaville"
if(c.name == "Congo (Kinshasa)") c.name = "Congo Kinshasa"

if(! c.name.match(/^[_a-zA-Z]/g)) console.log(c.name)

if(!c.highest_confirmed) console.log("no highest", c.name)

if(!c.population) console.log("no pop", c.population)
})

// Creates a file
NZAdvanced.get(output_folder)


cumulative = getCumulatives(country_array)

fs.writeFile(output_folder + '/countries.json', JSON.stringify(country_array , null, 2), function(err) {
if(err) return console.log(err);
console.log("Country file was saved!");
Expand Down
1 change: 0 additions & 1 deletion processing/output-test.json

This file was deleted.

0 comments on commit c7af1e4

Please sign in to comment.