I'm currently working on a JavaScript project to create a table displaying the latest number of coronavirus cases. I've reached a point where I want to add a column showing how many days it took for the confirmedCases numbers to double. Here's an example:
{
"message": "Success",
"source": "JHU CSSE",
"sourceURL": "https://github.com/CSSEGISandData/2019-nCoV",
"updateDate": "2020-03-22T11:08:41.651Z",
"data": {
"3/15/20": {
"Afghanistan": 16,
"Albania": 42,
......
// Truncated data for brevity
"US": 3499,
"Uganda": 0,
"Ukraine": 3,
"United Arab Emirates": 98,
"United Kingdom": 1145,
"Uruguay": 4,
"Uzbekistan": 1,
"Venezuela": 10,
"Vietnam": 56,
"Zambia": 0,
"Zimbabwe": 0
},
......
// More data entries for each day
}
}
Wouldn't it be interesting if we could obtain an object that shows the number of days it took for the cases in each country to double? That might provide valuable insights into the spread of the virus worldwide.