Created
May 24, 2020 10:33
-
-
Save umran/00342d1c75edde12d73e1dad6a371f6b to your computer and use it in GitHub Desktop.
compute confirmed daily case counts for a given date from https://covid19.health.gov.mv/dashboard
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
const confirmedDailyCaseCount = date => { | |
const data = document.getElementsByClassName("covid_table_row_item case_confirmed") | |
let count = 0 | |
for (var i=0; i<data.length; i++) { | |
if (data.item(i).childNodes[0].nodeValue === date) { | |
count++ | |
} | |
} | |
return count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment