## Contents:¶

</b> MORTALITY     PLOTLY

import sqlite3 from datetime import datetime from time import gmtime, strftime import glob import time import os import requests if not os.path.exists('DATA'): os.makedirs('DATA') print (time.strftime('%a_%d_%b_%Y_%I_%M_%S_%p_%Z', time.gmtime())+".html") filename = "DATA/"+(time.strftime('%a_%d_%b_%Y_%I_%M_%S_%p_%Z', time.gmtime())+".html") DataIn = open(filename,"w") listTEXT = [] stringTEXT = "" response = requests.get('https://www.worldometers.info/coronavirus/usa-coronavirus/') DATA = str(response.content) listTEXT.append(DATA) stringTEXT = stringTEXT+DATA DataIn.write(str(listTEXT)) DataIn.close() print(filename) files = glob.glob('DATA/*.html') # * means format then *.html File = max(files, key=os.path.getctime) print ("Opening: ",File) DataOut = open(File, "r").read() dataout = DataOut dataout = str(dataout) dataout = dataout.replace("March","\n\n\nXXXXXXXXMarch") dataout = dataout.replace("","") dataout = dataout.replace("","") dataout = dataout.replace(">","") dataout= dataout.split("XXXXXXXX") data = (dataout[1][0:129]) time = datetime.now().strftime("%B %d, %Y %I:%M%p") conn2=sqlite3.connect("DATA/CoronaData2.db") c2 = conn2.cursor() c2.execute("CREATE TABLE IF NOT EXISTS CORONA( TEXT UNIQUE)") c2.execute("INSERT OR IGNORE into CORONA values (?)",(data,)) conn2.commit() conn2.close() conn=sqlite3.connect("DATA/CoronaData.db") c = conn.cursor() sql = '''create table if not exists CORONA( Filename, text Time text, data TEXT);''' conn.execute(sql) c.execute("insert into CORONA values (?,?,?)",(File,time,data)) conn.commit() conn.close() conn=sqlite3.connect("DATA/CoronaData.db") c= conn.cursor() for row in c.execute('SELECT rowid,* from CORONA'): print (row[0],row[1],row[2],row[3]) conn.close()
In [549]:
!date +%c

Sun 29 Mar 2020 10:56:54 AM PST

In [550]:
%%writefile M2D.py
"""
Month2Num(month)
span(timestamp1, timestamp2): This will show the span in hours between two timestamps.

"""
from __future__ import division
def Month2Num(month):
number=""
months=["January","February","March","April","May","June","July",\
"August","September","October","November","December"]
Numbers=["01","02","03","04","05","06","07","08","09","10","11","12"]
if month==months[0]:number=Numbers[0]
if month==months[1]:number=Numbers[1]
if month==months[2]:number=Numbers[2]
if month==months[3]:number=Numbers[3]
if month==months[4]:number=Numbers[4]
if month==months[5]:number=Numbers[5]
if month==months[6]:number=Numbers[6]
if month==months[7]:number=Numbers[7]
if month==months[8]:number=Numbers[8]
if month==months[9]:number=Numbers[9]
if month==months[10]:number=Numbers[10]
if month==months[11]:number=Numbers[11]
return number

def span(timestamp1, timestamp2):
SPAN = timestamp2-timestamp1
res =SPAN/3600
result = round(res,2)
return result

Overwriting M2D.py

In [551]:
from M2D import *
month = "June"
Month2Num(month)

Out[551]:
'06'
In [552]:
!date

Sun Mar 29 10:56:55 PST 2020

In [ ]:


!ls -ant DATA/*.db!ls -ant DATA/*.db!cp DATA/20200329085847CoronaData2.db DATA/CoronaData2.db
In [553]:
import time
import shutil
DATE = time.strftime("%Y%m%d%H%M%S")
try:
shutil.move("DATA/CleanCorona.db", "DATA/"+DATE+"CleanCorona.db")
except:
pass

In [554]:
import datetime
import calendar
import time
from M2D import *
import sqlite3
DDATA= []
arrangedDdata = ''
Ddata=arrangedDdata+"date,time,cases,deaths\n"
c= conn.cursor()
cnt=0
cnt2=0
for row in c.execute('SELECT * from CORONA'):
cnt2=cnt2+1
print(cnt2)
for row in c.execute('SELECT * from CORONA'):
if len(row[0])>5:
if cnt==0:print(row)
cnt=cnt+1
MISC=row[0]
MISC=MISC.replace(",","")
Str = MISC.split(" ")
month = Str[0]
#OUT = Month2Num(month)+"/"+Str[1]+"/"+Str[2]+","+Str[4]
OUT = Month2Num(month)+"/"+Str[1]+"/"+Str[2]+","+Str[4]+","+Str[9]+","+Str[13]
if cnt==cnt2-1:print (OUT)
Ddata=Ddata+OUT+"\n"
DDATA.append(Ddata)
conn.close()
print("-------------------------------")

164
('March 08, 2020 at 23:30 GMT, there have been 537 confirmed cases and 21 deaths due to coronavirus COVID-19 in the United States',)
03/28/2020,23:43,123311,2211
-------------------------------

In [555]:
import datetime
import calendar
import time
from M2D import *
import sqlite3
c= conn.cursor()
cnt=0
for row in c.execute('SELECT ROWID,* from CORONA'):
cnt=cnt+1
if cnt >150 and cnt<160:
print (cnt,row[0],": ",row[1])

conn.close()

#2329

151 151 :  March 27, 2020 at 23:33 GMT, there have been 102325 confirmed cases and 1591 deaths due to coronavirus COVID-19 in the United States
152 152 :  March 28, 2020 at 01:32 GMT, there have been 104126 confirmed cases and 1692 deaths due to coronavirus COVID-19 in the United States
153 153 :  March 28, 2020 at 03:34 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
154 154 :  March 28, 2020 at 05:35 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
155 155 :  March 28, 2020 at 07:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
156 156 :  March 28, 2020 at 09:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
157 157 :  March 28, 2020 at 11:40 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
158 158 :  March 28, 2020 at 13:36 GMT, there have been 104277 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United Sta
159 159 :  March 28, 2020 at 15:45 GMT, there have been 105726 confirmed cases and 1730 deaths due to coronavirus COVID-19 in the United Sta

In [556]:
!date -u +%c

Sun 29 Mar 2020 02:56:56 AM UTC

import sqlite3 conn=sqlite3.connect("DATA/CoronaData2.db") c= conn.cursor() enter = "March 28, 2020 at 11:40 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States" ID = c.execute("UPDATE CORONA SET data = ? WHERE ROWID = ?", (enter, ID,)) conn.commit() conn.close()

import sqlite3 conn=sqlite3.connect("DATA/CoronaData2.db") c= conn.cursor() enter = "March 14, 2020 at 07:14 GMT, there have been 2319 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States" ID = c.execute("UPDATE CORONA SET data = ? WHERE ROWID = ?", (enter, ID,)) conn.commit() conn.close()

In [557]:
print(DDATA[5])
print("-------------------------------")
#print(DDATA[1:])

date,time,cases,deaths
03/08/2020,23:30,537,21
03/09/2020,04:30,589,22
03/10/2020,05:30,708,27
03/10/2020,23:35,975,30
03/11/2020,04:25,1010,31
03/11/2020,15:17,1016,31

-------------------------------

In [558]:
DLINES = DDATA
for line in DDATA:
cnt=cnt+1
print(cnt,line)

328 date,time,cases,deaths
03/08/2020,23:30,537,21
03/09/2020,04:30,589,22
03/10/2020,05:30,708,27
03/10/2020,23:35,975,30
03/11/2020,04:25,1010,31
03/11/2020,15:17,1016,31
03/11/2020,23:35,1301,38
03/12/2020,03:25,1327,38
03/12/2020,11:37,1336,38
03/12/2020,22:00,1639,40
03/13/2020,00:05,1715,41
03/13/2020,01:35,1725,41
03/13/2020,03:45,1747,41
03/13/2020,06:00,1762,41
03/13/2020,15:25,1832,41
03/13/2020,22:25,2269,48
03/14/2020,02:40,2291,50
03/14/2020,07:14,2319,50
03/14/2020,16:45,2499,51
03/14/2020,23:03,2836,57
03/15/2020,05:00,2982,60
03/15/2020,05:40,2995,60
03/15/2020,07:05,3043,60
03/15/2020,19:00,3329,63
03/15/2020,20:05,3400,63
03/15/2020,21:15,3621,63
03/15/2020,22:15,3502,63
03/16/2020,00:35,3714,68
03/16/2020,02:48,3777,69
03/16/2020,05:36,3782,69
03/16/2020,08:29,3802,69
03/16/2020,18:40,4186,73
03/16/2020,22:40,4597,86
03/17/2020,00:45,4667,87
03/17/2020,02:40,4704,91
03/17/2020,06:35,4727,93
03/17/2020,10:31,4743,93
03/17/2020,14:38,4752,93
03/17/2020,18:41,5723,97
03/17/2020,21:55,6211,102
03/17/2020,22:40,6349,106
03/18/2020,02:20,6499,112
03/18/2020,06:05,6522,116
03/18/2020,10:10,6524,116
03/18/2020,16:15,7601,116
03/18/2020,18:16,7708,120
03/18/2020,20:21,8710,132
03/18/2020,22:10,8998,150
03/19/2020,02:17,9371,153
03/19/2020,10:16,9464,155
03/19/2020,12:18,9473,155
03/19/2020,14:15,9486,157
03/19/2020,16:22,10692,160
03/19/2020,18:17,11355,171
03/19/2020,22:45,13737,201
03/20/2020,00:48,13865,211
03/20/2020,02:40,14316,218
03/20/2020,04:34,14336,218
03/20/2020,06:35,14366,217
03/20/2020,08:10,14366,217
03/20/2020,10:11,14366,217
03/20/2020,12:11,14366,217
03/20/2020,14:10,14373,218
03/20/2020,16:11,16067,219
03/20/2020,18:12,16545,225
03/20/2020,20:12,18121,233
03/20/2020,22:12,18876,237
03/21/2020,00:06,19393,256
03/21/2020,02:07,19643,263
03/21/2020,04:08,19652,264
03/21/2020,06:05,19774,275
03/21/2020,08:10,19774,275
03/21/2020,10:12,19774,275
03/21/2020,12:46,19775,276
03/21/2020,14:48,19823,276
03/21/2020,16:48,22085,282
03/21/2020,18:45,22813,288
03/21/2020,20:45,24142,288
03/21/2020,22:45,23940,301
03/22/2020,00:40,26111,324
03/22/2020,02:40,26711,341
03/22/2020,04:45,26867,348
03/22/2020,06:30,26892,348
03/22/2020,08:45,26892,348
03/22/2020,10:45,26900,348
03/22/2020,12:48,26905,348
03/22/2020,14:45,27031,349
03/22/2020,16:42,30239,388
03/22/2020,18:48,38757,400
03/22/2020,20:44,32356,414
03/22/2020,21:41,32356,414
03/23/2020,00:44,33346,414
03/23/2020,02:37,33546,419
03/23/2020,03:55,34717,452
03/23/2020,06:45,35060,457
03/23/2020,08:47,35070,458
03/23/2020,10:47,35070,458
03/23/2020,12:46,35075,458
03/23/2020,14:45,35179,459
03/23/2020,16:45,40773,479
03/23/2020,18:46,41569,504
03/23/2020,20:47,42443,517
03/23/2020,22:31,43449,545
03/24/2020,00:47,43718,552
03/24/2020,02:33,43734,553
03/24/2020,04:46,46145,582
03/24/2020,06:43,46145,582
03/24/2020,08:48,46145,582
03/24/2020,10:47,46168,582
03/24/2020,12:47,46168,582
03/24/2020,14:47,46274,588
03/24/2020,16:47,49594,622
03/24/2020,18:45,50982,655
03/24/2020,20:42,52921,684
03/24/2020,22:48,53205,687
03/25/2020,00:29,53655,698
03/25/2020,02:44,54823,778
03/25/2020,04:46,54867,782
03/25/2020,06:47,54916,784
03/25/2020,08:48,54935,784
03/25/2020,10:43,54941,784
03/25/2020,12:48,54979,785
03/25/2020,14:48,55081,785
03/25/2020,16:48,60642,817
03/25/2020,18:48,62364,878
03/25/2020,20:33,64765,910
03/25/2020,22:44,65527,928
03/26/2020,00:34,65797,935
03/26/2020,02:43,66741,963
03/26/2020,05:24,68472,1032
03/26/2020,07:03,68489,1032
03/26/2020,09:02,68489,1032
03/26/2020,11:02,68581,1036
03/26/2020,13:01,68594,1036
03/26/2020,14:52,68905,1037
03/26/2020,17:02,75069,1080
03/26/2020,19:00,79082,1143
03/26/2020,21:01,81946,1177
03/26/2020,23:02,83206,1201
03/27/2020,01:00,85280,1293
03/27/2020,03:01,85520,1297
03/27/2020,04:36,85594,1300
03/27/2020,07:33,85612,1301
03/27/2020,09:32,85612,1301
03/27/2020,11:31,85749,1304
03/27/2020,13:32,85755,1304
03/27/2020,15:33,86548,1321
03/27/2020,17:32,94425,1429
03/27/2020,19:33,98180,1513
03/27/2020,21:33,100514,1546
03/27/2020,23:33,102325,1591
03/28/2020,01:32,104126,1692
03/28/2020,03:34,104205,1704
03/28/2020,05:35,104205,1704
03/28/2020,07:35,104256,1704
03/28/2020,09:35,104256,1704
03/28/2020,11:40,104256,1704
03/28/2020,13:36,104277,1704
03/28/2020,15:45,105726,1730
03/28/2020,17:45,116050,1937
03/28/2020,19:43,118592,1979
03/28/2020,21:44,120204,1997
03/28/2020,23:43,123311,2211
03/29/2020,01:46,123578,2221


In [559]:
import datetime
import calendar
import time
from M2D import *
import sqlite3

arrangedDdata = ''
arrangedDdata=arrangedDdata+"date_time,cases\n"
c= conn.cursor()
for row in c.execute('SELECT rowid,* from CORONA'):
MISC=row[1]
Str = MISC.split(" ")
month = Str[0][0:5]
OUT = Month2Num(month)+","+MISC[5:15]+" "+MISC[18:24]+":00"
OUT = OUT.replace(", ","-")
OUT = OUT.replace("c","")
#OUT = OUT.replace(",","-")
OUT = OUT.replace(" ",",");
OUT = OUT.replace(",,"," ")
OUT = OUT.rstrip(",");
OUT = OUT.replace(",","")
#print (OUT)
arrangedDdata = arrangedDdata+OUT+"\n"
conn.close()

text =arrangedDdata.split("\n")
text= text[1:-1]
EPOCHa=[]
Scnt=0
SPANS = []
for line in text:
#print(line)
#line=str(LINE)
line = line.split("-")
#print (str(line[1]+'/'+line[0]+'/'+line[2][:-3]))
dt = time.strftime((str(line[1]+'/'+line[0]+'/'+line[2][:-3])))
#print (dt+":00")

dt_ti = dt+":00"
#print (dt_ti)
#03-16-2020 02:48,3777
pattern = '%d/%m/%Y %H:%M:%S'
#pattern = '%m/%d/%Y %H:%M:%S'
epochs = int(time.mktime(time.strptime(dt_ti, pattern)))
#print (dt_ti, epochs)

if Scnt>1:SPANS.append(span(int(last),int(epochs)))
if Scnt==0:last=1583661400
SPan = span(int(last),int(epochs))
data = dt_ti+" "+str(epochs)+" "+str(SPan)

entry = str(data)
Scnt=Scnt+1

last = int(epochs)
#print (span(int(last),int(epochs)))
EPOCHa.append(data)

for lines in EPOCHa:
print (lines)

#08/03/2020 23:30:00 1583681400 -274.68
#09/03/2020 04:30:00 1583699400 5.0

08/03/2020 23:30:00 1583681400 5.56
09/03/2020 04:30:00 1583699400 5.0
10/03/2020 05:30:00 1583789400 25.0
10/03/2020 23:35:00 1583854500 18.08
11/03/2020 04:25:00 1583871900 4.83
11/03/2020 15:17:00 1583911020 10.87
11/03/2020 23:35:00 1583940900 8.3
12/03/2020 03:25:00 1583954700 3.83
12/03/2020 11:37:00 1583984220 8.2
12/03/2020 22:00:00 1584021600 10.38
13/03/2020 00:05:00 1584029100 2.08
13/03/2020 01:35:00 1584034500 1.5
13/03/2020 03:45:00 1584042300 2.17
13/03/2020 06:00:00 1584050400 2.25
13/03/2020 15:25:00 1584084300 9.42
13/03/2020 22:25:00 1584109500 7.0
14/03/2020 02:40:00 1584124800 4.25
14/03/2020 07:14:00 1584141240 4.57
14/03/2020 16:45:00 1584175500 9.52
14/03/2020 23:03:00 1584198180 6.3
15/03/2020 05:00:00 1584219600 5.95
15/03/2020 05:40:00 1584222000 0.67
15/03/2020 07:05:00 1584227100 1.42
15/03/2020 19:00:00 1584270000 11.92
15/03/2020 20:05:00 1584273900 1.08
15/03/2020 21:15:00 1584278100 1.17
15/03/2020 22:15:00 1584281700 1.0
16/03/2020 00:35:00 1584290100 2.33
16/03/2020 02:48:00 1584298080 2.22
16/03/2020 05:36:00 1584308160 2.8
16/03/2020 08:29:00 1584318540 2.88
16/03/2020 18:40:00 1584355200 10.18
16/03/2020 22:40:00 1584369600 4.0
17/03/2020 00:45:00 1584377100 2.08
17/03/2020 02:40:00 1584384000 1.92
17/03/2020 06:35:00 1584398100 3.92
17/03/2020 10:31:00 1584412260 3.93
17/03/2020 14:38:00 1584427080 4.12
17/03/2020 18:41:00 1584441660 4.05
17/03/2020 21:55:00 1584453300 3.23
17/03/2020 22:40:00 1584456000 0.75
18/03/2020 02:20:00 1584469200 3.67
18/03/2020 06:05:00 1584482700 3.75
18/03/2020 10:10:00 1584497400 4.08
18/03/2020 16:15:00 1584519300 6.08
18/03/2020 18:16:00 1584526560 2.02
18/03/2020 20:21:00 1584534060 2.08
18/03/2020 22:10:00 1584540600 1.82
19/03/2020 02:17:00 1584555420 4.12
19/03/2020 10:16:00 1584584160 7.98
19/03/2020 12:18:00 1584591480 2.03
19/03/2020 14:15:00 1584598500 1.95
19/03/2020 16:22:00 1584606120 2.12
19/03/2020 18:17:00 1584613020 1.92
19/03/2020 22:45:00 1584629100 4.47
20/03/2020 00:48:00 1584636480 2.05
20/03/2020 02:40:00 1584643200 1.87
20/03/2020 04:34:00 1584650040 1.9
20/03/2020 06:35:00 1584657300 2.02
20/03/2020 08:10:00 1584663000 1.58
20/03/2020 10:11:00 1584670260 2.02
20/03/2020 12:11:00 1584677460 2.0
20/03/2020 14:10:00 1584684600 1.98
20/03/2020 16:11:00 1584691860 2.02
20/03/2020 18:12:00 1584699120 2.02
20/03/2020 20:12:00 1584706320 2.0
20/03/2020 22:12:00 1584713520 2.0
21/03/2020 00:06:00 1584720360 1.9
21/03/2020 02:07:00 1584727620 2.02
21/03/2020 04:08:00 1584734880 2.02
21/03/2020 06:05:00 1584741900 1.95
21/03/2020 08:10:00 1584749400 2.08
21/03/2020 10:12:00 1584756720 2.03
21/03/2020 12:46:00 1584765960 2.57
21/03/2020 14:48:00 1584773280 2.03
21/03/2020 16:48:00 1584780480 2.0
21/03/2020 18:45:00 1584787500 1.95
21/03/2020 20:45:00 1584794700 2.0
21/03/2020 22:45:00 1584801900 2.0
22/03/2020 00:40:00 1584808800 1.92
22/03/2020 02:40:00 1584816000 2.0
22/03/2020 04:45:00 1584823500 2.08
22/03/2020 06:30:00 1584829800 1.75
22/03/2020 08:45:00 1584837900 2.25
22/03/2020 10:45:00 1584845100 2.0
22/03/2020 12:48:00 1584852480 2.05
22/03/2020 14:45:00 1584859500 1.95
22/03/2020 16:42:00 1584866520 1.95
22/03/2020 18:48:00 1584874080 2.1
22/03/2020 20:44:00 1584881040 1.93
22/03/2020 21:41:00 1584884460 0.95
23/03/2020 00:44:00 1584895440 3.05
23/03/2020 02:37:00 1584902220 1.88
23/03/2020 03:55:00 1584906900 1.3
23/03/2020 06:45:00 1584917100 2.83
23/03/2020 08:47:00 1584924420 2.03
23/03/2020 10:47:00 1584931620 2.0
23/03/2020 12:46:00 1584938760 1.98
23/03/2020 14:45:00 1584945900 1.98
23/03/2020 16:45:00 1584953100 2.0
23/03/2020 18:46:00 1584960360 2.02
23/03/2020 20:47:00 1584967620 2.02
23/03/2020 22:31:00 1584973860 1.73
24/03/2020 00:47:00 1584982020 2.27
24/03/2020 02:33:00 1584988380 1.77
24/03/2020 04:46:00 1584996360 2.22
24/03/2020 06:43:00 1585003380 1.95
24/03/2020 08:48:00 1585010880 2.08
24/03/2020 10:47:00 1585018020 1.98
24/03/2020 12:47:00 1585025220 2.0
24/03/2020 14:47:00 1585032420 2.0
24/03/2020 16:47:00 1585039620 2.0
24/03/2020 18:45:00 1585046700 1.97
24/03/2020 20:42:00 1585053720 1.95
24/03/2020 22:48:00 1585061280 2.1
25/03/2020 00:29:00 1585067340 1.68
25/03/2020 02:44:00 1585075440 2.25
25/03/2020 04:46:00 1585082760 2.03
25/03/2020 06:47:00 1585090020 2.02
25/03/2020 08:48:00 1585097280 2.02
25/03/2020 10:43:00 1585104180 1.92
25/03/2020 12:48:00 1585111680 2.08
25/03/2020 14:48:00 1585118880 2.0
25/03/2020 16:48:00 1585126080 2.0
25/03/2020 18:48:00 1585133280 2.0
25/03/2020 20:33:00 1585139580 1.75
25/03/2020 22:44:00 1585147440 2.18
26/03/2020 00:34:00 1585154040 1.83
26/03/2020 02:43:00 1585161780 2.15
26/03/2020 05:24:00 1585171440 2.68
26/03/2020 07:03:00 1585177380 1.65
26/03/2020 09:02:00 1585184520 1.98
26/03/2020 11:02:00 1585191720 2.0
26/03/2020 13:01:00 1585198860 1.98
26/03/2020 14:52:00 1585205520 1.85
26/03/2020 17:02:00 1585213320 2.17
26/03/2020 19:00:00 1585220400 1.97
26/03/2020 21:01:00 1585227660 2.02
26/03/2020 23:02:00 1585234920 2.02
27/03/2020 01:00:00 1585242000 1.97
27/03/2020 03:01:00 1585249260 2.02
27/03/2020 04:36:00 1585254960 1.58
27/03/2020 07:33:00 1585265580 2.95
27/03/2020 09:32:00 1585272720 1.98
27/03/2020 11:31:00 1585279860 1.98
27/03/2020 13:32:00 1585287120 2.02
27/03/2020 15:33:00 1585294380 2.02
27/03/2020 17:32:00 1585301520 1.98
27/03/2020 19:33:00 1585308780 2.02
27/03/2020 21:33:00 1585315980 2.0
27/03/2020 23:33:00 1585323180 2.0
28/03/2020 01:32:00 1585330320 1.98
28/03/2020 03:34:00 1585337640 2.03
28/03/2020 05:35:00 1585344900 2.02
28/03/2020 07:35:00 1585352100 2.0
28/03/2020 09:35:00 1585359300 2.0
28/03/2020 11:40:00 1585366800 2.08
28/03/2020 13:36:00 1585373760 1.93
28/03/2020 15:45:00 1585381500 2.15
28/03/2020 17:45:00 1585388700 2.0
28/03/2020 19:43:00 1585395780 1.97
28/03/2020 21:44:00 1585403040 2.02
28/03/2020 23:43:00 1585410180 1.98
29/03/2020 01:46:00 1585417560 2.05

In [560]:
import datetime
import calendar
import time
from M2D import *
import sqlite3
arrangedDdata = ''
arrangedDdata=arrangedDdata+"date_time,cases\n"
c= conn.cursor()
for row in c.execute('SELECT rowid,* from CORONA'):
row =str(row)
row=row.replace(",","")
row = row.split(" ")
Month = row[1]
month = Month2Num(Month[1:])
OUT = row[2]+"/"+month+"/"+row[3]+" "+row[5]+" "+row[10]+" "+row[14]
# Result 03/12/2020 03:25:00 1327 38
arrangedDdata = arrangedDdata+OUT+"\n"
conn.close()

text =arrangedDdata.split("\n")
text= text[1:-1]
EPOCHa=[]
Scnt=0
SPANS = []
for line in text:
#print(line)
#line=str(LINE)
line = line.split(" ")
#print (str(line[1]+'/'+line[0]+'/'+line[2][:-3]))
dt = time.strftime(line[0]+' '+line[1])

dt_ti = dt+":00"
#dt_ti =dt_ti.replace("\n","")
#print (line)
#print (dt_ti)
#03-16-2020 02:48,3777
pattern = '%d/%m/%Y %H:%M:%S'
#pattern = '%m/%d/%Y %H:%M:%S'
#dt_ti = '08/03/2020 23:30:00'
#print (dt_ti)
#datetime.strptime('2012-11-14 14:32:30', '%Y-%m-%d %H:%M:%S')

epochs = int(time.mktime(time.strptime(dt_ti, pattern)))
#print (dt_ti, epochs)

if Scnt>1:SPANS.append(span(int(last),int(epochs)))
if Scnt==0:last=1583661400
SPan = span(int(last),int(epochs))
data = dt_ti+" "+str(epochs)+" "+str(SPan)+" "+line[2]+" "+line[3]

entry = str(data)
Scnt=Scnt+1

last = int(epochs)
#print (span(int(last),int(epochs)))
EPOCHa.append(data)

for lines in EPOCHa:
print (lines)

#08/03/2020 23:30:00 1583681400 -274.68
#09/03/2020 04:30:00 1583699400 5.0

08/03/2020 23:30:00 1583681400 5.56 537 21
09/03/2020 04:30:00 1583699400 5.0 589 22
10/03/2020 05:30:00 1583789400 25.0 708 27
10/03/2020 23:35:00 1583854500 18.08 975 30
11/03/2020 04:25:00 1583871900 4.83 1010 31
11/03/2020 15:17:00 1583911020 10.87 1016 31
11/03/2020 23:35:00 1583940900 8.3 1301 38
12/03/2020 03:25:00 1583954700 3.83 1327 38
12/03/2020 11:37:00 1583984220 8.2 1336 38
12/03/2020 22:00:00 1584021600 10.38 1639 40
13/03/2020 00:05:00 1584029100 2.08 1715 41
13/03/2020 01:35:00 1584034500 1.5 1725 41
13/03/2020 03:45:00 1584042300 2.17 1747 41
13/03/2020 06:00:00 1584050400 2.25 1762 41
13/03/2020 15:25:00 1584084300 9.42 1832 41
13/03/2020 22:25:00 1584109500 7.0 2269 48
14/03/2020 02:40:00 1584124800 4.25 2291 50
14/03/2020 07:14:00 1584141240 4.57 2319 50
14/03/2020 16:45:00 1584175500 9.52 2499 51
14/03/2020 23:03:00 1584198180 6.3 2836 57
15/03/2020 05:00:00 1584219600 5.95 2982 60
15/03/2020 05:40:00 1584222000 0.67 2995 60
15/03/2020 07:05:00 1584227100 1.42 3043 60
15/03/2020 19:00:00 1584270000 11.92 3329 63
15/03/2020 20:05:00 1584273900 1.08 3400 63
15/03/2020 21:15:00 1584278100 1.17 3621 63
15/03/2020 22:15:00 1584281700 1.0 3502 63
16/03/2020 00:35:00 1584290100 2.33 3714 68
16/03/2020 02:48:00 1584298080 2.22 3777 69
16/03/2020 05:36:00 1584308160 2.8 3782 69
16/03/2020 08:29:00 1584318540 2.88 3802 69
16/03/2020 18:40:00 1584355200 10.18 4186 73
16/03/2020 22:40:00 1584369600 4.0 4597 86
17/03/2020 00:45:00 1584377100 2.08 4667 87
17/03/2020 02:40:00 1584384000 1.92 4704 91
17/03/2020 06:35:00 1584398100 3.92 4727 93
17/03/2020 10:31:00 1584412260 3.93 4743 93
17/03/2020 14:38:00 1584427080 4.12 4752 93
17/03/2020 18:41:00 1584441660 4.05 5723 97
17/03/2020 21:55:00 1584453300 3.23 6211 102
17/03/2020 22:40:00 1584456000 0.75 6349 106
18/03/2020 02:20:00 1584469200 3.67 6499 112
18/03/2020 06:05:00 1584482700 3.75 6522 116
18/03/2020 10:10:00 1584497400 4.08 6524 116
18/03/2020 16:15:00 1584519300 6.08 7601 116
18/03/2020 18:16:00 1584526560 2.02 7708 120
18/03/2020 20:21:00 1584534060 2.08 8710 132
18/03/2020 22:10:00 1584540600 1.82 8998 150
19/03/2020 02:17:00 1584555420 4.12 9371 153
19/03/2020 10:16:00 1584584160 7.98 9464 155
19/03/2020 12:18:00 1584591480 2.03 9473 155
19/03/2020 14:15:00 1584598500 1.95 9486 157
19/03/2020 16:22:00 1584606120 2.12 10692 160
19/03/2020 18:17:00 1584613020 1.92 11355 171
19/03/2020 22:45:00 1584629100 4.47 13737 201
20/03/2020 00:48:00 1584636480 2.05 13865 211
20/03/2020 02:40:00 1584643200 1.87 14316 218
20/03/2020 04:34:00 1584650040 1.9 14336 218
20/03/2020 06:35:00 1584657300 2.02 14366 217
20/03/2020 08:10:00 1584663000 1.58 14366 217
20/03/2020 10:11:00 1584670260 2.02 14366 217
20/03/2020 12:11:00 1584677460 2.0 14366 217
20/03/2020 14:10:00 1584684600 1.98 14373 218
20/03/2020 16:11:00 1584691860 2.02 16067 219
20/03/2020 18:12:00 1584699120 2.02 16545 225
20/03/2020 20:12:00 1584706320 2.0 18121 233
20/03/2020 22:12:00 1584713520 2.0 18876 237
21/03/2020 00:06:00 1584720360 1.9 19393 256
21/03/2020 02:07:00 1584727620 2.02 19643 263
21/03/2020 04:08:00 1584734880 2.02 19652 264
21/03/2020 06:05:00 1584741900 1.95 19774 275
21/03/2020 08:10:00 1584749400 2.08 19774 275
21/03/2020 10:12:00 1584756720 2.03 19774 275
21/03/2020 12:46:00 1584765960 2.57 19775 276
21/03/2020 14:48:00 1584773280 2.03 19823 276
21/03/2020 16:48:00 1584780480 2.0 22085 282
21/03/2020 18:45:00 1584787500 1.95 22813 288
21/03/2020 20:45:00 1584794700 2.0 24142 288
21/03/2020 22:45:00 1584801900 2.0 23940 301
22/03/2020 00:40:00 1584808800 1.92 26111 324
22/03/2020 02:40:00 1584816000 2.0 26711 341
22/03/2020 04:45:00 1584823500 2.08 26867 348
22/03/2020 06:30:00 1584829800 1.75 26892 348
22/03/2020 08:45:00 1584837900 2.25 26892 348
22/03/2020 10:45:00 1584845100 2.0 26900 348
22/03/2020 12:48:00 1584852480 2.05 26905 348
22/03/2020 14:45:00 1584859500 1.95 27031 349
22/03/2020 16:42:00 1584866520 1.95 30239 388
22/03/2020 18:48:00 1584874080 2.1 38757 400
22/03/2020 20:44:00 1584881040 1.93 32356 414
22/03/2020 21:41:00 1584884460 0.95 32356 414
23/03/2020 00:44:00 1584895440 3.05 33346 414
23/03/2020 02:37:00 1584902220 1.88 33546 419
23/03/2020 03:55:00 1584906900 1.3 34717 452
23/03/2020 06:45:00 1584917100 2.83 35060 457
23/03/2020 08:47:00 1584924420 2.03 35070 458
23/03/2020 10:47:00 1584931620 2.0 35070 458
23/03/2020 12:46:00 1584938760 1.98 35075 458
23/03/2020 14:45:00 1584945900 1.98 35179 459
23/03/2020 16:45:00 1584953100 2.0 40773 479
23/03/2020 18:46:00 1584960360 2.02 41569 504
23/03/2020 20:47:00 1584967620 2.02 42443 517
23/03/2020 22:31:00 1584973860 1.73 43449 545
24/03/2020 00:47:00 1584982020 2.27 43718 552
24/03/2020 02:33:00 1584988380 1.77 43734 553
24/03/2020 04:46:00 1584996360 2.22 46145 582
24/03/2020 06:43:00 1585003380 1.95 46145 582
24/03/2020 08:48:00 1585010880 2.08 46145 582
24/03/2020 10:47:00 1585018020 1.98 46168 582
24/03/2020 12:47:00 1585025220 2.0 46168 582
24/03/2020 14:47:00 1585032420 2.0 46274 588
24/03/2020 16:47:00 1585039620 2.0 49594 622
24/03/2020 18:45:00 1585046700 1.97 50982 655
24/03/2020 20:42:00 1585053720 1.95 52921 684
24/03/2020 22:48:00 1585061280 2.1 53205 687
25/03/2020 00:29:00 1585067340 1.68 53655 698
25/03/2020 02:44:00 1585075440 2.25 54823 778
25/03/2020 04:46:00 1585082760 2.03 54867 782
25/03/2020 06:47:00 1585090020 2.02 54916 784
25/03/2020 08:48:00 1585097280 2.02 54935 784
25/03/2020 10:43:00 1585104180 1.92 54941 784
25/03/2020 12:48:00 1585111680 2.08 54979 785
25/03/2020 14:48:00 1585118880 2.0 55081 785
25/03/2020 16:48:00 1585126080 2.0 60642 817
25/03/2020 18:48:00 1585133280 2.0 62364 878
25/03/2020 20:33:00 1585139580 1.75 64765 910
25/03/2020 22:44:00 1585147440 2.18 65527 928
26/03/2020 00:34:00 1585154040 1.83 65797 935
26/03/2020 02:43:00 1585161780 2.15 66741 963
26/03/2020 05:24:00 1585171440 2.68 68472 1032
26/03/2020 07:03:00 1585177380 1.65 68489 1032
26/03/2020 09:02:00 1585184520 1.98 68489 1032
26/03/2020 11:02:00 1585191720 2.0 68581 1036
26/03/2020 13:01:00 1585198860 1.98 68594 1036
26/03/2020 14:52:00 1585205520 1.85 68905 1037
26/03/2020 17:02:00 1585213320 2.17 75069 1080
26/03/2020 19:00:00 1585220400 1.97 79082 1143
26/03/2020 21:01:00 1585227660 2.02 81946 1177
26/03/2020 23:02:00 1585234920 2.02 83206 1201
27/03/2020 01:00:00 1585242000 1.97 85280 1293
27/03/2020 03:01:00 1585249260 2.02 85520 1297
27/03/2020 04:36:00 1585254960 1.58 85594 1300
27/03/2020 07:33:00 1585265580 2.95 85612 1301
27/03/2020 09:32:00 1585272720 1.98 85612 1301
27/03/2020 11:31:00 1585279860 1.98 85749 1304
27/03/2020 13:32:00 1585287120 2.02 85755 1304
27/03/2020 15:33:00 1585294380 2.02 86548 1321
27/03/2020 17:32:00 1585301520 1.98 94425 1429
27/03/2020 19:33:00 1585308780 2.02 98180 1513
27/03/2020 21:33:00 1585315980 2.0 100514 1546
27/03/2020 23:33:00 1585323180 2.0 102325 1591
28/03/2020 01:32:00 1585330320 1.98 104126 1692
28/03/2020 03:34:00 1585337640 2.03 104205 1704
28/03/2020 05:35:00 1585344900 2.02 104205 1704
28/03/2020 07:35:00 1585352100 2.0 104256 1704
28/03/2020 09:35:00 1585359300 2.0 104256 1704
28/03/2020 11:40:00 1585366800 2.08 104256 1704
28/03/2020 13:36:00 1585373760 1.93 104277 1704
28/03/2020 15:45:00 1585381500 2.15 105726 1730
28/03/2020 17:45:00 1585388700 2.0 116050 1937
28/03/2020 19:43:00 1585395780 1.97 118592 1979
28/03/2020 21:44:00 1585403040 2.02 120204 1997
28/03/2020 23:43:00 1585410180 1.98 123311 2211
29/03/2020 01:46:00 1585417560 2.05 123578 2221

In [561]:
import time

dt = time.strftime('%m/%d/%Y-%H:%M:%S')
file = "DATA/"+dt+"CleanCorona.db"
print (file)
!mv DATA/CleanCorona.db, file

DATA/03/29/2020-10:56:56CleanCorona.db
mv: cannot stat 'DATA/CleanCorona.db,': No such file or directory

In [562]:
import datetime
import calendar
import time
from M2D import *
import sqlite3

conn2=sqlite3.connect("DATA/CleanCorona.db")
c2 = conn2.cursor()
c2.execute("CREATE TABLE IF NOT EXISTS CORONA(data TEXT UNIQUE)")
conn2.commit()

arrangedDdata = ''
CASES = []
DEATHS=[]
arrangedDdata=arrangedDdata+"date_time,cases\n"
c= conn.cursor()
for row in c.execute('SELECT rowid,* from CORONA'):
row =str(row)
row=row.replace(",","")
row = row.split(" ")
Month = row[1]
month = Month2Num(Month[1:])
OUT = month+"/"+row[2]+"/"+row[3]+" "+row[5]+" "+row[10]+" "+row[14]
# Result 03/12/2020 03:25:00 1327 38
arrangedDdata = arrangedDdata+OUT+"\n"
conn.close()

text =arrangedDdata.split("\n")
text= text[1:-1]
EPOCHa=[]
Scnt=0
SPANS = []
for line in text:
#print(line)
#line=str(LINE)
line = line.split(" ")
#print (str(line[1]+'/'+line[0]+'/'+line[2][:-3]))
dt = time.strftime(line[0]+' '+line[1])

dt_ti = dt+":00"
#dt_ti =dt_ti.replace("\n","")
#print (line)
#print (dt_ti)
#03-16-2020 02:48,3777
#pattern = '%d/%m/%Y %H:%M:%S'
pattern = '%m/%d/%Y %H:%M:%S'
#dt_ti = '08/03/2020 23:30:00'
#print (dt_ti)
#datetime.strptime('2012-11-14 14:32:30', '%Y-%m-%d %H:%M:%S')

epochs = int(time.mktime(time.strptime(dt_ti, pattern)))
#print (dt_ti, epochs)

if Scnt>1:SPANS.append(span(int(last),int(epochs)))
if Scnt==0:last=1583661400
SPan = span(int(last),int(epochs))
data = dt_ti+" "+str(epochs)+" "+str(SPan)+" "+line[2]+" "+line[3]
CASES.append(line[2])
DEATHS.append(line[3])
entry = str(data)
Scnt=Scnt+1
c2.execute("INSERT OR IGNORE into CORONA values (?)",(data,))
last = int(epochs)
#print (span(int(last),int(epochs)))
EPOCHa.append(data)
conn2.commit()
conn2.close()
Scn=0
for lines in EPOCHa:
print (Scn,": ",lines)
Scn = Scn+1

#08/03/2020 23:30:00 1583681400 -274.68
#09/03/2020 04:30:00 1583699400 5.0

0 :  03/08/2020 23:30:00 1583681400 5.56 537 21
1 :  03/09/2020 04:30:00 1583699400 5.0 589 22
2 :  03/10/2020 05:30:00 1583789400 25.0 708 27
3 :  03/10/2020 23:35:00 1583854500 18.08 975 30
4 :  03/11/2020 04:25:00 1583871900 4.83 1010 31
5 :  03/11/2020 15:17:00 1583911020 10.87 1016 31
6 :  03/11/2020 23:35:00 1583940900 8.3 1301 38
7 :  03/12/2020 03:25:00 1583954700 3.83 1327 38
8 :  03/12/2020 11:37:00 1583984220 8.2 1336 38
9 :  03/12/2020 22:00:00 1584021600 10.38 1639 40
10 :  03/13/2020 00:05:00 1584029100 2.08 1715 41
11 :  03/13/2020 01:35:00 1584034500 1.5 1725 41
12 :  03/13/2020 03:45:00 1584042300 2.17 1747 41
13 :  03/13/2020 06:00:00 1584050400 2.25 1762 41
14 :  03/13/2020 15:25:00 1584084300 9.42 1832 41
15 :  03/13/2020 22:25:00 1584109500 7.0 2269 48
16 :  03/14/2020 02:40:00 1584124800 4.25 2291 50
17 :  03/14/2020 07:14:00 1584141240 4.57 2319 50
18 :  03/14/2020 16:45:00 1584175500 9.52 2499 51
19 :  03/14/2020 23:03:00 1584198180 6.3 2836 57
20 :  03/15/2020 05:00:00 1584219600 5.95 2982 60
21 :  03/15/2020 05:40:00 1584222000 0.67 2995 60
22 :  03/15/2020 07:05:00 1584227100 1.42 3043 60
23 :  03/15/2020 19:00:00 1584270000 11.92 3329 63
24 :  03/15/2020 20:05:00 1584273900 1.08 3400 63
25 :  03/15/2020 21:15:00 1584278100 1.17 3621 63
26 :  03/15/2020 22:15:00 1584281700 1.0 3502 63
27 :  03/16/2020 00:35:00 1584290100 2.33 3714 68
28 :  03/16/2020 02:48:00 1584298080 2.22 3777 69
29 :  03/16/2020 05:36:00 1584308160 2.8 3782 69
30 :  03/16/2020 08:29:00 1584318540 2.88 3802 69
31 :  03/16/2020 18:40:00 1584355200 10.18 4186 73
32 :  03/16/2020 22:40:00 1584369600 4.0 4597 86
33 :  03/17/2020 00:45:00 1584377100 2.08 4667 87
34 :  03/17/2020 02:40:00 1584384000 1.92 4704 91
35 :  03/17/2020 06:35:00 1584398100 3.92 4727 93
36 :  03/17/2020 10:31:00 1584412260 3.93 4743 93
37 :  03/17/2020 14:38:00 1584427080 4.12 4752 93
38 :  03/17/2020 18:41:00 1584441660 4.05 5723 97
39 :  03/17/2020 21:55:00 1584453300 3.23 6211 102
40 :  03/17/2020 22:40:00 1584456000 0.75 6349 106
41 :  03/18/2020 02:20:00 1584469200 3.67 6499 112
42 :  03/18/2020 06:05:00 1584482700 3.75 6522 116
43 :  03/18/2020 10:10:00 1584497400 4.08 6524 116
44 :  03/18/2020 16:15:00 1584519300 6.08 7601 116
45 :  03/18/2020 18:16:00 1584526560 2.02 7708 120
46 :  03/18/2020 20:21:00 1584534060 2.08 8710 132
47 :  03/18/2020 22:10:00 1584540600 1.82 8998 150
48 :  03/19/2020 02:17:00 1584555420 4.12 9371 153
49 :  03/19/2020 10:16:00 1584584160 7.98 9464 155
50 :  03/19/2020 12:18:00 1584591480 2.03 9473 155
51 :  03/19/2020 14:15:00 1584598500 1.95 9486 157
52 :  03/19/2020 16:22:00 1584606120 2.12 10692 160
53 :  03/19/2020 18:17:00 1584613020 1.92 11355 171
54 :  03/19/2020 22:45:00 1584629100 4.47 13737 201
55 :  03/20/2020 00:48:00 1584636480 2.05 13865 211
56 :  03/20/2020 02:40:00 1584643200 1.87 14316 218
57 :  03/20/2020 04:34:00 1584650040 1.9 14336 218
58 :  03/20/2020 06:35:00 1584657300 2.02 14366 217
59 :  03/20/2020 08:10:00 1584663000 1.58 14366 217
60 :  03/20/2020 10:11:00 1584670260 2.02 14366 217
61 :  03/20/2020 12:11:00 1584677460 2.0 14366 217
62 :  03/20/2020 14:10:00 1584684600 1.98 14373 218
63 :  03/20/2020 16:11:00 1584691860 2.02 16067 219
64 :  03/20/2020 18:12:00 1584699120 2.02 16545 225
65 :  03/20/2020 20:12:00 1584706320 2.0 18121 233
66 :  03/20/2020 22:12:00 1584713520 2.0 18876 237
67 :  03/21/2020 00:06:00 1584720360 1.9 19393 256
68 :  03/21/2020 02:07:00 1584727620 2.02 19643 263
69 :  03/21/2020 04:08:00 1584734880 2.02 19652 264
70 :  03/21/2020 06:05:00 1584741900 1.95 19774 275
71 :  03/21/2020 08:10:00 1584749400 2.08 19774 275
72 :  03/21/2020 10:12:00 1584756720 2.03 19774 275
73 :  03/21/2020 12:46:00 1584765960 2.57 19775 276
74 :  03/21/2020 14:48:00 1584773280 2.03 19823 276
75 :  03/21/2020 16:48:00 1584780480 2.0 22085 282
76 :  03/21/2020 18:45:00 1584787500 1.95 22813 288
77 :  03/21/2020 20:45:00 1584794700 2.0 24142 288
78 :  03/21/2020 22:45:00 1584801900 2.0 23940 301
79 :  03/22/2020 00:40:00 1584808800 1.92 26111 324
80 :  03/22/2020 02:40:00 1584816000 2.0 26711 341
81 :  03/22/2020 04:45:00 1584823500 2.08 26867 348
82 :  03/22/2020 06:30:00 1584829800 1.75 26892 348
83 :  03/22/2020 08:45:00 1584837900 2.25 26892 348
84 :  03/22/2020 10:45:00 1584845100 2.0 26900 348
85 :  03/22/2020 12:48:00 1584852480 2.05 26905 348
86 :  03/22/2020 14:45:00 1584859500 1.95 27031 349
87 :  03/22/2020 16:42:00 1584866520 1.95 30239 388
88 :  03/22/2020 18:48:00 1584874080 2.1 38757 400
89 :  03/22/2020 20:44:00 1584881040 1.93 32356 414
90 :  03/22/2020 21:41:00 1584884460 0.95 32356 414
91 :  03/23/2020 00:44:00 1584895440 3.05 33346 414
92 :  03/23/2020 02:37:00 1584902220 1.88 33546 419
93 :  03/23/2020 03:55:00 1584906900 1.3 34717 452
94 :  03/23/2020 06:45:00 1584917100 2.83 35060 457
95 :  03/23/2020 08:47:00 1584924420 2.03 35070 458
96 :  03/23/2020 10:47:00 1584931620 2.0 35070 458
97 :  03/23/2020 12:46:00 1584938760 1.98 35075 458
98 :  03/23/2020 14:45:00 1584945900 1.98 35179 459
99 :  03/23/2020 16:45:00 1584953100 2.0 40773 479
100 :  03/23/2020 18:46:00 1584960360 2.02 41569 504
101 :  03/23/2020 20:47:00 1584967620 2.02 42443 517
102 :  03/23/2020 22:31:00 1584973860 1.73 43449 545
103 :  03/24/2020 00:47:00 1584982020 2.27 43718 552
104 :  03/24/2020 02:33:00 1584988380 1.77 43734 553
105 :  03/24/2020 04:46:00 1584996360 2.22 46145 582
106 :  03/24/2020 06:43:00 1585003380 1.95 46145 582
107 :  03/24/2020 08:48:00 1585010880 2.08 46145 582
108 :  03/24/2020 10:47:00 1585018020 1.98 46168 582
109 :  03/24/2020 12:47:00 1585025220 2.0 46168 582
110 :  03/24/2020 14:47:00 1585032420 2.0 46274 588
111 :  03/24/2020 16:47:00 1585039620 2.0 49594 622
112 :  03/24/2020 18:45:00 1585046700 1.97 50982 655
113 :  03/24/2020 20:42:00 1585053720 1.95 52921 684
114 :  03/24/2020 22:48:00 1585061280 2.1 53205 687
115 :  03/25/2020 00:29:00 1585067340 1.68 53655 698
116 :  03/25/2020 02:44:00 1585075440 2.25 54823 778
117 :  03/25/2020 04:46:00 1585082760 2.03 54867 782
118 :  03/25/2020 06:47:00 1585090020 2.02 54916 784
119 :  03/25/2020 08:48:00 1585097280 2.02 54935 784
120 :  03/25/2020 10:43:00 1585104180 1.92 54941 784
121 :  03/25/2020 12:48:00 1585111680 2.08 54979 785
122 :  03/25/2020 14:48:00 1585118880 2.0 55081 785
123 :  03/25/2020 16:48:00 1585126080 2.0 60642 817
124 :  03/25/2020 18:48:00 1585133280 2.0 62364 878
125 :  03/25/2020 20:33:00 1585139580 1.75 64765 910
126 :  03/25/2020 22:44:00 1585147440 2.18 65527 928
127 :  03/26/2020 00:34:00 1585154040 1.83 65797 935
128 :  03/26/2020 02:43:00 1585161780 2.15 66741 963
129 :  03/26/2020 05:24:00 1585171440 2.68 68472 1032
130 :  03/26/2020 07:03:00 1585177380 1.65 68489 1032
131 :  03/26/2020 09:02:00 1585184520 1.98 68489 1032
132 :  03/26/2020 11:02:00 1585191720 2.0 68581 1036
133 :  03/26/2020 13:01:00 1585198860 1.98 68594 1036
134 :  03/26/2020 14:52:00 1585205520 1.85 68905 1037
135 :  03/26/2020 17:02:00 1585213320 2.17 75069 1080
136 :  03/26/2020 19:00:00 1585220400 1.97 79082 1143
137 :  03/26/2020 21:01:00 1585227660 2.02 81946 1177
138 :  03/26/2020 23:02:00 1585234920 2.02 83206 1201
139 :  03/27/2020 01:00:00 1585242000 1.97 85280 1293
140 :  03/27/2020 03:01:00 1585249260 2.02 85520 1297
141 :  03/27/2020 04:36:00 1585254960 1.58 85594 1300
142 :  03/27/2020 07:33:00 1585265580 2.95 85612 1301
143 :  03/27/2020 09:32:00 1585272720 1.98 85612 1301
144 :  03/27/2020 11:31:00 1585279860 1.98 85749 1304
145 :  03/27/2020 13:32:00 1585287120 2.02 85755 1304
146 :  03/27/2020 15:33:00 1585294380 2.02 86548 1321
147 :  03/27/2020 17:32:00 1585301520 1.98 94425 1429
148 :  03/27/2020 19:33:00 1585308780 2.02 98180 1513
149 :  03/27/2020 21:33:00 1585315980 2.0 100514 1546
150 :  03/27/2020 23:33:00 1585323180 2.0 102325 1591
151 :  03/28/2020 01:32:00 1585330320 1.98 104126 1692
152 :  03/28/2020 03:34:00 1585337640 2.03 104205 1704
153 :  03/28/2020 05:35:00 1585344900 2.02 104205 1704
154 :  03/28/2020 07:35:00 1585352100 2.0 104256 1704
155 :  03/28/2020 09:35:00 1585359300 2.0 104256 1704
156 :  03/28/2020 11:40:00 1585366800 2.08 104256 1704
157 :  03/28/2020 13:36:00 1585373760 1.93 104277 1704
158 :  03/28/2020 15:45:00 1585381500 2.15 105726 1730
159 :  03/28/2020 17:45:00 1585388700 2.0 116050 1937
160 :  03/28/2020 19:43:00 1585395780 1.97 118592 1979
161 :  03/28/2020 21:44:00 1585403040 2.02 120204 1997
162 :  03/28/2020 23:43:00 1585410180 1.98 123311 2211
163 :  03/29/2020 01:46:00 1585417560 2.05 123578 2221

In [563]:
conn2=sqlite3.connect("DATA/CleanCorona.db")
c2 = conn2.cursor()
rows = c2.execute("SELECT ROWID,* from CORONA")
for row in rows:
print (row)

(1, '03/08/2020 23:30:00 1583681400 5.56 537 21')
(2, '03/09/2020 04:30:00 1583699400 5.0 589 22')
(3, '03/10/2020 05:30:00 1583789400 25.0 708 27')
(4, '03/10/2020 23:35:00 1583854500 18.08 975 30')
(5, '03/11/2020 04:25:00 1583871900 4.83 1010 31')
(6, '03/11/2020 15:17:00 1583911020 10.87 1016 31')
(7, '03/11/2020 23:35:00 1583940900 8.3 1301 38')
(8, '03/12/2020 03:25:00 1583954700 3.83 1327 38')
(9, '03/12/2020 11:37:00 1583984220 8.2 1336 38')
(10, '03/12/2020 22:00:00 1584021600 10.38 1639 40')
(11, '03/13/2020 00:05:00 1584029100 2.08 1715 41')
(12, '03/13/2020 01:35:00 1584034500 1.5 1725 41')
(13, '03/13/2020 03:45:00 1584042300 2.17 1747 41')
(14, '03/13/2020 06:00:00 1584050400 2.25 1762 41')
(15, '03/13/2020 15:25:00 1584084300 9.42 1832 41')
(16, '03/13/2020 22:25:00 1584109500 7.0 2269 48')
(17, '03/14/2020 02:40:00 1584124800 4.25 2291 50')
(18, '03/14/2020 07:14:00 1584141240 4.57 2319 50')
(19, '03/14/2020 16:45:00 1584175500 9.52 2499 51')
(20, '03/14/2020 23:03:00 1584198180 6.3 2836 57')
(21, '03/15/2020 05:00:00 1584219600 5.95 2982 60')
(22, '03/15/2020 05:40:00 1584222000 0.67 2995 60')
(23, '03/15/2020 07:05:00 1584227100 1.42 3043 60')
(24, '03/15/2020 19:00:00 1584270000 11.92 3329 63')
(25, '03/15/2020 20:05:00 1584273900 1.08 3400 63')
(26, '03/15/2020 21:15:00 1584278100 1.17 3621 63')
(27, '03/15/2020 22:15:00 1584281700 1.0 3502 63')
(28, '03/16/2020 00:35:00 1584290100 2.33 3714 68')
(29, '03/16/2020 02:48:00 1584298080 2.22 3777 69')
(30, '03/16/2020 05:36:00 1584308160 2.8 3782 69')
(31, '03/16/2020 08:29:00 1584318540 2.88 3802 69')
(32, '03/16/2020 18:40:00 1584355200 10.18 4186 73')
(33, '03/16/2020 22:40:00 1584369600 4.0 4597 86')
(34, '03/17/2020 00:45:00 1584377100 2.08 4667 87')
(35, '03/17/2020 02:40:00 1584384000 1.92 4704 91')
(36, '03/17/2020 06:35:00 1584398100 3.92 4727 93')
(37, '03/17/2020 10:31:00 1584412260 3.93 4743 93')
(38, '03/17/2020 14:38:00 1584427080 4.12 4752 93')
(39, '03/17/2020 18:41:00 1584441660 4.05 5723 97')
(40, '03/17/2020 21:55:00 1584453300 3.23 6211 102')
(41, '03/17/2020 22:40:00 1584456000 0.75 6349 106')
(42, '03/18/2020 02:20:00 1584469200 3.67 6499 112')
(43, '03/18/2020 06:05:00 1584482700 3.75 6522 116')
(44, '03/18/2020 10:10:00 1584497400 4.08 6524 116')
(45, '03/18/2020 16:15:00 1584519300 6.08 7601 116')
(46, '03/18/2020 18:16:00 1584526560 2.02 7708 120')
(47, '03/18/2020 20:21:00 1584534060 2.08 8710 132')
(48, '03/18/2020 22:10:00 1584540600 1.82 8998 150')
(49, '03/19/2020 02:17:00 1584555420 4.12 9371 153')
(50, '03/19/2020 10:16:00 1584584160 7.98 9464 155')
(51, '03/19/2020 12:18:00 1584591480 2.03 9473 155')
(52, '03/19/2020 14:15:00 1584598500 1.95 9486 157')
(53, '03/19/2020 16:22:00 1584606120 2.12 10692 160')
(54, '03/19/2020 18:17:00 1584613020 1.92 11355 171')
(55, '03/19/2020 22:45:00 1584629100 4.47 13737 201')
(56, '03/20/2020 00:48:00 1584636480 2.05 13865 211')
(57, '03/20/2020 02:40:00 1584643200 1.87 14316 218')
(58, '03/20/2020 04:34:00 1584650040 1.9 14336 218')
(59, '03/20/2020 06:35:00 1584657300 2.02 14366 217')
(60, '03/20/2020 08:10:00 1584663000 1.58 14366 217')
(61, '03/20/2020 10:11:00 1584670260 2.02 14366 217')
(62, '03/20/2020 12:11:00 1584677460 2.0 14366 217')
(63, '03/20/2020 14:10:00 1584684600 1.98 14373 218')
(64, '03/20/2020 16:11:00 1584691860 2.02 16067 219')
(65, '03/20/2020 18:12:00 1584699120 2.02 16545 225')
(66, '03/20/2020 20:12:00 1584706320 2.0 18121 233')
(67, '03/20/2020 22:12:00 1584713520 2.0 18876 237')
(68, '03/21/2020 00:06:00 1584720360 1.9 19393 256')
(69, '03/21/2020 02:07:00 1584727620 2.02 19643 263')
(70, '03/21/2020 04:08:00 1584734880 2.02 19652 264')
(71, '03/21/2020 06:05:00 1584741900 1.95 19774 275')
(72, '03/21/2020 08:10:00 1584749400 2.08 19774 275')
(73, '03/21/2020 10:12:00 1584756720 2.03 19774 275')
(74, '03/21/2020 12:46:00 1584765960 2.57 19775 276')
(75, '03/21/2020 14:48:00 1584773280 2.03 19823 276')
(76, '03/21/2020 16:48:00 1584780480 2.0 22085 282')
(77, '03/21/2020 18:45:00 1584787500 1.95 22813 288')
(78, '03/21/2020 20:45:00 1584794700 2.0 24142 288')
(79, '03/21/2020 22:45:00 1584801900 2.0 23940 301')
(80, '03/22/2020 00:40:00 1584808800 1.92 26111 324')
(81, '03/22/2020 02:40:00 1584816000 2.0 26711 341')
(82, '03/22/2020 04:45:00 1584823500 2.08 26867 348')
(83, '03/22/2020 06:30:00 1584829800 1.75 26892 348')
(84, '03/22/2020 08:45:00 1584837900 2.25 26892 348')
(85, '03/22/2020 10:45:00 1584845100 2.0 26900 348')
(86, '03/22/2020 12:48:00 1584852480 2.05 26905 348')
(87, '03/22/2020 14:45:00 1584859500 1.95 27031 349')
(88, '03/22/2020 16:42:00 1584866520 1.95 30239 388')
(89, '03/22/2020 18:48:00 1584874080 2.1 38757 400')
(90, '03/22/2020 20:44:00 1584881040 1.93 32356 414')
(91, '03/22/2020 21:41:00 1584884460 0.95 32356 414')
(92, '03/23/2020 00:44:00 1584895440 3.05 33346 414')
(93, '03/23/2020 02:37:00 1584902220 1.88 33546 419')
(94, '03/23/2020 03:55:00 1584906900 1.3 34717 452')
(95, '03/23/2020 06:45:00 1584917100 2.83 35060 457')
(96, '03/23/2020 08:47:00 1584924420 2.03 35070 458')
(97, '03/23/2020 10:47:00 1584931620 2.0 35070 458')
(98, '03/23/2020 12:46:00 1584938760 1.98 35075 458')
(99, '03/23/2020 14:45:00 1584945900 1.98 35179 459')
(100, '03/23/2020 16:45:00 1584953100 2.0 40773 479')
(101, '03/23/2020 18:46:00 1584960360 2.02 41569 504')
(102, '03/23/2020 20:47:00 1584967620 2.02 42443 517')
(103, '03/23/2020 22:31:00 1584973860 1.73 43449 545')
(104, '03/24/2020 00:47:00 1584982020 2.27 43718 552')
(105, '03/24/2020 02:33:00 1584988380 1.77 43734 553')
(106, '03/24/2020 04:46:00 1584996360 2.22 46145 582')
(107, '03/24/2020 06:43:00 1585003380 1.95 46145 582')
(108, '03/24/2020 08:48:00 1585010880 2.08 46145 582')
(109, '03/24/2020 10:47:00 1585018020 1.98 46168 582')
(110, '03/24/2020 12:47:00 1585025220 2.0 46168 582')
(111, '03/24/2020 14:47:00 1585032420 2.0 46274 588')
(112, '03/24/2020 16:47:00 1585039620 2.0 49594 622')
(113, '03/24/2020 18:45:00 1585046700 1.97 50982 655')
(114, '03/24/2020 20:42:00 1585053720 1.95 52921 684')
(115, '03/24/2020 22:48:00 1585061280 2.1 53205 687')
(116, '03/25/2020 00:29:00 1585067340 1.68 53655 698')
(117, '03/25/2020 02:44:00 1585075440 2.25 54823 778')
(118, '03/25/2020 04:46:00 1585082760 2.03 54867 782')
(119, '03/25/2020 06:47:00 1585090020 2.02 54916 784')
(120, '03/25/2020 08:48:00 1585097280 2.02 54935 784')
(121, '03/25/2020 10:43:00 1585104180 1.92 54941 784')
(122, '03/25/2020 12:48:00 1585111680 2.08 54979 785')
(123, '03/25/2020 14:48:00 1585118880 2.0 55081 785')
(124, '03/25/2020 16:48:00 1585126080 2.0 60642 817')
(125, '03/25/2020 18:48:00 1585133280 2.0 62364 878')
(126, '03/25/2020 20:33:00 1585139580 1.75 64765 910')
(127, '03/25/2020 22:44:00 1585147440 2.18 65527 928')
(128, '03/26/2020 00:34:00 1585154040 1.83 65797 935')
(129, '03/26/2020 02:43:00 1585161780 2.15 66741 963')
(130, '03/26/2020 05:24:00 1585171440 2.68 68472 1032')
(131, '03/26/2020 07:03:00 1585177380 1.65 68489 1032')
(132, '03/26/2020 09:02:00 1585184520 1.98 68489 1032')
(133, '03/26/2020 11:02:00 1585191720 2.0 68581 1036')
(134, '03/26/2020 13:01:00 1585198860 1.98 68594 1036')
(135, '03/26/2020 14:52:00 1585205520 1.85 68905 1037')
(136, '03/26/2020 17:02:00 1585213320 2.17 75069 1080')
(137, '03/26/2020 19:00:00 1585220400 1.97 79082 1143')
(138, '03/26/2020 21:01:00 1585227660 2.02 81946 1177')
(139, '03/26/2020 23:02:00 1585234920 2.02 83206 1201')
(140, '03/27/2020 01:00:00 1585242000 1.97 85280 1293')
(141, '03/27/2020 03:01:00 1585249260 2.02 85520 1297')
(142, '03/27/2020 04:36:00 1585254960 1.58 85594 1300')
(143, '03/27/2020 07:33:00 1585265580 2.95 85612 1301')
(144, '03/27/2020 09:32:00 1585272720 1.98 85612 1301')
(145, '03/27/2020 11:31:00 1585279860 1.98 85749 1304')
(146, '03/27/2020 13:32:00 1585287120 2.02 85755 1304')
(147, '03/27/2020 15:33:00 1585294380 2.02 86548 1321')
(148, '03/27/2020 17:32:00 1585301520 1.98 94425 1429')
(149, '03/27/2020 19:33:00 1585308780 2.02 98180 1513')
(150, '03/27/2020 21:33:00 1585315980 2.0 100514 1546')
(151, '03/27/2020 23:33:00 1585323180 2.0 102325 1591')
(152, '03/28/2020 01:32:00 1585330320 1.98 104126 1692')
(153, '03/28/2020 03:34:00 1585337640 2.03 104205 1704')
(154, '03/28/2020 05:35:00 1585344900 2.02 104205 1704')
(155, '03/28/2020 07:35:00 1585352100 2.0 104256 1704')
(156, '03/28/2020 09:35:00 1585359300 2.0 104256 1704')
(157, '03/28/2020 11:40:00 1585366800 2.08 104256 1704')
(158, '03/28/2020 13:36:00 1585373760 1.93 104277 1704')
(159, '03/28/2020 15:45:00 1585381500 2.15 105726 1730')
(160, '03/28/2020 17:45:00 1585388700 2.0 116050 1937')
(161, '03/28/2020 19:43:00 1585395780 1.97 118592 1979')
(162, '03/28/2020 21:44:00 1585403040 2.02 120204 1997')
(163, '03/28/2020 23:43:00 1585410180 1.98 123311 2211')
(164, '03/29/2020 01:46:00 1585417560 2.05 123578 2221')

In [564]:
#19429 confirmed cases and 257

.01788*19429

Out[564]:
347.39052
In [565]:
# When working with mortality a history must be involved.
print ("example: 18876 237")

print (237/18876)
print (237/14366)

example: 18876 237
0.012555626191989829
0.016497285256856467

In [566]:
(60, '03/20/2020 14:10:00 1584684600 1.98 14373 218')
(61, '03/20/2020 16:11:00 1584691860 2.02 16067 219')
(62, '03/20/2020 18:12:00 1584699120 2.02 16545 225')
(63, '03/20/2020 20:12:00 1584706320 2.0 18121 233')
(64, '03/20/2020 22:12:00 1584713520 2.0 18876 237')

Out[566]:
(64, '03/20/2020 22:12:00 1584713520 2.0 18876 237')
In [567]:
Sample='''
0 :  03/08/2020 23:30:00 1583681400 5.56 537 21
1 :  03/09/2020 04:30:00 1583699400 5.0 589 22
2 :  03/10/2020 05:30:00 1583789400 25.0 708 27
3 :  03/10/2020 23:35:00 1583854500 18.08 975 30
4 :  03/11/2020 04:25:00 1583871900 4.83 1010 31

5 :  03/11/2020 15:17:00 1583911020 10.87 1016 31
6 :  03/11/2020 23:35:00 1583940900 8.3 1301 38
7 :  03/12/2020 03:25:00 1583954700 3.83 1327 38
8 :  03/12/2020 11:37:00 1583984220 8.2 1336 38
9 :  03/12/2020 22:00:00 1584021600 10.38 1639 40
10 :  03/13/2020 00:05:00 1584029100 2.08 1715 41

11 :  03/13/2020 01:35:00 1584034500 1.5 1725 41
12 :  03/13/2020 03:45:00 1584042300 2.17 1747 41
13 :  03/13/2020 06:00:00 1584050400 2.25 1762 41
14 :  03/13/2020 15:25:00 1584084300 9.42 1832 41
15 :  03/13/2020 22:25:00 1584109500 7.0 2269 48
'''

In [568]:
print (233/14366)
print (233/14366)

0.016218850062647918
0.016218850062647918

In [569]:
import datetime
import calendar
import time
from M2D import *
import sqlite3
arrangedDdata = ''
arrangedDdata=arrangedDdata #+"Date, Time, Cases, Deaths, Timestamp, TimeBetweenSamples\n"
c= conn.cursor()
for row in c.execute('SELECT rowid,* from CORONA'):
row =str(row)
row=row.replace(",","")
row = row.split(" ")
#print (row)
#print (row[1],row[2],row[3],row[5],row[10],row[14])
Month = row[1]
#print (Month[1:])
month = Month2Num(Month[1:])
#print (month)
OUT = row[2]+"/"+month+"/"+row[3]+" "+row[5]+":00 "+row[10]+" "+row[14]
# Result 03/12/2020 03:25:00 1327 38
#print (OUT)
arrangedDdata = arrangedDdata+OUT+"\n"
conn.close()

text =arrangedDdata.split("\n")
#text= text[1:-1]
EPOCHa=[]
Scnt=0
SPANS = []
for line in text:
line = line.split(" ")
#print (line[1],line[2],line[3])
if len(line)>2:dt = time.strftime(line[0]+' '+line[1])
#print (dt)

dt_ti = dt
#print (dt_ti)
#03-16-2020 02:48,3777
pattern = '%d/%m/%Y %H:%M:%S'
#pattern = '%m/%d/%Y %H:%M:%S'
epochs = int(time.mktime(time.strptime(dt_ti, pattern)))
#print (dt_ti, epochs)

if Scnt>1:SPANS.append(span(int(last),int(epochs)))
if Scnt==0:last=1583661400
SPan = span(int(last),int(epochs))
data = dt_ti+" "+str(epochs)+" "+str(SPan)

entry = str(data)
Scnt=Scnt+1

last = int(epochs)
#print (span(int(last),int(epochs)))
EPOCHa.append(data)

for lines in EPOCHa:
print (lines)

#08/03/2020 23:30:00 1583681400 -274.68
#09/03/2020 04:30:00 1583699400 5.0

08/03/2020 23:30:00 1583681400 5.56
09/03/2020 04:30:00 1583699400 5.0
10/03/2020 05:30:00 1583789400 25.0
10/03/2020 23:35:00 1583854500 18.08
11/03/2020 04:25:00 1583871900 4.83
11/03/2020 15:17:00 1583911020 10.87
11/03/2020 23:35:00 1583940900 8.3
12/03/2020 03:25:00 1583954700 3.83
12/03/2020 11:37:00 1583984220 8.2
12/03/2020 22:00:00 1584021600 10.38
13/03/2020 00:05:00 1584029100 2.08
13/03/2020 01:35:00 1584034500 1.5
13/03/2020 03:45:00 1584042300 2.17
13/03/2020 06:00:00 1584050400 2.25
13/03/2020 15:25:00 1584084300 9.42
13/03/2020 22:25:00 1584109500 7.0
14/03/2020 02:40:00 1584124800 4.25
14/03/2020 07:14:00 1584141240 4.57
14/03/2020 16:45:00 1584175500 9.52
14/03/2020 23:03:00 1584198180 6.3
15/03/2020 05:00:00 1584219600 5.95
15/03/2020 05:40:00 1584222000 0.67
15/03/2020 07:05:00 1584227100 1.42
15/03/2020 19:00:00 1584270000 11.92
15/03/2020 20:05:00 1584273900 1.08
15/03/2020 21:15:00 1584278100 1.17
15/03/2020 22:15:00 1584281700 1.0
16/03/2020 00:35:00 1584290100 2.33
16/03/2020 02:48:00 1584298080 2.22
16/03/2020 05:36:00 1584308160 2.8
16/03/2020 08:29:00 1584318540 2.88
16/03/2020 18:40:00 1584355200 10.18
16/03/2020 22:40:00 1584369600 4.0
17/03/2020 00:45:00 1584377100 2.08
17/03/2020 02:40:00 1584384000 1.92
17/03/2020 06:35:00 1584398100 3.92
17/03/2020 10:31:00 1584412260 3.93
17/03/2020 14:38:00 1584427080 4.12
17/03/2020 18:41:00 1584441660 4.05
17/03/2020 21:55:00 1584453300 3.23
17/03/2020 22:40:00 1584456000 0.75
18/03/2020 02:20:00 1584469200 3.67
18/03/2020 06:05:00 1584482700 3.75
18/03/2020 10:10:00 1584497400 4.08
18/03/2020 16:15:00 1584519300 6.08
18/03/2020 18:16:00 1584526560 2.02
18/03/2020 20:21:00 1584534060 2.08
18/03/2020 22:10:00 1584540600 1.82
19/03/2020 02:17:00 1584555420 4.12
19/03/2020 10:16:00 1584584160 7.98
19/03/2020 12:18:00 1584591480 2.03
19/03/2020 14:15:00 1584598500 1.95
19/03/2020 16:22:00 1584606120 2.12
19/03/2020 18:17:00 1584613020 1.92
19/03/2020 22:45:00 1584629100 4.47
20/03/2020 00:48:00 1584636480 2.05
20/03/2020 02:40:00 1584643200 1.87
20/03/2020 04:34:00 1584650040 1.9
20/03/2020 06:35:00 1584657300 2.02
20/03/2020 08:10:00 1584663000 1.58
20/03/2020 10:11:00 1584670260 2.02
20/03/2020 12:11:00 1584677460 2.0
20/03/2020 14:10:00 1584684600 1.98
20/03/2020 16:11:00 1584691860 2.02
20/03/2020 18:12:00 1584699120 2.02
20/03/2020 20:12:00 1584706320 2.0
20/03/2020 22:12:00 1584713520 2.0
21/03/2020 00:06:00 1584720360 1.9
21/03/2020 02:07:00 1584727620 2.02
21/03/2020 04:08:00 1584734880 2.02
21/03/2020 06:05:00 1584741900 1.95
21/03/2020 08:10:00 1584749400 2.08
21/03/2020 10:12:00 1584756720 2.03
21/03/2020 12:46:00 1584765960 2.57
21/03/2020 14:48:00 1584773280 2.03
21/03/2020 16:48:00 1584780480 2.0
21/03/2020 18:45:00 1584787500 1.95
21/03/2020 20:45:00 1584794700 2.0
21/03/2020 22:45:00 1584801900 2.0
22/03/2020 00:40:00 1584808800 1.92
22/03/2020 02:40:00 1584816000 2.0
22/03/2020 04:45:00 1584823500 2.08
22/03/2020 06:30:00 1584829800 1.75
22/03/2020 08:45:00 1584837900 2.25
22/03/2020 10:45:00 1584845100 2.0
22/03/2020 12:48:00 1584852480 2.05
22/03/2020 14:45:00 1584859500 1.95
22/03/2020 16:42:00 1584866520 1.95
22/03/2020 18:48:00 1584874080 2.1
22/03/2020 20:44:00 1584881040 1.93
22/03/2020 21:41:00 1584884460 0.95
23/03/2020 00:44:00 1584895440 3.05
23/03/2020 02:37:00 1584902220 1.88
23/03/2020 03:55:00 1584906900 1.3
23/03/2020 06:45:00 1584917100 2.83
23/03/2020 08:47:00 1584924420 2.03
23/03/2020 10:47:00 1584931620 2.0
23/03/2020 12:46:00 1584938760 1.98
23/03/2020 14:45:00 1584945900 1.98
23/03/2020 16:45:00 1584953100 2.0
23/03/2020 18:46:00 1584960360 2.02
23/03/2020 20:47:00 1584967620 2.02
23/03/2020 22:31:00 1584973860 1.73
24/03/2020 00:47:00 1584982020 2.27
24/03/2020 02:33:00 1584988380 1.77
24/03/2020 04:46:00 1584996360 2.22
24/03/2020 06:43:00 1585003380 1.95
24/03/2020 08:48:00 1585010880 2.08
24/03/2020 10:47:00 1585018020 1.98
24/03/2020 12:47:00 1585025220 2.0
24/03/2020 14:47:00 1585032420 2.0
24/03/2020 16:47:00 1585039620 2.0
24/03/2020 18:45:00 1585046700 1.97
24/03/2020 20:42:00 1585053720 1.95
24/03/2020 22:48:00 1585061280 2.1
25/03/2020 00:29:00 1585067340 1.68
25/03/2020 02:44:00 1585075440 2.25
25/03/2020 04:46:00 1585082760 2.03
25/03/2020 06:47:00 1585090020 2.02
25/03/2020 08:48:00 1585097280 2.02
25/03/2020 10:43:00 1585104180 1.92
25/03/2020 12:48:00 1585111680 2.08
25/03/2020 14:48:00 1585118880 2.0
25/03/2020 16:48:00 1585126080 2.0
25/03/2020 18:48:00 1585133280 2.0
25/03/2020 20:33:00 1585139580 1.75
25/03/2020 22:44:00 1585147440 2.18
26/03/2020 00:34:00 1585154040 1.83
26/03/2020 02:43:00 1585161780 2.15
26/03/2020 05:24:00 1585171440 2.68
26/03/2020 07:03:00 1585177380 1.65
26/03/2020 09:02:00 1585184520 1.98
26/03/2020 11:02:00 1585191720 2.0
26/03/2020 13:01:00 1585198860 1.98
26/03/2020 14:52:00 1585205520 1.85
26/03/2020 17:02:00 1585213320 2.17
26/03/2020 19:00:00 1585220400 1.97
26/03/2020 21:01:00 1585227660 2.02
26/03/2020 23:02:00 1585234920 2.02
27/03/2020 01:00:00 1585242000 1.97
27/03/2020 03:01:00 1585249260 2.02
27/03/2020 04:36:00 1585254960 1.58
27/03/2020 07:33:00 1585265580 2.95
27/03/2020 09:32:00 1585272720 1.98
27/03/2020 11:31:00 1585279860 1.98
27/03/2020 13:32:00 1585287120 2.02
27/03/2020 15:33:00 1585294380 2.02
27/03/2020 17:32:00 1585301520 1.98
27/03/2020 19:33:00 1585308780 2.02
27/03/2020 21:33:00 1585315980 2.0
27/03/2020 23:33:00 1585323180 2.0
28/03/2020 01:32:00 1585330320 1.98
28/03/2020 03:34:00 1585337640 2.03
28/03/2020 05:35:00 1585344900 2.02
28/03/2020 07:35:00 1585352100 2.0
28/03/2020 09:35:00 1585359300 2.0
28/03/2020 11:40:00 1585366800 2.08
28/03/2020 13:36:00 1585373760 1.93
28/03/2020 15:45:00 1585381500 2.15
28/03/2020 17:45:00 1585388700 2.0
28/03/2020 19:43:00 1585395780 1.97
28/03/2020 21:44:00 1585403040 2.02
28/03/2020 23:43:00 1585410180 1.98
29/03/2020 01:46:00 1585417560 2.05
29/03/2020 01:46:00 1585417560 0.0

In [570]:
import datetime
import calendar
import time
from M2D import *
# 3,13,2020,03:45,GMT,1747,41
text =arrangedDdata.split("\n")
text= text[1:-1]
print (text)

['09/03/2020 04:30:00 589 22', '10/03/2020 05:30:00 708 27', '10/03/2020 23:35:00 975 30', '11/03/2020 04:25:00 1010 31', '11/03/2020 15:17:00 1016 31', '11/03/2020 23:35:00 1301 38', '12/03/2020 03:25:00 1327 38', '12/03/2020 11:37:00 1336 38', '12/03/2020 22:00:00 1639 40', '13/03/2020 00:05:00 1715 41', '13/03/2020 01:35:00 1725 41', '13/03/2020 03:45:00 1747 41', '13/03/2020 06:00:00 1762 41', '13/03/2020 15:25:00 1832 41', '13/03/2020 22:25:00 2269 48', '14/03/2020 02:40:00 2291 50', '14/03/2020 07:14:00 2319 50', '14/03/2020 16:45:00 2499 51', '14/03/2020 23:03:00 2836 57', '15/03/2020 05:00:00 2982 60', '15/03/2020 05:40:00 2995 60', '15/03/2020 07:05:00 3043 60', '15/03/2020 19:00:00 3329 63', '15/03/2020 20:05:00 3400 63', '15/03/2020 21:15:00 3621 63', '15/03/2020 22:15:00 3502 63', '16/03/2020 00:35:00 3714 68', '16/03/2020 02:48:00 3777 69', '16/03/2020 05:36:00 3782 69', '16/03/2020 08:29:00 3802 69', '16/03/2020 18:40:00 4186 73', '16/03/2020 22:40:00 4597 86', '17/03/2020 00:45:00 4667 87', '17/03/2020 02:40:00 4704 91', '17/03/2020 06:35:00 4727 93', '17/03/2020 10:31:00 4743 93', '17/03/2020 14:38:00 4752 93', '17/03/2020 18:41:00 5723 97', '17/03/2020 21:55:00 6211 102', '17/03/2020 22:40:00 6349 106', '18/03/2020 02:20:00 6499 112', '18/03/2020 06:05:00 6522 116', '18/03/2020 10:10:00 6524 116', '18/03/2020 16:15:00 7601 116', '18/03/2020 18:16:00 7708 120', '18/03/2020 20:21:00 8710 132', '18/03/2020 22:10:00 8998 150', '19/03/2020 02:17:00 9371 153', '19/03/2020 10:16:00 9464 155', '19/03/2020 12:18:00 9473 155', '19/03/2020 14:15:00 9486 157', '19/03/2020 16:22:00 10692 160', '19/03/2020 18:17:00 11355 171', '19/03/2020 22:45:00 13737 201', '20/03/2020 00:48:00 13865 211', '20/03/2020 02:40:00 14316 218', '20/03/2020 04:34:00 14336 218', '20/03/2020 06:35:00 14366 217', '20/03/2020 08:10:00 14366 217', '20/03/2020 10:11:00 14366 217', '20/03/2020 12:11:00 14366 217', '20/03/2020 14:10:00 14373 218', '20/03/2020 16:11:00 16067 219', '20/03/2020 18:12:00 16545 225', '20/03/2020 20:12:00 18121 233', '20/03/2020 22:12:00 18876 237', '21/03/2020 00:06:00 19393 256', '21/03/2020 02:07:00 19643 263', '21/03/2020 04:08:00 19652 264', '21/03/2020 06:05:00 19774 275', '21/03/2020 08:10:00 19774 275', '21/03/2020 10:12:00 19774 275', '21/03/2020 12:46:00 19775 276', '21/03/2020 14:48:00 19823 276', '21/03/2020 16:48:00 22085 282', '21/03/2020 18:45:00 22813 288', '21/03/2020 20:45:00 24142 288', '21/03/2020 22:45:00 23940 301', '22/03/2020 00:40:00 26111 324', '22/03/2020 02:40:00 26711 341', '22/03/2020 04:45:00 26867 348', '22/03/2020 06:30:00 26892 348', '22/03/2020 08:45:00 26892 348', '22/03/2020 10:45:00 26900 348', '22/03/2020 12:48:00 26905 348', '22/03/2020 14:45:00 27031 349', '22/03/2020 16:42:00 30239 388', '22/03/2020 18:48:00 38757 400', '22/03/2020 20:44:00 32356 414', '22/03/2020 21:41:00 32356 414', '23/03/2020 00:44:00 33346 414', '23/03/2020 02:37:00 33546 419', '23/03/2020 03:55:00 34717 452', '23/03/2020 06:45:00 35060 457', '23/03/2020 08:47:00 35070 458', '23/03/2020 10:47:00 35070 458', '23/03/2020 12:46:00 35075 458', '23/03/2020 14:45:00 35179 459', '23/03/2020 16:45:00 40773 479', '23/03/2020 18:46:00 41569 504', '23/03/2020 20:47:00 42443 517', '23/03/2020 22:31:00 43449 545', '24/03/2020 00:47:00 43718 552', '24/03/2020 02:33:00 43734 553', '24/03/2020 04:46:00 46145 582', '24/03/2020 06:43:00 46145 582', '24/03/2020 08:48:00 46145 582', '24/03/2020 10:47:00 46168 582', '24/03/2020 12:47:00 46168 582', '24/03/2020 14:47:00 46274 588', '24/03/2020 16:47:00 49594 622', '24/03/2020 18:45:00 50982 655', '24/03/2020 20:42:00 52921 684', '24/03/2020 22:48:00 53205 687', '25/03/2020 00:29:00 53655 698', '25/03/2020 02:44:00 54823 778', '25/03/2020 04:46:00 54867 782', '25/03/2020 06:47:00 54916 784', '25/03/2020 08:48:00 54935 784', '25/03/2020 10:43:00 54941 784', '25/03/2020 12:48:00 54979 785', '25/03/2020 14:48:00 55081 785', '25/03/2020 16:48:00 60642 817', '25/03/2020 18:48:00 62364 878', '25/03/2020 20:33:00 64765 910', '25/03/2020 22:44:00 65527 928', '26/03/2020 00:34:00 65797 935', '26/03/2020 02:43:00 66741 963', '26/03/2020 05:24:00 68472 1032', '26/03/2020 07:03:00 68489 1032', '26/03/2020 09:02:00 68489 1032', '26/03/2020 11:02:00 68581 1036', '26/03/2020 13:01:00 68594 1036', '26/03/2020 14:52:00 68905 1037', '26/03/2020 17:02:00 75069 1080', '26/03/2020 19:00:00 79082 1143', '26/03/2020 21:01:00 81946 1177', '26/03/2020 23:02:00 83206 1201', '27/03/2020 01:00:00 85280 1293', '27/03/2020 03:01:00 85520 1297', '27/03/2020 04:36:00 85594 1300', '27/03/2020 07:33:00 85612 1301', '27/03/2020 09:32:00 85612 1301', '27/03/2020 11:31:00 85749 1304', '27/03/2020 13:32:00 85755 1304', '27/03/2020 15:33:00 86548 1321', '27/03/2020 17:32:00 94425 1429', '27/03/2020 19:33:00 98180 1513', '27/03/2020 21:33:00 100514 1546', '27/03/2020 23:33:00 102325 1591', '28/03/2020 01:32:00 104126 1692', '28/03/2020 03:34:00 104205 1704', '28/03/2020 05:35:00 104205 1704', '28/03/2020 07:35:00 104256 1704', '28/03/2020 09:35:00 104256 1704', '28/03/2020 11:40:00 104256 1704', '28/03/2020 13:36:00 104277 1704', '28/03/2020 15:45:00 105726 1730', '28/03/2020 17:45:00 116050 1937', '28/03/2020 19:43:00 118592 1979', '28/03/2020 21:44:00 120204 1997', '28/03/2020 23:43:00 123311 2211', '29/03/2020 01:46:00 123578 2221']

In [571]:
import datetime
import calendar
import time
from M2D import *
# 3,13,2020,03:45,GMT,1747,41
text =arrangedDdata.split("\n")
text= text[1:-1]
EPOCHa=[]
Scnt=0
DEATHS = []
ALLdata=[]
EPOCHS = []
SPANS = []
for line in text:
#print("line",line)
#line=str(LINE)
line = line.split(" ")
CnD = ("split",line[2],line[3])
#print (str(line[1]+'/'+line[0]+'/'+line[2][:-3]))
dt = time.strftime(line[0]+' '+line[1])#+' '+line[2][:-3])
#print ("dt",dt)

dt_ti = dt
#print (dt_ti)
#03-16-2020 02:48,3777
pattern = '%d/%m/%Y %H:%M:%S'
#pattern = '%m/%d/%Y %H:%M:%S'
epochs = int(time.mktime(time.strptime(dt_ti, pattern)))
#print ("dt_ti, epochs",dt_ti, epochs)

#if Scnt>1:print (dt_ti, epochs)
if Scnt>1:SPANS.append(span(int(last),int(epochs)))
if Scnt==0:last=1583661400
#print (dt_ti, epochs,span(int(last),int(epochs)),line[2],line[3])
EPOCHS.append(int(epochs))
ad = dt_ti, epochs,span(int(last),int(epochs)),line[2],line[3]
DEATHS.append(line[3])
#print ("AS",AS)
#ALLdata.append(dt_ti+","+str(epochs)+","+str(span(int(last),int(epochs)))+","+str(line[2])+","+str(line[3]))
ALLdata.append(AS)
Scnt=Scnt+1

last = int(epochs)
#print (span(int(last),int(epochs)))
EPOCHa.append(str(epochs))

print (SPANS,"\n")
print("\n------------------------------------------------------------\n")
print (ALLdata,"\n")
print("\n------------------------------------------------------------\n")
print (EPOCHS,"\n")

[18.08, 4.83, 10.87, 8.3, 3.83, 8.2, 10.38, 2.08, 1.5, 2.17, 2.25, 9.42, 7.0, 4.25, 4.57, 9.52, 6.3, 5.95, 0.67, 1.42, 11.92, 1.08, 1.17, 1.0, 2.33, 2.22, 2.8, 2.88, 10.18, 4.0, 2.08, 1.92, 3.92, 3.93, 4.12, 4.05, 3.23, 0.75, 3.67, 3.75, 4.08, 6.08, 2.02, 2.08, 1.82, 4.12, 7.98, 2.03, 1.95, 2.12, 1.92, 4.47, 2.05, 1.87, 1.9, 2.02, 1.58, 2.02, 2.0, 1.98, 2.02, 2.02, 2.0, 2.0, 1.9, 2.02, 2.02, 1.95, 2.08, 2.03, 2.57, 2.03, 2.0, 1.95, 2.0, 2.0, 1.92, 2.0, 2.08, 1.75, 2.25, 2.0, 2.05, 1.95, 1.95, 2.1, 1.93, 0.95, 3.05, 1.88, 1.3, 2.83, 2.03, 2.0, 1.98, 1.98, 2.0, 2.02, 2.02, 1.73, 2.27, 1.77, 2.22, 1.95, 2.08, 1.98, 2.0, 2.0, 2.0, 1.97, 1.95, 2.1, 1.68, 2.25, 2.03, 2.02, 2.02, 1.92, 2.08, 2.0, 2.0, 2.0, 1.75, 2.18, 1.83, 2.15, 2.68, 1.65, 1.98, 2.0, 1.98, 1.85, 2.17, 1.97, 2.02, 2.02, 1.97, 2.02, 1.58, 2.95, 1.98, 1.98, 2.02, 2.02, 1.98, 2.02, 2.0, 2.0, 1.98, 2.03, 2.02, 2.0, 2.0, 2.08, 1.93, 2.15, 2.0, 1.97, 2.02, 1.98, 2.05]

------------------------------------------------------------

["('09/03/2020 04:30:00', 1583699400, 10.56, '589', '22')", "('10/03/2020 05:30:00', 1583789400, 25.0, '708', '27')", "('10/03/2020 23:35:00', 1583854500, 18.08, '975', '30')", "('11/03/2020 04:25:00', 1583871900, 4.83, '1010', '31')", "('11/03/2020 15:17:00', 1583911020, 10.87, '1016', '31')", "('11/03/2020 23:35:00', 1583940900, 8.3, '1301', '38')", "('12/03/2020 03:25:00', 1583954700, 3.83, '1327', '38')", "('12/03/2020 11:37:00', 1583984220, 8.2, '1336', '38')", "('12/03/2020 22:00:00', 1584021600, 10.38, '1639', '40')", "('13/03/2020 00:05:00', 1584029100, 2.08, '1715', '41')", "('13/03/2020 01:35:00', 1584034500, 1.5, '1725', '41')", "('13/03/2020 03:45:00', 1584042300, 2.17, '1747', '41')", "('13/03/2020 06:00:00', 1584050400, 2.25, '1762', '41')", "('13/03/2020 15:25:00', 1584084300, 9.42, '1832', '41')", "('13/03/2020 22:25:00', 1584109500, 7.0, '2269', '48')", "('14/03/2020 02:40:00', 1584124800, 4.25, '2291', '50')", "('14/03/2020 07:14:00', 1584141240, 4.57, '2319', '50')", "('14/03/2020 16:45:00', 1584175500, 9.52, '2499', '51')", "('14/03/2020 23:03:00', 1584198180, 6.3, '2836', '57')", "('15/03/2020 05:00:00', 1584219600, 5.95, '2982', '60')", "('15/03/2020 05:40:00', 1584222000, 0.67, '2995', '60')", "('15/03/2020 07:05:00', 1584227100, 1.42, '3043', '60')", "('15/03/2020 19:00:00', 1584270000, 11.92, '3329', '63')", "('15/03/2020 20:05:00', 1584273900, 1.08, '3400', '63')", "('15/03/2020 21:15:00', 1584278100, 1.17, '3621', '63')", "('15/03/2020 22:15:00', 1584281700, 1.0, '3502', '63')", "('16/03/2020 00:35:00', 1584290100, 2.33, '3714', '68')", "('16/03/2020 02:48:00', 1584298080, 2.22, '3777', '69')", "('16/03/2020 05:36:00', 1584308160, 2.8, '3782', '69')", "('16/03/2020 08:29:00', 1584318540, 2.88, '3802', '69')", "('16/03/2020 18:40:00', 1584355200, 10.18, '4186', '73')", "('16/03/2020 22:40:00', 1584369600, 4.0, '4597', '86')", "('17/03/2020 00:45:00', 1584377100, 2.08, '4667', '87')", "('17/03/2020 02:40:00', 1584384000, 1.92, '4704', '91')", "('17/03/2020 06:35:00', 1584398100, 3.92, '4727', '93')", "('17/03/2020 10:31:00', 1584412260, 3.93, '4743', '93')", "('17/03/2020 14:38:00', 1584427080, 4.12, '4752', '93')", "('17/03/2020 18:41:00', 1584441660, 4.05, '5723', '97')", "('17/03/2020 21:55:00', 1584453300, 3.23, '6211', '102')", "('17/03/2020 22:40:00', 1584456000, 0.75, '6349', '106')", "('18/03/2020 02:20:00', 1584469200, 3.67, '6499', '112')", "('18/03/2020 06:05:00', 1584482700, 3.75, '6522', '116')", "('18/03/2020 10:10:00', 1584497400, 4.08, '6524', '116')", "('18/03/2020 16:15:00', 1584519300, 6.08, '7601', '116')", "('18/03/2020 18:16:00', 1584526560, 2.02, '7708', '120')", "('18/03/2020 20:21:00', 1584534060, 2.08, '8710', '132')", "('18/03/2020 22:10:00', 1584540600, 1.82, '8998', '150')", "('19/03/2020 02:17:00', 1584555420, 4.12, '9371', '153')", "('19/03/2020 10:16:00', 1584584160, 7.98, '9464', '155')", "('19/03/2020 12:18:00', 1584591480, 2.03, '9473', '155')", "('19/03/2020 14:15:00', 1584598500, 1.95, '9486', '157')", "('19/03/2020 16:22:00', 1584606120, 2.12, '10692', '160')", "('19/03/2020 18:17:00', 1584613020, 1.92, '11355', '171')", "('19/03/2020 22:45:00', 1584629100, 4.47, '13737', '201')", "('20/03/2020 00:48:00', 1584636480, 2.05, '13865', '211')", "('20/03/2020 02:40:00', 1584643200, 1.87, '14316', '218')", "('20/03/2020 04:34:00', 1584650040, 1.9, '14336', '218')", "('20/03/2020 06:35:00', 1584657300, 2.02, '14366', '217')", "('20/03/2020 08:10:00', 1584663000, 1.58, '14366', '217')", "('20/03/2020 10:11:00', 1584670260, 2.02, '14366', '217')", "('20/03/2020 12:11:00', 1584677460, 2.0, '14366', '217')", "('20/03/2020 14:10:00', 1584684600, 1.98, '14373', '218')", "('20/03/2020 16:11:00', 1584691860, 2.02, '16067', '219')", "('20/03/2020 18:12:00', 1584699120, 2.02, '16545', '225')", "('20/03/2020 20:12:00', 1584706320, 2.0, '18121', '233')", "('20/03/2020 22:12:00', 1584713520, 2.0, '18876', '237')", "('21/03/2020 00:06:00', 1584720360, 1.9, '19393', '256')", "('21/03/2020 02:07:00', 1584727620, 2.02, '19643', '263')", "('21/03/2020 04:08:00', 1584734880, 2.02, '19652', '264')", "('21/03/2020 06:05:00', 1584741900, 1.95, '19774', '275')", "('21/03/2020 08:10:00', 1584749400, 2.08, '19774', '275')", "('21/03/2020 10:12:00', 1584756720, 2.03, '19774', '275')", "('21/03/2020 12:46:00', 1584765960, 2.57, '19775', '276')", "('21/03/2020 14:48:00', 1584773280, 2.03, '19823', '276')", "('21/03/2020 16:48:00', 1584780480, 2.0, '22085', '282')", "('21/03/2020 18:45:00', 1584787500, 1.95, '22813', '288')", "('21/03/2020 20:45:00', 1584794700, 2.0, '24142', '288')", "('21/03/2020 22:45:00', 1584801900, 2.0, '23940', '301')", "('22/03/2020 00:40:00', 1584808800, 1.92, '26111', '324')", "('22/03/2020 02:40:00', 1584816000, 2.0, '26711', '341')", "('22/03/2020 04:45:00', 1584823500, 2.08, '26867', '348')", "('22/03/2020 06:30:00', 1584829800, 1.75, '26892', '348')", "('22/03/2020 08:45:00', 1584837900, 2.25, '26892', '348')", "('22/03/2020 10:45:00', 1584845100, 2.0, '26900', '348')", "('22/03/2020 12:48:00', 1584852480, 2.05, '26905', '348')", "('22/03/2020 14:45:00', 1584859500, 1.95, '27031', '349')", "('22/03/2020 16:42:00', 1584866520, 1.95, '30239', '388')", "('22/03/2020 18:48:00', 1584874080, 2.1, '38757', '400')", "('22/03/2020 20:44:00', 1584881040, 1.93, '32356', '414')", "('22/03/2020 21:41:00', 1584884460, 0.95, '32356', '414')", "('23/03/2020 00:44:00', 1584895440, 3.05, '33346', '414')", "('23/03/2020 02:37:00', 1584902220, 1.88, '33546', '419')", "('23/03/2020 03:55:00', 1584906900, 1.3, '34717', '452')", "('23/03/2020 06:45:00', 1584917100, 2.83, '35060', '457')", "('23/03/2020 08:47:00', 1584924420, 2.03, '35070', '458')", "('23/03/2020 10:47:00', 1584931620, 2.0, '35070', '458')", "('23/03/2020 12:46:00', 1584938760, 1.98, '35075', '458')", "('23/03/2020 14:45:00', 1584945900, 1.98, '35179', '459')", "('23/03/2020 16:45:00', 1584953100, 2.0, '40773', '479')", "('23/03/2020 18:46:00', 1584960360, 2.02, '41569', '504')", "('23/03/2020 20:47:00', 1584967620, 2.02, '42443', '517')", "('23/03/2020 22:31:00', 1584973860, 1.73, '43449', '545')", "('24/03/2020 00:47:00', 1584982020, 2.27, '43718', '552')", "('24/03/2020 02:33:00', 1584988380, 1.77, '43734', '553')", "('24/03/2020 04:46:00', 1584996360, 2.22, '46145', '582')", "('24/03/2020 06:43:00', 1585003380, 1.95, '46145', '582')", "('24/03/2020 08:48:00', 1585010880, 2.08, '46145', '582')", "('24/03/2020 10:47:00', 1585018020, 1.98, '46168', '582')", "('24/03/2020 12:47:00', 1585025220, 2.0, '46168', '582')", "('24/03/2020 14:47:00', 1585032420, 2.0, '46274', '588')", "('24/03/2020 16:47:00', 1585039620, 2.0, '49594', '622')", "('24/03/2020 18:45:00', 1585046700, 1.97, '50982', '655')", "('24/03/2020 20:42:00', 1585053720, 1.95, '52921', '684')", "('24/03/2020 22:48:00', 1585061280, 2.1, '53205', '687')", "('25/03/2020 00:29:00', 1585067340, 1.68, '53655', '698')", "('25/03/2020 02:44:00', 1585075440, 2.25, '54823', '778')", "('25/03/2020 04:46:00', 1585082760, 2.03, '54867', '782')", "('25/03/2020 06:47:00', 1585090020, 2.02, '54916', '784')", "('25/03/2020 08:48:00', 1585097280, 2.02, '54935', '784')", "('25/03/2020 10:43:00', 1585104180, 1.92, '54941', '784')", "('25/03/2020 12:48:00', 1585111680, 2.08, '54979', '785')", "('25/03/2020 14:48:00', 1585118880, 2.0, '55081', '785')", "('25/03/2020 16:48:00', 1585126080, 2.0, '60642', '817')", "('25/03/2020 18:48:00', 1585133280, 2.0, '62364', '878')", "('25/03/2020 20:33:00', 1585139580, 1.75, '64765', '910')", "('25/03/2020 22:44:00', 1585147440, 2.18, '65527', '928')", "('26/03/2020 00:34:00', 1585154040, 1.83, '65797', '935')", "('26/03/2020 02:43:00', 1585161780, 2.15, '66741', '963')", "('26/03/2020 05:24:00', 1585171440, 2.68, '68472', '1032')", "('26/03/2020 07:03:00', 1585177380, 1.65, '68489', '1032')", "('26/03/2020 09:02:00', 1585184520, 1.98, '68489', '1032')", "('26/03/2020 11:02:00', 1585191720, 2.0, '68581', '1036')", "('26/03/2020 13:01:00', 1585198860, 1.98, '68594', '1036')", "('26/03/2020 14:52:00', 1585205520, 1.85, '68905', '1037')", "('26/03/2020 17:02:00', 1585213320, 2.17, '75069', '1080')", "('26/03/2020 19:00:00', 1585220400, 1.97, '79082', '1143')", "('26/03/2020 21:01:00', 1585227660, 2.02, '81946', '1177')", "('26/03/2020 23:02:00', 1585234920, 2.02, '83206', '1201')", "('27/03/2020 01:00:00', 1585242000, 1.97, '85280', '1293')", "('27/03/2020 03:01:00', 1585249260, 2.02, '85520', '1297')", "('27/03/2020 04:36:00', 1585254960, 1.58, '85594', '1300')", "('27/03/2020 07:33:00', 1585265580, 2.95, '85612', '1301')", "('27/03/2020 09:32:00', 1585272720, 1.98, '85612', '1301')", "('27/03/2020 11:31:00', 1585279860, 1.98, '85749', '1304')", "('27/03/2020 13:32:00', 1585287120, 2.02, '85755', '1304')", "('27/03/2020 15:33:00', 1585294380, 2.02, '86548', '1321')", "('27/03/2020 17:32:00', 1585301520, 1.98, '94425', '1429')", "('27/03/2020 19:33:00', 1585308780, 2.02, '98180', '1513')", "('27/03/2020 21:33:00', 1585315980, 2.0, '100514', '1546')", "('27/03/2020 23:33:00', 1585323180, 2.0, '102325', '1591')", "('28/03/2020 01:32:00', 1585330320, 1.98, '104126', '1692')", "('28/03/2020 03:34:00', 1585337640, 2.03, '104205', '1704')", "('28/03/2020 05:35:00', 1585344900, 2.02, '104205', '1704')", "('28/03/2020 07:35:00', 1585352100, 2.0, '104256', '1704')", "('28/03/2020 09:35:00', 1585359300, 2.0, '104256', '1704')", "('28/03/2020 11:40:00', 1585366800, 2.08, '104256', '1704')", "('28/03/2020 13:36:00', 1585373760, 1.93, '104277', '1704')", "('28/03/2020 15:45:00', 1585381500, 2.15, '105726', '1730')", "('28/03/2020 17:45:00', 1585388700, 2.0, '116050', '1937')", "('28/03/2020 19:43:00', 1585395780, 1.97, '118592', '1979')", "('28/03/2020 21:44:00', 1585403040, 2.02, '120204', '1997')", "('28/03/2020 23:43:00', 1585410180, 1.98, '123311', '2211')", "('29/03/2020 01:46:00', 1585417560, 2.05, '123578', '2221')"]

------------------------------------------------------------

[1583699400, 1583789400, 1583854500, 1583871900, 1583911020, 1583940900, 1583954700, 1583984220, 1584021600, 1584029100, 1584034500, 1584042300, 1584050400, 1584084300, 1584109500, 1584124800, 1584141240, 1584175500, 1584198180, 1584219600, 1584222000, 1584227100, 1584270000, 1584273900, 1584278100, 1584281700, 1584290100, 1584298080, 1584308160, 1584318540, 1584355200, 1584369600, 1584377100, 1584384000, 1584398100, 1584412260, 1584427080, 1584441660, 1584453300, 1584456000, 1584469200, 1584482700, 1584497400, 1584519300, 1584526560, 1584534060, 1584540600, 1584555420, 1584584160, 1584591480, 1584598500, 1584606120, 1584613020, 1584629100, 1584636480, 1584643200, 1584650040, 1584657300, 1584663000, 1584670260, 1584677460, 1584684600, 1584691860, 1584699120, 1584706320, 1584713520, 1584720360, 1584727620, 1584734880, 1584741900, 1584749400, 1584756720, 1584765960, 1584773280, 1584780480, 1584787500, 1584794700, 1584801900, 1584808800, 1584816000, 1584823500, 1584829800, 1584837900, 1584845100, 1584852480, 1584859500, 1584866520, 1584874080, 1584881040, 1584884460, 1584895440, 1584902220, 1584906900, 1584917100, 1584924420, 1584931620, 1584938760, 1584945900, 1584953100, 1584960360, 1584967620, 1584973860, 1584982020, 1584988380, 1584996360, 1585003380, 1585010880, 1585018020, 1585025220, 1585032420, 1585039620, 1585046700, 1585053720, 1585061280, 1585067340, 1585075440, 1585082760, 1585090020, 1585097280, 1585104180, 1585111680, 1585118880, 1585126080, 1585133280, 1585139580, 1585147440, 1585154040, 1585161780, 1585171440, 1585177380, 1585184520, 1585191720, 1585198860, 1585205520, 1585213320, 1585220400, 1585227660, 1585234920, 1585242000, 1585249260, 1585254960, 1585265580, 1585272720, 1585279860, 1585287120, 1585294380, 1585301520, 1585308780, 1585315980, 1585323180, 1585330320, 1585337640, 1585344900, 1585352100, 1585359300, 1585366800, 1585373760, 1585381500, 1585388700, 1585395780, 1585403040, 1585410180, 1585417560]


In [572]:
n = ALLdata

print("There are {0} items".format(len(n)))

print("Minimum is {0}".format(min(n)))
print("Maximum is {0}".format(max(n)))

There are 163 items
Minimum is ('09/03/2020 04:30:00', 1583699400, 10.56, '589', '22')
Maximum is ('29/03/2020 01:46:00', 1585417560, 2.05, '123578', '2221')

In [573]:
import sqlite3
from M2D import Month2Num
arrangedDdata = ''
CASES = []
arrangedDdata=arrangedDdata+"date_time,cases\n"
c= conn.cursor()
for rows in c.execute('SELECT * from CORONA'):
rows=str(rows)
row = rows.split(" ")
print (row[9], end=" ")
CASES.append(row[9])
conn.close()
#3-15-2020 19:00,3329

537 589 708 975 1010 1016 1301 1327 1336 1639 1715 1725 1747 1762 1832 2269 2291 2319 2499 2836 2982 2995 3043 3329 3400 3621 3502 3714 3777 3782 3802 4186 4597 4667 4704 4727 4743 4752 5723 6211 6349 6499 6522 6524 7601 7708 8710 8998 9371 9464 9473 9486 10692 11355 13737 13865 14316 14336 14366 14366 14366 14366 14373 16067 16545 18121 18876 19393 19643 19652 19774 19774 19774 19775 19823 22085 22813 24142 23940 26111 26711 26867 26892 26892 26900 26905 27031 30239 38757 32356 32356 33346 33546 34717 35060 35070 35070 35075 35179 40773 41569 42443 43449 43718 43734 46145 46145 46145 46168 46168 46274 49594 50982 52921 53205 53655 54823 54867 54916 54935 54941 54979 55081 60642 62364 64765 65527 65797 66741 68472 68489 68489 68581 68594 68905 75069 79082 81946 83206 85280 85520 85594 85612 85612 85749 85755 86548 94425 98180 100514 102325 104126 104205 104205 104256 104256 104256 104277 105726 116050 118592 120204 123311 123578
In [574]:
from __future__ import division
import sys
import glob
import time
import os
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

#%matplotlib inline
import numpy as np

E=len(EPOCHa)
print ("Len EPOCHa",E)
Time = np.array(EPOCHa)
print (Time[3:], end=" ")

del CASES[0]
e = len(CASES)
print ("Len LAST",e)
ss = range(0,e)
aa = np.array(CASES)
Ta = np.array(CASES,dtype=np.int)
print(Ta)
s= np.array(CASES)
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

plt.subplot(2, 1, 1)
plt.plot(Time, Ta, 'blue')
plt.title('Using Timestamps')
plt.ylabel('Number of Cases')

plt.subplot(2, 1, 2)
plt.plot(s, Ta, 'red')
plt.xlabel('time (s)')
plt.ylabel('Undamped')

plt.show()

Len EPOCHa 163
['1583871900' '1583911020' '1583940900' '1583954700' '1583984220'
'1584021600' '1584029100' '1584034500' '1584042300' '1584050400'
'1584084300' '1584109500' '1584124800' '1584141240' '1584175500'
'1584198180' '1584219600' '1584222000' '1584227100' '1584270000'
'1584273900' '1584278100' '1584281700' '1584290100' '1584298080'
'1584308160' '1584318540' '1584355200' '1584369600' '1584377100'
'1584384000' '1584398100' '1584412260' '1584427080' '1584441660'
'1584453300' '1584456000' '1584469200' '1584482700' '1584497400'
'1584519300' '1584526560' '1584534060' '1584540600' '1584555420'
'1584584160' '1584591480' '1584598500' '1584606120' '1584613020'
'1584629100' '1584636480' '1584643200' '1584650040' '1584657300'
'1584663000' '1584670260' '1584677460' '1584684600' '1584691860'
'1584699120' '1584706320' '1584713520' '1584720360' '1584727620'
'1584734880' '1584741900' '1584749400' '1584756720' '1584765960'
'1584773280' '1584780480' '1584787500' '1584794700' '1584801900'
'1584808800' '1584816000' '1584823500' '1584829800' '1584837900'
'1584845100' '1584852480' '1584859500' '1584866520' '1584874080'
'1584881040' '1584884460' '1584895440' '1584902220' '1584906900'
'1584917100' '1584924420' '1584931620' '1584938760' '1584945900'
'1584953100' '1584960360' '1584967620' '1584973860' '1584982020'
'1584988380' '1584996360' '1585003380' '1585010880' '1585018020'
'1585025220' '1585032420' '1585039620' '1585046700' '1585053720'
'1585061280' '1585067340' '1585075440' '1585082760' '1585090020'
'1585097280' '1585104180' '1585111680' '1585118880' '1585126080'
'1585133280' '1585139580' '1585147440' '1585154040' '1585161780'
'1585171440' '1585177380' '1585184520' '1585191720' '1585198860'
'1585205520' '1585213320' '1585220400' '1585227660' '1585234920'
'1585242000' '1585249260' '1585254960' '1585265580' '1585272720'
'1585279860' '1585287120' '1585294380' '1585301520' '1585308780'
'1585315980' '1585323180' '1585330320' '1585337640' '1585344900'
'1585352100' '1585359300' '1585366800' '1585373760' '1585381500'
'1585388700' '1585395780' '1585403040' '1585410180' '1585417560'] Len LAST 163
[   589    708    975   1010   1016   1301   1327   1336   1639   1715
1725   1747   1762   1832   2269   2291   2319   2499   2836   2982
2995   3043   3329   3400   3621   3502   3714   3777   3782   3802
4186   4597   4667   4704   4727   4743   4752   5723   6211   6349
6499   6522   6524   7601   7708   8710   8998   9371   9464   9473
9486  10692  11355  13737  13865  14316  14336  14366  14366  14366
14366  14373  16067  16545  18121  18876  19393  19643  19652  19774
19774  19774  19775  19823  22085  22813  24142  23940  26111  26711
26867  26892  26892  26900  26905  27031  30239  38757  32356  32356
33346  33546  34717  35060  35070  35070  35075  35179  40773  41569
42443  43449  43718  43734  46145  46145  46145  46168  46168  46274
49594  50982  52921  53205  53655  54823  54867  54916  54935  54941
54979  55081  60642  62364  64765  65527  65797  66741  68472  68489
68489  68581  68594  68905  75069  79082  81946  83206  85280  85520
85594  85612  85612  85749  85755  86548  94425  98180 100514 102325
104126 104205 104205 104256 104256 104256 104277 105726 116050 118592
120204 123311 123578]

In [575]:
from __future__ import division
import sys
import glob
import time
import os
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

#%matplotlib inline
import numpy as np
del EPOCHa[0]
del EPOCHa[0]
E=len(EPOCHa)
print ("Len EPOCHa",E)
Time = np.array(EPOCHa)
print (Time[3:], end=" ")
#del HOURS[0]
hours = np.array(SPANS)
print("\nLen Hours: ",len(SPANS))
print (hours, end=" ")
del CASES[0]
del CASES[0]
e = len(CASES)
print ("\nLen CASES",e)
ss = range(0,e)
SS =np.array(ss)
aa = np.array(CASES)
Ta = np.array(CASES,dtype=np.int)
print(Ta)
s= np.array(CASES)
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

plt.subplot(2, 1, 1)
plt.plot(Time, Ta, 'blue')
plt.plot(s, Ta, 'red')
plt.title('Using Timestamps')
plt.ylabel('Number of Cases')

plt.subplot(2, 1, 2)
plt.plot(Ta,hours, 'red')
plt.xlabel('time in Hours')
plt.ylabel('Undamped')

plt.show()

Len EPOCHa 161
['1583940900' '1583954700' '1583984220' '1584021600' '1584029100'
'1584034500' '1584042300' '1584050400' '1584084300' '1584109500'
'1584124800' '1584141240' '1584175500' '1584198180' '1584219600'
'1584222000' '1584227100' '1584270000' '1584273900' '1584278100'
'1584281700' '1584290100' '1584298080' '1584308160' '1584318540'
'1584355200' '1584369600' '1584377100' '1584384000' '1584398100'
'1584412260' '1584427080' '1584441660' '1584453300' '1584456000'
'1584469200' '1584482700' '1584497400' '1584519300' '1584526560'
'1584534060' '1584540600' '1584555420' '1584584160' '1584591480'
'1584598500' '1584606120' '1584613020' '1584629100' '1584636480'
'1584643200' '1584650040' '1584657300' '1584663000' '1584670260'
'1584677460' '1584684600' '1584691860' '1584699120' '1584706320'
'1584713520' '1584720360' '1584727620' '1584734880' '1584741900'
'1584749400' '1584756720' '1584765960' '1584773280' '1584780480'
'1584787500' '1584794700' '1584801900' '1584808800' '1584816000'
'1584823500' '1584829800' '1584837900' '1584845100' '1584852480'
'1584859500' '1584866520' '1584874080' '1584881040' '1584884460'
'1584895440' '1584902220' '1584906900' '1584917100' '1584924420'
'1584931620' '1584938760' '1584945900' '1584953100' '1584960360'
'1584967620' '1584973860' '1584982020' '1584988380' '1584996360'
'1585003380' '1585010880' '1585018020' '1585025220' '1585032420'
'1585039620' '1585046700' '1585053720' '1585061280' '1585067340'
'1585075440' '1585082760' '1585090020' '1585097280' '1585104180'
'1585111680' '1585118880' '1585126080' '1585133280' '1585139580'
'1585147440' '1585154040' '1585161780' '1585171440' '1585177380'
'1585184520' '1585191720' '1585198860' '1585205520' '1585213320'
'1585220400' '1585227660' '1585234920' '1585242000' '1585249260'
'1585254960' '1585265580' '1585272720' '1585279860' '1585287120'
'1585294380' '1585301520' '1585308780' '1585315980' '1585323180'
'1585330320' '1585337640' '1585344900' '1585352100' '1585359300'
'1585366800' '1585373760' '1585381500' '1585388700' '1585395780'
'1585403040' '1585410180' '1585417560']
Len Hours:  161
[18.08  4.83 10.87  8.3   3.83  8.2  10.38  2.08  1.5   2.17  2.25  9.42
7.    4.25  4.57  9.52  6.3   5.95  0.67  1.42 11.92  1.08  1.17  1.
2.33  2.22  2.8   2.88 10.18  4.    2.08  1.92  3.92  3.93  4.12  4.05
3.23  0.75  3.67  3.75  4.08  6.08  2.02  2.08  1.82  4.12  7.98  2.03
1.95  2.12  1.92  4.47  2.05  1.87  1.9   2.02  1.58  2.02  2.    1.98
2.02  2.02  2.    2.    1.9   2.02  2.02  1.95  2.08  2.03  2.57  2.03
2.    1.95  2.    2.    1.92  2.    2.08  1.75  2.25  2.    2.05  1.95
1.95  2.1   1.93  0.95  3.05  1.88  1.3   2.83  2.03  2.    1.98  1.98
2.    2.02  2.02  1.73  2.27  1.77  2.22  1.95  2.08  1.98  2.    2.
2.    1.97  1.95  2.1   1.68  2.25  2.03  2.02  2.02  1.92  2.08  2.
2.    2.    1.75  2.18  1.83  2.15  2.68  1.65  1.98  2.    1.98  1.85
2.17  1.97  2.02  2.02  1.97  2.02  1.58  2.95  1.98  1.98  2.02  2.02
1.98  2.02  2.    2.    1.98  2.03  2.02  2.    2.    2.08  1.93  2.15
2.    1.97  2.02  1.98  2.05]
Len CASES 161
[   975   1010   1016   1301   1327   1336   1639   1715   1725   1747
1762   1832   2269   2291   2319   2499   2836   2982   2995   3043
3329   3400   3621   3502   3714   3777   3782   3802   4186   4597
4667   4704   4727   4743   4752   5723   6211   6349   6499   6522
6524   7601   7708   8710   8998   9371   9464   9473   9486  10692
11355  13737  13865  14316  14336  14366  14366  14366  14366  14373
16067  16545  18121  18876  19393  19643  19652  19774  19774  19774
19775  19823  22085  22813  24142  23940  26111  26711  26867  26892
26892  26900  26905  27031  30239  38757  32356  32356  33346  33546
34717  35060  35070  35070  35075  35179  40773  41569  42443  43449
43718  43734  46145  46145  46145  46168  46168  46274  49594  50982
52921  53205  53655  54823  54867  54916  54935  54941  54979  55081
60642  62364  64765  65527  65797  66741  68472  68489  68489  68581
68594  68905  75069  79082  81946  83206  85280  85520  85594  85612
85612  85749  85755  86548  94425  98180 100514 102325 104126 104205
104205 104256 104256 104256 104277 105726 116050 118592 120204 123311
123578]

In [576]:
count = 0
ACC = []
acc=0
for accum in SPANS:
acc=acc+accum
ACC.append(round(acc,1))

In [577]:
from __future__ import division
import sys
import glob
import time
import os
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

#%matplotlib inline
import numpy as np
#del EPOCHa[0]
E=len(EPOCHa)
print ("Len EPOCHa",E)
Time = np.array(EPOCHa)
print (Time[3:], end=" ")
#del HOURS[0]
hours = np.array(ACC)
print("\nLen Hours: ",len(ACC))
print (hours, end=" ")
#del LAST[0]
e = len(CASES)
print ("\nLen LAST",e)
ss = range(0,e)
SS =np.array(ss)
aa = np.array(CASES)
Ta = np.array(CASES,dtype=np.int)
print(Ta)
s= np.array(CASES)
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

plt.subplot(2, 1, 1)
plt.plot(Time, Ta, 'blue')
plt.plot(s, Ta, 'red')
plt.title('Using Timestamps')
plt.ylabel('Number of Cases')

plt.subplot(2, 1, 2)
plt.plot(hours,Ta, 'red')
plt.xlabel('time in Hours')
plt.ylabel('Undamped')

plt.show()

Len EPOCHa 161
['1583940900' '1583954700' '1583984220' '1584021600' '1584029100'
'1584034500' '1584042300' '1584050400' '1584084300' '1584109500'
'1584124800' '1584141240' '1584175500' '1584198180' '1584219600'
'1584222000' '1584227100' '1584270000' '1584273900' '1584278100'
'1584281700' '1584290100' '1584298080' '1584308160' '1584318540'
'1584355200' '1584369600' '1584377100' '1584384000' '1584398100'
'1584412260' '1584427080' '1584441660' '1584453300' '1584456000'
'1584469200' '1584482700' '1584497400' '1584519300' '1584526560'
'1584534060' '1584540600' '1584555420' '1584584160' '1584591480'
'1584598500' '1584606120' '1584613020' '1584629100' '1584636480'
'1584643200' '1584650040' '1584657300' '1584663000' '1584670260'
'1584677460' '1584684600' '1584691860' '1584699120' '1584706320'
'1584713520' '1584720360' '1584727620' '1584734880' '1584741900'
'1584749400' '1584756720' '1584765960' '1584773280' '1584780480'
'1584787500' '1584794700' '1584801900' '1584808800' '1584816000'
'1584823500' '1584829800' '1584837900' '1584845100' '1584852480'
'1584859500' '1584866520' '1584874080' '1584881040' '1584884460'
'1584895440' '1584902220' '1584906900' '1584917100' '1584924420'
'1584931620' '1584938760' '1584945900' '1584953100' '1584960360'
'1584967620' '1584973860' '1584982020' '1584988380' '1584996360'
'1585003380' '1585010880' '1585018020' '1585025220' '1585032420'
'1585039620' '1585046700' '1585053720' '1585061280' '1585067340'
'1585075440' '1585082760' '1585090020' '1585097280' '1585104180'
'1585111680' '1585118880' '1585126080' '1585133280' '1585139580'
'1585147440' '1585154040' '1585161780' '1585171440' '1585177380'
'1585184520' '1585191720' '1585198860' '1585205520' '1585213320'
'1585220400' '1585227660' '1585234920' '1585242000' '1585249260'
'1585254960' '1585265580' '1585272720' '1585279860' '1585287120'
'1585294380' '1585301520' '1585308780' '1585315980' '1585323180'
'1585330320' '1585337640' '1585344900' '1585352100' '1585359300'
'1585366800' '1585373760' '1585381500' '1585388700' '1585395780'
'1585403040' '1585410180' '1585417560']
Len Hours:  161
[ 18.1  22.9  33.8  42.1  45.9  54.1  64.5  66.6  68.1  70.2  72.5  81.9
88.9  93.2  97.7 107.2 113.5 119.5 120.2 121.6 133.5 134.6 135.8 136.8
139.1 141.3 144.1 147.  157.2 161.2 163.3 165.2 169.1 173.  177.1 181.2
184.4 185.2 188.8 192.6 196.7 202.8 204.8 206.9 208.7 212.8 220.8 222.8
224.8 226.9 228.8 233.3 235.3 237.2 239.1 241.1 242.7 244.7 246.7 248.7
250.7 252.7 254.7 256.7 258.6 260.6 262.7 264.6 266.7 268.7 271.3 273.3
275.3 277.3 279.3 281.3 283.2 285.2 287.3 289.  291.3 293.3 295.3 297.3
299.2 301.3 303.2 304.2 307.2 309.1 310.4 313.3 315.3 317.3 319.3 321.2
323.2 325.3 327.3 329.  331.3 333.1 335.3 337.2 339.3 341.3 343.3 345.3
347.3 349.3 351.2 353.3 355.  357.2 359.3 361.3 363.3 365.2 367.3 369.3
371.3 373.3 375.1 377.2 379.1 381.2 383.9 385.5 387.5 389.5 391.5 393.4
395.5 397.5 399.5 401.5 403.5 405.5 407.1 410.1 412.  414.  416.  418.1
420.  422.1 424.1 426.1 428.  430.1 432.1 434.1 436.1 438.2 440.1 442.2
444.2 446.2 448.2 450.2 452.3]
Len LAST 161
[   975   1010   1016   1301   1327   1336   1639   1715   1725   1747
1762   1832   2269   2291   2319   2499   2836   2982   2995   3043
3329   3400   3621   3502   3714   3777   3782   3802   4186   4597
4667   4704   4727   4743   4752   5723   6211   6349   6499   6522
6524   7601   7708   8710   8998   9371   9464   9473   9486  10692
11355  13737  13865  14316  14336  14366  14366  14366  14366  14373
16067  16545  18121  18876  19393  19643  19652  19774  19774  19774
19775  19823  22085  22813  24142  23940  26111  26711  26867  26892
26892  26900  26905  27031  30239  38757  32356  32356  33346  33546
34717  35060  35070  35070  35075  35179  40773  41569  42443  43449
43718  43734  46145  46145  46145  46168  46168  46274  49594  50982
52921  53205  53655  54823  54867  54916  54935  54941  54979  55081
60642  62364  64765  65527  65797  66741  68472  68489  68489  68581
68594  68905  75069  79082  81946  83206  85280  85520  85594  85612
85612  85749  85755  86548  94425  98180 100514 102325 104126 104205
104205 104256 104256 104256 104277 105726 116050 118592 120204 123311
123578]

!pip install plotly
In [578]:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(y=[2, 1, 4, 3]))
fig.add_trace(go.Bar(y=[1, 4, 3, 2]))
fig.update_layout(title = 'Hello Figure')
fig.show()

In [579]:
import plotly.graph_objects as go
from plotly.offline import plot, iplot
import plotly.graph_objs as go
import plotly.offline
plotly.offline.init_notebook_mode(connected=True)
fig = go.Figure(
data=[go.Bar(y=CASES)],
layout_title_text="A Figure Displayed with fig.show()"
)
fig.show()

In [580]:
import plotly.graph_objects as go
from plotly.offline import plot, iplot
import plotly.graph_objs as go
import plotly.offline
plotly.offline.init_notebook_mode(connected=True)
fig = go.Figure(
data=[go.Bar(y=DEATHS)],
layout_title_text="A Figure Displayed with fig.show()"
)
fig.show()

In [581]:
x=len(ALLdata)
print (ALLdata[x-1])

('29/03/2020 01:46:00', 1585417560, 2.05, '123578', '2221')

In [582]:
html=open("data.html","w")
print ("Date Time Timestamp HoursSinceUpdate ConfirmedCases Deaths")
x=len(ALLdata)
#print (ALLdata[x-1])
for line in ALLdata:
li = ("".join(line))
li = li.rstrip("')")
li = li.lstrip("('")
li = li.replace("'","")
li = li.replace(",","")
li = li.replace(" ",",")
html.write(li+"<br />\n")
print("----------------------------------------------------------")
print (li)

html.close()

Date Time Timestamp HoursSinceUpdate ConfirmedCases Deaths
----------------------------------------------------------
29/03/2020,01:46:00,1585417560,2.05,123578,2221

In [583]:
!update_toybox
#scp /home/jack/Desktop/COVID-19/data.* jack@192.243.103.247:/var/www/mylinuxtoybox.com/html/COVID-19/

data.csv                                      100% 7386    35.2KB/s   00:00
data.html                                     100% 8469    40.4KB/s   00:00

In [584]:
print(ACC)

[18.1, 22.9, 33.8, 42.1, 45.9, 54.1, 64.5, 66.6, 68.1, 70.2, 72.5, 81.9, 88.9, 93.2, 97.7, 107.2, 113.5, 119.5, 120.2, 121.6, 133.5, 134.6, 135.8, 136.8, 139.1, 141.3, 144.1, 147.0, 157.2, 161.2, 163.3, 165.2, 169.1, 173.0, 177.1, 181.2, 184.4, 185.2, 188.8, 192.6, 196.7, 202.8, 204.8, 206.9, 208.7, 212.8, 220.8, 222.8, 224.8, 226.9, 228.8, 233.3, 235.3, 237.2, 239.1, 241.1, 242.7, 244.7, 246.7, 248.7, 250.7, 252.7, 254.7, 256.7, 258.6, 260.6, 262.7, 264.6, 266.7, 268.7, 271.3, 273.3, 275.3, 277.3, 279.3, 281.3, 283.2, 285.2, 287.3, 289.0, 291.3, 293.3, 295.3, 297.3, 299.2, 301.3, 303.2, 304.2, 307.2, 309.1, 310.4, 313.3, 315.3, 317.3, 319.3, 321.2, 323.2, 325.3, 327.3, 329.0, 331.3, 333.1, 335.3, 337.2, 339.3, 341.3, 343.3, 345.3, 347.3, 349.3, 351.2, 353.3, 355.0, 357.2, 359.3, 361.3, 363.3, 365.2, 367.3, 369.3, 371.3, 373.3, 375.1, 377.2, 379.1, 381.2, 383.9, 385.5, 387.5, 389.5, 391.5, 393.4, 395.5, 397.5, 399.5, 401.5, 403.5, 405.5, 407.1, 410.1, 412.0, 414.0, 416.0, 418.1, 420.0, 422.1, 424.1, 426.1, 428.0, 430.1, 432.1, 434.1, 436.1, 438.2, 440.1, 442.2, 444.2, 446.2, 448.2, 450.2, 452.3]

In [585]:
from time import gmtime, strftime
import time
print("\nGMT: "+time.strftime("%a, %d %b %Y %I:%M:%S %p %Z", time.gmtime()))
print("Local: "+strftime("%a, %d %b %Y %I:%M:%S %p %Z\n"))

GMT: Sun, 29 Mar 2020 02:57:24 AM GMT
Local: Sun, 29 Mar 2020 10:57:24 AM PST


In [586]:
from __future__ import division
import sys
import glob
import time
import os
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

import numpy as np
#del EPOCHa[0]
E=len(EPOCHa)
print ("Len EPOCHa",E)
Time = np.array(EPOCHa)
print (Time[3:], end=" ")
#del HOURS[0]
hours = np.array(ACC)
print("\nLen Hours: ",len(ACC))
print (hours, end=" ")
#del LAST[0]
e = len(CASES)
print ("\nLen LAST",e)
ss = range(0,e)
SS =np.array(ss)
aa = np.array(CASES)
Ta = np.array(CASES,dtype=np.int)
print(Ta)
s= np.array(CASES)
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

Len EPOCHa 161
['1583940900' '1583954700' '1583984220' '1584021600' '1584029100'
'1584034500' '1584042300' '1584050400' '1584084300' '1584109500'
'1584124800' '1584141240' '1584175500' '1584198180' '1584219600'
'1584222000' '1584227100' '1584270000' '1584273900' '1584278100'
'1584281700' '1584290100' '1584298080' '1584308160' '1584318540'
'1584355200' '1584369600' '1584377100' '1584384000' '1584398100'
'1584412260' '1584427080' '1584441660' '1584453300' '1584456000'
'1584469200' '1584482700' '1584497400' '1584519300' '1584526560'
'1584534060' '1584540600' '1584555420' '1584584160' '1584591480'
'1584598500' '1584606120' '1584613020' '1584629100' '1584636480'
'1584643200' '1584650040' '1584657300' '1584663000' '1584670260'
'1584677460' '1584684600' '1584691860' '1584699120' '1584706320'
'1584713520' '1584720360' '1584727620' '1584734880' '1584741900'
'1584749400' '1584756720' '1584765960' '1584773280' '1584780480'
'1584787500' '1584794700' '1584801900' '1584808800' '1584816000'
'1584823500' '1584829800' '1584837900' '1584845100' '1584852480'
'1584859500' '1584866520' '1584874080' '1584881040' '1584884460'
'1584895440' '1584902220' '1584906900' '1584917100' '1584924420'
'1584931620' '1584938760' '1584945900' '1584953100' '1584960360'
'1584967620' '1584973860' '1584982020' '1584988380' '1584996360'
'1585003380' '1585010880' '1585018020' '1585025220' '1585032420'
'1585039620' '1585046700' '1585053720' '1585061280' '1585067340'
'1585075440' '1585082760' '1585090020' '1585097280' '1585104180'
'1585111680' '1585118880' '1585126080' '1585133280' '1585139580'
'1585147440' '1585154040' '1585161780' '1585171440' '1585177380'
'1585184520' '1585191720' '1585198860' '1585205520' '1585213320'
'1585220400' '1585227660' '1585234920' '1585242000' '1585249260'
'1585254960' '1585265580' '1585272720' '1585279860' '1585287120'
'1585294380' '1585301520' '1585308780' '1585315980' '1585323180'
'1585330320' '1585337640' '1585344900' '1585352100' '1585359300'
'1585366800' '1585373760' '1585381500' '1585388700' '1585395780'
'1585403040' '1585410180' '1585417560']
Len Hours:  161
[ 18.1  22.9  33.8  42.1  45.9  54.1  64.5  66.6  68.1  70.2  72.5  81.9
88.9  93.2  97.7 107.2 113.5 119.5 120.2 121.6 133.5 134.6 135.8 136.8
139.1 141.3 144.1 147.  157.2 161.2 163.3 165.2 169.1 173.  177.1 181.2
184.4 185.2 188.8 192.6 196.7 202.8 204.8 206.9 208.7 212.8 220.8 222.8
224.8 226.9 228.8 233.3 235.3 237.2 239.1 241.1 242.7 244.7 246.7 248.7
250.7 252.7 254.7 256.7 258.6 260.6 262.7 264.6 266.7 268.7 271.3 273.3
275.3 277.3 279.3 281.3 283.2 285.2 287.3 289.  291.3 293.3 295.3 297.3
299.2 301.3 303.2 304.2 307.2 309.1 310.4 313.3 315.3 317.3 319.3 321.2
323.2 325.3 327.3 329.  331.3 333.1 335.3 337.2 339.3 341.3 343.3 345.3
347.3 349.3 351.2 353.3 355.  357.2 359.3 361.3 363.3 365.2 367.3 369.3
371.3 373.3 375.1 377.2 379.1 381.2 383.9 385.5 387.5 389.5 391.5 393.4
395.5 397.5 399.5 401.5 403.5 405.5 407.1 410.1 412.  414.  416.  418.1
420.  422.1 424.1 426.1 428.  430.1 432.1 434.1 436.1 438.2 440.1 442.2
444.2 446.2 448.2 450.2 452.3]
Len LAST 161
[   975   1010   1016   1301   1327   1336   1639   1715   1725   1747
1762   1832   2269   2291   2319   2499   2836   2982   2995   3043
3329   3400   3621   3502   3714   3777   3782   3802   4186   4597
4667   4704   4727   4743   4752   5723   6211   6349   6499   6522
6524   7601   7708   8710   8998   9371   9464   9473   9486  10692
11355  13737  13865  14316  14336  14366  14366  14366  14366  14373
16067  16545  18121  18876  19393  19643  19652  19774  19774  19774
19775  19823  22085  22813  24142  23940  26111  26711  26867  26892
26892  26900  26905  27031  30239  38757  32356  32356  33346  33546
34717  35060  35070  35070  35075  35179  40773  41569  42443  43449
43718  43734  46145  46145  46145  46168  46168  46274  49594  50982
52921  53205  53655  54823  54867  54916  54935  54941  54979  55081
60642  62364  64765  65527  65797  66741  68472  68489  68489  68581
68594  68905  75069  79082  81946  83206  85280  85520  85594  85612
85612  85749  85755  86548  94425  98180 100514 102325 104126 104205
104205 104256 104256 104256 104277 105726 116050 118592 120204 123311
123578]

Out[586]:
<Figure size 800x640 with 0 Axes>
<Figure size 800x640 with 0 Axes>
In [587]:
hours = np.array(ACC,dtype=np.float)
Ta = np.array(CASES,dtype=np.int)

In [588]:
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt

# Generate 'random' data
#np.random.seed(0)
#X = 2.5 * np.random.randn(100) + 1.5   # Array of 100 values with mean = 1.5, stddev = 2.5
X = np.array(CASES,dtype=np.int)
#res = 0.5 * np.random.randn(100)       # Generate 100 residual terms
Y = np.array(ACC)
# Actual values of Y

# Create pandas dataframe to store our X and y values
print ("Hours passed is since I started keeping records:")
print ("------------------------------------------------\n")
df = pd.DataFrame(
{'CASES': X,
'HoursPassed': Y}
)

# Show the first five rows of our dataframe
df.tail()

Hours passed is since I started keeping records:
------------------------------------------------

CASES  HoursPassed
0    975         18.1
1   1010         22.9
2   1016         33.8
3   1301         42.1
4   1327         45.9

Out[588]:
CASES HoursPassed
156 116050 444.2
157 118592 446.2
158 120204 448.2
159 123311 450.2
160 123578 452.3
In [589]:
hours = np.array(ACC,dtype=np.float)
Ta = np.array(CASES,dtype=np.int)

In [590]:
hours = np.array(ACC,dtype=np.float)
Ta = np.array(CASES,dtype=np.int)
minX=min(hours)
maxX=max(hours)
minY=min(Ta)
maxY=max(Ta)
print (minX, maxX, minY, maxY)
ax.set_xticks(np.arange(minX, 1, maxX))
ax.set_yticks(np.arange(minY, 1, maxY))

18.1 452.3 975 123578

Out[590]:
[]
In [591]:
count = 0
ACC = []
acc=0
for accum in SPANS:
acc=acc+accum
ACC.append(round(acc,1))

In [592]:
#x = np.arange(0, 1, 0.05)
#y = np.power(x, 2)
x = np.array(ACC,dtype=np.float)
y = np.array(CASES,dtype=np.int)

fig = plt.figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig = plt.figure()
ax = fig.gca()

ax.grid(color='lightgray', linestyle='-', linewidth=1)
plt.scatter(x, y, s=3)
plt.grid(True)

plt.xlabel('time in Hours')
plt.title('Using Timestamps')
plt.ylabel('Number of Cases')
plt.show()

In [593]:
for time in ACC:
t=5
print(time)

print (time/24)

452.3
18.845833333333335

import sqlite3 conn=sqlite3.connect("DATA/CoronaData2.db") c= conn.cursor() enter = "March 26, 2020 at 02:43 GMT, there have been 66741 confirmed cases and 963 deaths due to coronavirus COVID-19 in the United Stat" ID = 131 c.execute("UPDATE CORONA SET data = ? WHERE ROWID = ?", (enter, ID,)) conn.commit() conn.close()
In [594]:
import M2D
import sqlite3
c= conn.cursor()
cnt=0
for row in c.execute('SELECT rowid,* from CORONA'):
if row[0]==128:print (row)
cnt=cnt+1
if row[0]>135:
data = row[1]
data = data.replace(",","")
data = data.split(" ")
#print (row[0],":",data[1]+"/"+Month2Num(data[0])+""+data[1]+","+data[4]+","+data[9]+","+data[13])
print (data[1]+"/"+Month2Num(data[0])+""+data[1]+","+data[4]+","+data[9]+","+data[13])

(128, 'March 26, 2020 at 00:34 GMT, there have been 65797 confirmed cases and 935 deaths due to coronavirus COVID-19 in the United States')
26/0326,17:02,75069,1080
26/0326,19:00,79082,1143
26/0326,21:01,81946,1177
26/0326,23:02,83206,1201
27/0327,01:00,85280,1293
27/0327,03:01,85520,1297
27/0327,04:36,85594,1300
27/0327,07:33,85612,1301
27/0327,09:32,85612,1301
27/0327,11:31,85749,1304
27/0327,13:32,85755,1304
27/0327,15:33,86548,1321
27/0327,17:32,94425,1429
27/0327,19:33,98180,1513
27/0327,21:33,100514,1546
27/0327,23:33,102325,1591
28/0328,01:32,104126,1692
28/0328,03:34,104205,1704
28/0328,05:35,104205,1704
28/0328,07:35,104256,1704
28/0328,09:35,104256,1704
28/0328,11:40,104256,1704
28/0328,13:36,104277,1704
28/0328,15:45,105726,1730
28/0328,17:45,116050,1937
28/0328,19:43,118592,1979
28/0328,21:44,120204,1997
28/0328,23:43,123311,2211
29/0329,01:46,123578,2221

In [595]:
360*4
1440/3

Out[595]:
480.0
In [596]:
import string
cnt=0
ANALYZE =[]
LEN =len(ALLdata)
print (LEN)
for line in ALLdata:
line=line.replace(")","")
line=line.replace("'","")
line = line.split(",")
print(line[3],line[4],end=":")
ANALYZE.append(str(line[3])+","+str(line[4]))

163
589  22: 708  27: 975  30: 1010  31: 1016  31: 1301  38: 1327  38: 1336  38: 1639  40: 1715  41: 1725  41: 1747  41: 1762  41: 1832  41: 2269  48: 2291  50: 2319  50: 2499  51: 2836  57: 2982  60: 2995  60: 3043  60: 3329  63: 3400  63: 3621  63: 3502  63: 3714  68: 3777  69: 3782  69: 3802  69: 4186  73: 4597  86: 4667  87: 4704  91: 4727  93: 4743  93: 4752  93: 5723  97: 6211  102: 6349  106: 6499  112: 6522  116: 6524  116: 7601  116: 7708  120: 8710  132: 8998  150: 9371  153: 9464  155: 9473  155: 9486  157: 10692  160: 11355  171: 13737  201: 13865  211: 14316  218: 14336  218: 14366  217: 14366  217: 14366  217: 14366  217: 14373  218: 16067  219: 16545  225: 18121  233: 18876  237: 19393  256: 19643  263: 19652  264: 19774  275: 19774  275: 19774  275: 19775  276: 19823  276: 22085  282: 22813  288: 24142  288: 23940  301: 26111  324: 26711  341: 26867  348: 26892  348: 26892  348: 26900  348: 26905  348: 27031  349: 30239  388: 38757  400: 32356  414: 32356  414: 33346  414: 33546  419: 34717  452: 35060  457: 35070  458: 35070  458: 35075  458: 35179  459: 40773  479: 41569  504: 42443  517: 43449  545: 43718  552: 43734  553: 46145  582: 46145  582: 46145  582: 46168  582: 46168  582: 46274  588: 49594  622: 50982  655: 52921  684: 53205  687: 53655  698: 54823  778: 54867  782: 54916  784: 54935  784: 54941  784: 54979  785: 55081  785: 60642  817: 62364  878: 64765  910: 65527  928: 65797  935: 66741  963: 68472  1032: 68489  1032: 68489  1032: 68581  1036: 68594  1036: 68905  1037: 75069  1080: 79082  1143: 81946  1177: 83206  1201: 85280  1293: 85520  1297: 85594  1300: 85612  1301: 85612  1301: 85749  1304: 85755  1304: 86548  1321: 94425  1429: 98180  1513: 100514  1546: 102325  1591: 104126  1692: 104205  1704: 104205  1704: 104256  1704: 104256  1704: 104256  1704: 104277  1704: 105726  1730: 116050  1937: 118592  1979: 120204  1997: 123311  2211: 123578  2221:

# Create the list ANALYZE _ ANALYZE =[]¶

In [597]:
STR="09/03/2020 04:30:00 589"
print(STR[:-4])

09/03/2020 04:30:00

In [598]:
import string
import time
cnt=0
ANALYZE =[]
LEN =len(ALLdata)

print("--------------- Number of Samples: ",LEN,"----------\n")
print("\n--------------- First Five Samples ---------------")
for line in ALLdata:
cnt=cnt+1
line=line.replace(")","")
line=line.replace("(","")
line=line.replace("'","")
line = line.split(",")
if cnt<=5:print(line[0],line[3],line[4])
if cnt==5:print("\n--------------- Last Five Samples ---------------")
if cnt>LEN-5:print(line[0],line[3],line[4])
if cnt==LEN:print("\n--------------- Last Sample ---------------")

entry = line[0]+","+str(line[3])+","+str(line[4])
entry = str(entry)
entry = entry.replace("'","")
entry = entry.replace(",","")
ANALYZE.append(entry)
print(entry)

--------------- Number of Samples:  163 ----------

--------------- First Five Samples ---------------
09/03/2020 04:30:00  589  22
10/03/2020 05:30:00  708  27
10/03/2020 23:35:00  975  30
11/03/2020 04:25:00  1010  31
11/03/2020 15:17:00  1016  31

--------------- Last Five Samples ---------------
28/03/2020 17:45:00  116050  1937
28/03/2020 19:43:00  118592  1979
28/03/2020 21:44:00  120204  1997
28/03/2020 23:43:00  123311  2211
29/03/2020 01:46:00  123578  2221

--------------- Last Sample ---------------
29/03/2020 01:46:00 123578 2221

In [599]:
import string
cnt=0
ANALYZE =[]
LEN =len(ALLdata)
print ("Number of Samples: ",LEN)
for line in ALLdata:
cnt=cnt+1
line=line.replace(")","")
line=line.replace("'","")
line = line.split(",")
if cnt<=5:print(line[3],line[4],end=",")
if cnt==5:print("\n-----------------------------")
if cnt>LEN-5:print(line[3],line[4],end=",")
if cnt==LEN:print("\n-----------------------------")
ANALYZE.append(str(line[3])+","+str(line[4]))

days=10
hours=5*12 # Samples are two hour intervals
x=0
MORT = []
num = len(ANALYZE)-1
for x in range(130,num):
AN = (ANALYZE[129-x].split(","))
AP = (ANALYZE[129-hours-x].split(","))
if x==130:print("\n-----------------------------\n")
print (x,"Current Deaths:",AN[1],"    Cases",days,"days ago",AP[0],"    Mortality",int(AN[1])/int(AP[0]))
MORT.append(int(AN[1])/int(AP[0]))

Number of Samples:  163
589  22, 708  27, 975  30, 1010  31, 1016  31,
-----------------------------
116050  1937, 118592  1979, 120204  1997, 123311  2211, 123578  2221,
-----------------------------

-----------------------------

130 Current Deaths:  2221     Cases 10 days ago  43718     Mortality 0.050802872958506794
131 Current Deaths:  2211     Cases 10 days ago  43449     Mortality 0.05088724711730995
132 Current Deaths:  1997     Cases 10 days ago  42443     Mortality 0.04705133944348892
133 Current Deaths:  1979     Cases 10 days ago  41569     Mortality 0.047607592196107676
134 Current Deaths:  1937     Cases 10 days ago  40773     Mortality 0.0475069286047139
135 Current Deaths:  1730     Cases 10 days ago  35179     Mortality 0.049177065863156996
136 Current Deaths:  1704     Cases 10 days ago  35075     Mortality 0.0485816108339273
137 Current Deaths:  1704     Cases 10 days ago  35070     Mortality 0.0485885372112917
138 Current Deaths:  1704     Cases 10 days ago  35070     Mortality 0.0485885372112917
139 Current Deaths:  1704     Cases 10 days ago  35060     Mortality 0.04860239589275528
140 Current Deaths:  1704     Cases 10 days ago  34717     Mortality 0.04908258202033586
141 Current Deaths:  1704     Cases 10 days ago  33546     Mortality 0.050795922017528174
142 Current Deaths:  1692     Cases 10 days ago  33346     Mortality 0.05074071852695976
143 Current Deaths:  1591     Cases 10 days ago  32356     Mortality 0.04917171467424898
144 Current Deaths:  1546     Cases 10 days ago  32356     Mortality 0.04778093707504018
145 Current Deaths:  1513     Cases 10 days ago  38757     Mortality 0.039038109244781585
146 Current Deaths:  1429     Cases 10 days ago  30239     Mortality 0.04725685373193558
147 Current Deaths:  1321     Cases 10 days ago  27031     Mortality 0.04886981613702786
148 Current Deaths:  1304     Cases 10 days ago  26905     Mortality 0.04846682772718826
149 Current Deaths:  1304     Cases 10 days ago  26900     Mortality 0.048475836431226764
150 Current Deaths:  1301     Cases 10 days ago  26892     Mortality 0.04837869998512569
151 Current Deaths:  1301     Cases 10 days ago  26892     Mortality 0.04837869998512569
152 Current Deaths:  1300     Cases 10 days ago  26867     Mortality 0.04838649644545353
153 Current Deaths:  1297     Cases 10 days ago  26711     Mortality 0.04855677436262214
154 Current Deaths:  1293     Cases 10 days ago  26111     Mortality 0.0495193596568496
155 Current Deaths:  1201     Cases 10 days ago  23940     Mortality 0.05016708437761069
156 Current Deaths:  1177     Cases 10 days ago  24142     Mortality 0.04875321017314224
157 Current Deaths:  1143     Cases 10 days ago  22813     Mortality 0.050103011440845134
158 Current Deaths:  1080     Cases 10 days ago  22085     Mortality 0.048901969662666966
159 Current Deaths:  1037     Cases 10 days ago  19823     Mortality 0.0523129697825758
160 Current Deaths:  1036     Cases 10 days ago  19775     Mortality 0.05238938053097345
161 Current Deaths:  1036     Cases 10 days ago  19774     Mortality 0.052392029938302824

In [600]:
import plotly.graph_objects as go
from plotly.offline import plot, iplot
import plotly.graph_objs as go
import plotly.offline
plotly.offline.init_notebook_mode(connected=True)
dayz=str(days)
fig = go.Figure(
data=[go.Bar(y=MORT)],
layout_title_text="Mortality based on "+dayz+" days span between detection and death"
)
fig.show()

In [601]:
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

#plt.subplot(2, 1, 1)
s=range(0,len(MORT))
plt.plot(s, MORT, 'red')
plt.title('Mortality Using Timestamps')
plt.ylabel('Number of Cases')

Out[601]:
Text(0, 0.5, 'Number of Cases')
In [602]:
figure(num=None, figsize=(10,8), dpi=80, facecolor='salmon')
#fig, ax = plt.subplots(dpi=150)

#plt.subplot(2, 1, 1)
S=range(0,len(MORT))
M= MORT
s = np.asarray(S)
m= np.asarray(M)

plt.plot(S, M, 'red')
plt.plot(s, m, 'blue')
plt.title('Using Timestamps')
plt.ylabel('Number of Cases')

Out[602]:
Text(0, 0.5, 'Number of Cases')
In [603]:
print (len(ANALYZE))

163

In [604]:
days=5
hours=5*12 # Samples are two hour intervals
AN = (ANALYZE[145].split(","))
AP = (ANALYZE[145-hours].split(","))
print (AN[1],AP[0],CASES[145])
print (int(AN[1])/int(AP[0]))

 1321  27031 98180
0.04886981613702786

In [605]:
import string
cnt=0
for line in ALLdata:
cnt=cnt+1
print(cnt)

line = line.translate({ord(ch):' ' for ch in ",()'"})
line= ' '.join(line.split())
print (line)
line= line.split(" ")
print (line[4],line[5])
#cases=int(line[4])

cases = 19643
#cases = 13865
#cases = 4667

deaths=int(line[5])

percent = deaths/cases
print (percent)
percent*int(line[4])

163
29/03/2020 01:46:00 1585417560 2.05 123578 2221
123578 2221
0.11306826859441023

Out[605]:
13972.750496360028
In [606]:
# 9371*.056 = 524.77
# 13865*.056 = 776.44
# 19393*.056 = 1086.008
# 26111*.053 = 1383.883

68489*.053

Out[606]:
3629.917
In [607]:
54935*percent
#based on 13865: 20/03/2020,00:48:00,1584636480,2.05,13865,211  | 25/03/2020 08:48:00 1585097280 2.02 54935 784
#estimate: April 5th

Out[607]:
6211.405335233926

# Create a list of CASES and a list of DEATHS¶

In [608]:
import M2D
import sqlite3
c= conn.cursor()
cnt=0
CASES=[]
DEATHS=[]

for row in c.execute('SELECT rowid,* from CORONA'):
#if row[0]==128:print (row)
cnt=cnt+1
data = row[1]
data = data.replace(",","")
data = data.split(" ")
#print (row[0],data[9]+","+data[13])
CASES.append(data[9])
DEATHS.append(data[13])


# Mortality¶

In [609]:
def mortality(DEATHS,CASES):
result=int(DEATHS)/int(CASES)
return result

days= 6

span=days*12

length=len(CASES)
for x in range(span,length):
#print (DEATHS[x],CASES[x-span])
print (x,DEATHS[x],CASES[x],CASES[x-span],mortality(DEATHS[x],CASES[x-span]))

72 275 19774 537 0.5121042830540037
73 276 19775 589 0.4685908319185059
74 276 19823 708 0.3898305084745763
75 282 22085 975 0.28923076923076924
76 288 22813 1010 0.2851485148514851
77 288 24142 1016 0.28346456692913385
78 301 23940 1301 0.23136049192928518
79 324 26111 1327 0.24415975885455915
80 341 26711 1336 0.25523952095808383
81 348 26867 1639 0.21232458816351435
82 348 26892 1715 0.20291545189504373
83 348 26892 1725 0.20173913043478262
84 348 26900 1747 0.1991986262163709
85 348 26905 1762 0.19750283768444948
86 349 27031 1832 0.19050218340611352
87 388 30239 2269 0.17100044072278536
88 400 38757 2291 0.17459624618070713
89 414 32356 2319 0.17852522639068563
90 414 32356 2499 0.16566626650660263
91 414 33346 2836 0.1459802538787024
92 419 33546 2982 0.14050972501676728
93 452 34717 2995 0.15091819699499165
94 457 35060 3043 0.15018074268813672
95 458 35070 3329 0.13757885250826074
96 458 35070 3400 0.13470588235294118
97 458 35075 3621 0.12648439657553162
98 459 35179 3502 0.13106796116504854
99 479 40773 3714 0.1289714593430264
100 504 41569 3777 0.13343923749007147
101 517 42443 3782 0.13670015864621893
102 545 43449 3802 0.14334560757496054
103 552 43718 4186 0.13186813186813187
104 553 43734 4597 0.12029584511638025
105 582 46145 4667 0.12470537818727234
106 582 46145 4704 0.12372448979591837
107 582 46145 4727 0.12312248783583668
108 582 46168 4743 0.12270714737507907
109 582 46168 4752 0.12247474747474747
110 588 46274 5723 0.1027433164424253
111 622 49594 6211 0.10014490420222187
112 655 50982 6349 0.10316585289021893
113 684 52921 6499 0.105246961070934
114 687 53205 6522 0.10533578656853726
115 698 53655 6524 0.10698957694665849
116 778 54823 7601 0.102354953295619
117 782 54867 7708 0.10145303580695382
118 784 54916 8710 0.09001148105625717
119 784 54935 8998 0.0871304734385419
120 784 54941 9371 0.0836623626080461
121 785 54979 9464 0.08294590025359257
122 785 55081 9473 0.08286709595693022
123 817 60642 9486 0.0861269238878347
124 878 62364 10692 0.0821174710063599
125 910 64765 11355 0.08014090708938794
126 928 65527 13737 0.06755477906384218
127 935 65797 13865 0.06743598990263253
128 963 66741 14316 0.06726739312657166
129 1032 68472 14336 0.07198660714285714
130 1032 68489 14366 0.07183628010580538
131 1032 68489 14366 0.07183628010580538
132 1036 68581 14366 0.07211471530001393
133 1036 68594 14366 0.07211471530001393
134 1037 68905 14373 0.07214916857997634
135 1080 75069 16067 0.06721852243729383
136 1143 79082 16545 0.06908431550317316
137 1177 81946 18121 0.06495226532752056
138 1201 83206 18876 0.06362576817122272
139 1293 85280 19393 0.06667354199969061
140 1297 85520 19643 0.06602861070101308
141 1300 85594 19652 0.06615102788520252
142 1301 85612 19774 0.06579346616769495
143 1301 85612 19774 0.06579346616769495
144 1304 85749 19774 0.06594518054010316
145 1304 85755 19775 0.06594184576485461
146 1321 86548 19823 0.06663976189275085
147 1429 94425 22085 0.06470455059995472
148 1513 98180 22813 0.0663218340419936
149 1546 100514 24142 0.06403777648910612
150 1591 102325 23940 0.0664578111946533
151 1692 104126 26111 0.06480027574585424
152 1704 104205 26711 0.06379394257047659
153 1704 104205 26867 0.06342353072542524
154 1704 104256 26892 0.06336456938866578
155 1704 104256 26892 0.06336456938866578
156 1704 104256 26900 0.0633457249070632
157 1704 104277 26905 0.06333395279687791
158 1730 105726 27031 0.06400059191298879
159 1937 116050 30239 0.06405635106981052
160 1979 118592 38757 0.05106174368501174
161 1997 120204 32356 0.06171961923599951
162 2211 123311 32356 0.06833353937445914
163 2221 123578 33346 0.06660469021771727

In [610]:
import plotly.express as px
fig = px.line(x=DEATHS, y=CASES)
fig.show()

In [611]:
import plotly.graph_objects as go
fig = go.Figure()
fig.update_layout(title = 'DEATHS')
fig.show()

In [612]:
## Offset the deaths and the confirmation by 5 days
#If they die people who get confirmed are ill at least five days

In [613]:
def mort(days,CASES=CASES,DEATHS=DEATHS):
span=days*12
start=len(CASES)-1
num = len(CASES)-span
for x in range(start,num,-12):
dates = (int(DEATHS[x]),int(CASES[x-span]))
mortality = (int(DEATHS[x])/int(CASES[x-span]))
return dates,mortality

days= 6
mort(days,CASES=CASES,DEATHS=DEATHS)

Out[613]:
((2221, 33346), 0.06660469021771727)
In [614]:
def RunningMort(days,CASES=CASES,DEATHS=DEATHS):
span=days*12
start=len(CASES)-1
num = len(CASES)-span
for x in range(start,num,-12):
print ("DEATHS:", (int(DEATHS[x]),int(CASES[x-span])))
print ("Mortality:" , (int(DEATHS[x])/int(CASES[x-span])))

days= 7
RunningMort(days,CASES=CASES,DEATHS=DEATHS)

DEATHS: (2221, 26111)
Mortality: 0.08505993642526138
DEATHS: (1692, 19393)
Mortality: 0.08724797607384108
DEATHS: (1293, 13865)
Mortality: 0.09325640100973674
DEATHS: (935, 6524)
Mortality: 0.14331698344573882
DEATHS: (698, 4186)
Mortality: 0.16674629718107978
DEATHS: (552, 2836)
Mortality: 0.19464033850493653
DEATHS: (414, 1327)
Mortality: 0.3119819140919367

In [615]:
days= 7

span=days*12
num = len(CASES)-span
for x in range(128,num,-12):
print (int(DEATHS[x]),int(CASES[x-span]))
print (int(DEATHS[x])/int(CASES[x-span]))

963 7601
0.12669385607156952
778 4597
0.16924080922340656
553 2982
0.18544600938967137
419 1336
0.31362275449101795

In [616]:
 print (CASES[128])

66741


deaths-1036/ cases-68581 from todays data that equals .01510 a little over one and a half percent but the truth is the deaths are not relevant to todays confirmations it is relevant to the confirmations about a week ago (26111) 1036/26111 gives it a mortality of .039676

In [617]:
1036/26111

Out[617]:
0.03967676458197694
In [ ]:



# Create CSV¶

In [618]:
%%writefile data.csv
09/03/2020,04:30:00,1583699400,10.56,589,22
10/03/2020,05:30:00,1583789400,25,708,27
10/03/2020,23:35:00,1583854500,18.08,975,30
11/03/2020,04:25:00,1583871900,4.83,1010,31
11/03/2020,15:17:00,1583911020,10.87,1016,31
11/03/2020,23:35:00,1583940900,8.3,1301,38
12/03/2020,03:25:00,1583954700,3.83,1327,38
12/03/2020,11:37:00,1583984220,8.2,1336,38
12/03/2020,22:00:00,1584021600,10.38,1639,40
13/03/2020,00:05:00,1584029100,2.08,1715,41
13/03/2020,01:35:00,1584034500,1.5,1725,41
13/03/2020,03:45:00,1584042300,2.17,1747,41
13/03/2020,06:00:00,1584050400,2.25,1762,41
13/03/2020,15:25:00,1584084300,9.42,1832,41
13/03/2020,22:25:00,1584109500,7,2269,48
14/03/2020,02:40:00,1584124800,4.25,2291,50
14/03/2020,16:15:00,1584173700,13.58,2329,50
14/03/2020,16:45:00,1584175500,0.5,2499,51
14/03/2020,23:03:00,1584198180,6.3,2836,57
15/03/2020,05:00:00,1584219600,5.95,2982,60
15/03/2020,05:40:00,1584222000,0.67,2995,60
15/03/2020,07:05:00,1584227100,1.42,3043,60
15/03/2020,19:00:00,1584270000,11.92,3329,63
15/03/2020,20:05:00,1584273900,1.08,3400,63
15/03/2020,21:15:00,1584278100,1.17,3621,63
15/03/2020,22:15:00,1584281700,1,3502,63
16/03/2020,00:35:00,1584290100,2.33,3714,68
16/03/2020,02:48:00,1584298080,2.22,3777,69
16/03/2020,05:36:00,1584308160,2.8,3782,69
16/03/2020,08:29:00,1584318540,2.88,3802,69
16/03/2020,18:40:00,1584355200,10.18,4186,73
16/03/2020,22:40:00,1584369600,4,4597,86
17/03/2020,00:45:00,1584377100,2.08,4667,87
17/03/2020,02:40:00,1584384000,1.92,4704,91
17/03/2020,06:35:00,1584398100,3.92,4727,93
17/03/2020,10:31:00,1584412260,3.93,4743,93
17/03/2020,14:38:00,1584427080,4.12,4752,93
17/03/2020,18:41:00,1584441660,4.05,5723,97
17/03/2020,21:55:00,1584453300,3.23,6211,102
17/03/2020,22:40:00,1584456000,0.75,6349,106
18/03/2020,02:20:00,1584469200,3.67,6499,112
18/03/2020,06:05:00,1584482700,3.75,6522,116
18/03/2020,10:10:00,1584497400,4.08,6524,116
18/03/2020,14:15:00,1584512100,4.08,7301,116
18/03/2020,18:16:00,1584526560,4.02,7708,120
18/03/2020,22:10:00,1584540600,3.9,8998,150
19/03/2020,02:17:00,1584555420,4.12,9371,153
19/03/2020,10:16:00,1584584160,7.98,9464,155
19/03/2020,14:15:00,1584598500,3.98,9486,157
19/03/2020,15:15:00,1584602100,1,10692,160
19/03/2020,18:17:00,1584613020,3.03,11355,171
19/03/2020,22:45:00,1584629100,4.47,13737,201
20/03/2020,00:48:00,1584636480,2.05,13865,211
20/03/2020,02:40:00,1584643200,1.87,14316,218
20/03/2020,06:35:00,1584657300,3.92,14366,217
20/03/2020,08:10:00,1584663000,1.58,14366,217
20/03/2020,10:11:00,1584670260,2.02,14366,217
20/03/2020,12:11:00,1584677460,2,14366,217
20/03/2020,14:10:00,1584684600,1.98,14373,218
20/03/2020,16:11:00,1584691860,2.02,16067,219
20/03/2020,18:12:00,1584699120,2.02,16545,225
20/03/2020,20:12:00,1584706320,2,18121,233
20/03/2020,22:12:00,1584713520,2,18876,237
21/03/2020,00:06:00,1584720360,1.9,19393,256
21/03/2020,00:25:00,1584721500,0.32,19429,257
21/03/2020,02:07:00,1584727620,1.7,19643,263
21/03/2020,04:08:00,1584734880,2.02,19652,264
21/03/2020,06:05:00,1584741900,1.95,19774,275
21/03/2020,08:10:00,1584749400,2.08,19774,275
21/03/2020,10:12:00,1584756720,2.03,19774,275
21/03/2020,12:46:00,1584765960,2.57,19775,276
21/03/2020,14:48:00,1584773280,2.03,19823,276
21/03/2020,16:35:00,1584779700,1.78,22085,282
21/03/2020,16:48:00,1584780480,0.22,22085,282
21/03/2020,18:45:00,1584787500,1.95,22813,288
21/03/2020,20:45:00,1584794700,2,24142,288
21/03/2020,22:45:00,1584801900,2,23940,301
22/03/2020,00:40:00,1584808800,1.92,26111,324
22/03/2020,02:40:00,1584816000,2,26711,341
22/03/2020,04:45:00,1584823500,2.08,26867,348
22/03/2020,06:30:00,1584829800,1.75,26892,348
22/03/2020,08:45:00,1584837900,2.25,26892,348
22/03/2020,10:45:00,1584845100,2,26900,348
22/03/2020,12:48:00,1584852480,2.05,26905,348
22/03/2020,14:45:00,1584859500,1.95,27031,349
22/03/2020,16:42:00,1584866520,1.95,30239,388
22/03/2020,18:48:00,1584874080,2.1,38757,400
22/03/2020,20:44:00,1584881040,1.93,32356,414
22/03/2020,21:41:00,1584884460,0.95,32356,414
23/03/2020,00:44:00,1584895440,3.05,33346,414
23/03/2020,02:37:00,1584902220,1.88,33546,419
23/03/2020,03:55:00,1584906900,1.3,34717,452
23/03/2020,06:45:00,1584917100,2.83,35060,457
23/03/2020,08:47:00,1584924420,2.03,35070,458
23/03/2020,10:47:00,1584931620,2,35070,458
23/03/2020,12:46:00,1584938760,1.98,35075,458
23/03/2020,14:45:00,1584945900,1.98,35179,459
23/03/2020,16:45:00,1584953100,2.0,40773,479
23/03/2020,18:46:00,1584960360,2.02,41569,504
23/03/2020,20:47:00,1584967620,2.02,42443,517
23/03/2020,22:31:00,1584973860,1.73,43449,545
24/03/2020,00:47:00,1584982020,2.27,43718,552
24/03/2020,00:47:00,1584982020,2.27,43718,552
24/03/2020,02:33:00,1584988380,1.77,43734,553
24/03/2020,04:46:00,1584996360,2.22,46145,582
24/03/2020,06:43:00,1585003380,1.95,46145,582
24/03/2020,08:48:00,1585010880,2.08,46145,582
24/03/2020,10:47:00,1585018020,1.98,46168,582
24/03/2020,12:47:00,1585025220,2.0,46168,582
24/03/2020,14:47:00,1585032420,2.0,46274,588
24/03/2020,16:47:00,1585039620,2.0,49594,622
24/03/2020,18:45:00,1585046700,1.97,50982,655
24/03/2020,20:42:00,1585053720,1.95,52921,684
25/03/2020,00:29:00,1585067340,1.68,53655,698
25/03/2020,02:44:00,1585075440,2.25,54823,778
25/03/2020,04:46:00,1585082760,2.03,54867,782
25/03/2020,06:47:00,1585090020,2.02,54916,784
25/03/2020,08:48:00,1585097280,2.02,54935,784
25/03/2020,10:43:00,1585104180,1.92,54941,784
25/03/2020,12:48:00,1585111680,2.08,54979,785
25/03/2020,14:48:00,1585118880,2.0,55081,785
25/03/2020,16:48:00,1585126080,2.0,60642,817
25/03/2020,18:48:00,1585133280,2.0,62364,878
25/03/2020,20:33:00,1585139580,1.75,64765,910
25/03/2020,22:44:00,1585147440,2.18,65527,928
26/03/2020,00:34:00,1585154040,1.83,65797,935
26/03/2020,02:43:00,1585161780,2.15,66741,963
26/03/2020,05:24:00,1585171440,2.68,68472,1032
26/03/2020,07:03:00,1585177380,1.65,68489,1032
26/03/2020,09:02:00,1585184520,1.98,68489,1032
26/03/2020,11:02:00,1585191720,2.0,68581,1036
26/03/2020,13:01:00,1585198860,1.98,68594,1036
6/03/2020,14:52:00,1585205520,1.85,68905,1037
26/03/2020,17:02:00,1585213320,2.17,75069,1080
26/03/2020,19:00:00,1585220400,1.97,79082,1143
26/03/2020,21:01:00,1585227660,2.02,81946,1177
26/03/2020,23:02:00,1585234920,2.02,83206,1201
27/03/2020,01:00:00,1585242000,1.97,85280,1293
27/03/2020,03:01:00,1585249260,2.02,85520,1297
27/03/2020,04:36:00,1585254960,1.58,85594,1300
27/03/2020,07:33:00,1585265580,2.95,85612,1301
27/03/2020,09:32:00,1585272720,1.98,85612,1301
27/03/2020,11:31:00,1585279860,1.98,85749,1304
27/03/2020,13:32:00,1585287120,2.02,85755,1304
27/03/2020,15:33:00,1585294380,2.02,86548,1321
27/03/2020,17:32:00,1585301520,1.98,94425,1429
27/03/2020,19:33:00,1585308780,2.02,98180,1513
27/03/2020,21:33:00,1585315980,2.0,100514,1546
27/03/2020,23:33:00,1585323180,2.0,102325,1591
28/04/2020,01:32:00,1585330320,1.98,104126,1695
28/04/2020,03:08:00,1585336080,1.6,104205,1701
28/03/2020,05:35:00,1585344900,2.02,104205,1704
28/03/2020,07:35:00,1585352100,2.0,104256,1704
28/03/2020,09:35:00,1585359300,2.0,104256,1704
28/03/2020,11:40:00,1585366800,2.08,104256,1704
28/03/2020,13:36:00,1585373760,1.93,104277,1704
28/03/2020,15:45:00,1585381500,2.15,105726,1730
28/03/2020,17:45:00,1585388700,2.0,116050,1937
28/03/2020,19:43:00,1585395780,1.97,118592,1979
28/03/2020,21:44:00,1585403040,2.02,120204,1997
28/03/2020,23:43:00,1585410180,1.98,123311,2211

Overwriting data.csv

In [619]:
print ("Date Time Timestamp HoursSinceUpdate ConfirmedCases Deaths")
x=len(ALLdata)
cnt=0
for line in ALLdata:
cnt=cnt+1
li = ("".join(line))
li = li.rstrip("')")
li = li.lstrip("('")
li = li.replace("'","")
li = li.replace(",","")
li = li.replace(" ",",")
if cnt>152:print (li)


Date Time Timestamp HoursSinceUpdate ConfirmedCases Deaths
28/03/2020,05:35:00,1585344900,2.02,104205,1704
28/03/2020,07:35:00,1585352100,2.0,104256,1704
28/03/2020,09:35:00,1585359300,2.0,104256,1704
28/03/2020,11:40:00,1585366800,2.08,104256,1704
28/03/2020,13:36:00,1585373760,1.93,104277,1704
28/03/2020,15:45:00,1585381500,2.15,105726,1730
28/03/2020,17:45:00,1585388700,2.0,116050,1937
28/03/2020,19:43:00,1585395780,1.97,118592,1979
28/03/2020,21:44:00,1585403040,2.02,120204,1997
28/03/2020,23:43:00,1585410180,1.98,123311,2211
29/03/2020,01:46:00,1585417560,2.05,123578,2221

# %load update_toybox scp /home/jack/Desktop/cOVID-19/data.* jack@192.243.103.247:/var/www/mylinuxtoybox.com/html/COVID-19/ #scp /home/jack/Desktop/COVID-19/Header-Image-1500x250.jpg jack@192.243.103.247:/var/www/mylinuxtoybox.com/html/
In [620]:
!update_toybox
#scp /home/jack/Desktop/cOVID-19/data.* jack@192.243.103.247:/var/www/mylinuxtoybox.com/html/COVID-19/

data.csv                                      100% 7386    34.0KB/s   00:00
data.html                                     100% 8469    39.0KB/s   00:00

In [621]:
import sqlite3

history = ''
c= conn.cursor()
for row in c.execute('SELECT * from CORONA'):
print(row[0])

March 08, 2020 at 23:30 GMT, there have been 537 confirmed cases and 21 deaths due to coronavirus COVID-19 in the United States
March 09, 2020 at 04:30 GMT, there have been 589 confirmed cases and 22 deaths due to coronavirus COVID-19 in the United States
March 10, 2020 at 05:30 GMT, there have been 708 confirmed cases and 27 deaths due to coronavirus COVID-19 in the United States
March 10, 2020 at 23:35 GMT, there have been 975 confirmed cases and 30 deaths due to coronavirus COVID-19 in the United States
March 11, 2020 at 04:25 GMT, there have been 1010 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States
March 11, 2020 at 15:17 GMT, there have been 1016 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States
March 11, 2020 at 23:35 GMT, there have been 1301 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
March 12, 2020 at 03:25 GMT, there have been 1327 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
March 12, 2020 at 11:37 GMT, there have been 1336 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
March 12, 2020 at 22:00 GMT, there have been 1639 confirmed cases and 40 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 00:05 GMT, there have been 1715 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 01:35 GMT, there have been 1725 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 03:45 GMT, there have been 1747 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 06:00 GMT, there have been 1762 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 15:25 GMT, there have been 1832 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
March 13, 2020 at 22:25 GMT, there have been 2269 confirmed cases and 48 deaths due to coronavirus COVID-19 in the United States
March 14, 2020 at 02:40 GMT, there have been 2291 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States
March 14, 2020 at 07:14 GMT, there have been 2319 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States
March 14, 2020 at 16:45 GMT, there have been 2499 confirmed cases and 51 deaths due to coronavirus COVID-19 in the United States
March 14, 2020 at 23:03 GMT, there have been 2836 confirmed cases and 57 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 05:00 GMT, there have been 2982 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 05:40 GMT, there have been 2995 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 07:05 GMT, there have been 3043 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 19:00 GMT, there have been 3329 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 20:05 GMT, there have been 3400 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 21:15 GMT, there have been 3621 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
March 15, 2020 at 22:15 GMT, there have been 3502 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 00:35 GMT, there have been 3714 confirmed cases and 68 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 02:48 GMT, there have been 3777 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 05:36 GMT, there have been 3782 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 08:29 GMT, there have been 3802 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 18:40 GMT, there have been 4186 confirmed cases and 73 deaths due to coronavirus COVID-19 in the United States
March 16, 2020 at 22:40 GMT, there have been 4597 confirmed cases and 86 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 00:45 GMT, there have been 4667 confirmed cases and 87 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 02:40 GMT, there have been 4704 confirmed cases and 91 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 06:35 GMT, there have been 4727 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 10:31 GMT, there have been 4743 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 14:38 GMT, there have been 4752 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 18:41 GMT, there have been 5723 confirmed cases and 97 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 21:55 GMT, there have been 6211 confirmed cases and 102 deaths due to coronavirus COVID-19 in the United States
March 17, 2020 at 22:40 GMT, there have been 6349 confirmed cases and 106 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 02:20 GMT, there have been 6499 confirmed cases and 112 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 06:05 GMT, there have been 6522 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 10:10 GMT, there have been 6524 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 16:15 GMT, there have been 7601 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 18:16 GMT, there have been 7708 confirmed cases and 120 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 20:21 GMT, there have been 8710 confirmed cases and 132 deaths due to coronavirus COVID-19 in the United States
March 18, 2020 at 22:10 GMT, there have been 8998 confirmed cases and 150 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 02:17 GMT, there have been 9371 confirmed cases and 153 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 10:16 GMT, there have been 9464 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 12:18 GMT, there have been 9473 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 14:15 GMT, there have been 9486 confirmed cases and 157 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 16:22 GMT, there have been 10692 confirmed cases and 160 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 18:17 GMT, there have been 11355 confirmed cases and 171 deaths due to coronavirus COVID-19 in the United States
March 19, 2020 at 22:45 GMT, there have been 13737 confirmed cases and 201 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 00:48 GMT, there have been 13865 confirmed cases and 211 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 02:40 GMT, there have been 14316 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 04:34 GMT, there have been 14336 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 06:35 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 08:10 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 10:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 12:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 14:10 GMT, there have been 14373 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 16:11 GMT, there have been 16067 confirmed cases and 219 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 18:12 GMT, there have been 16545 confirmed cases and 225 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 20:12 GMT, there have been 18121 confirmed cases and 233 deaths due to coronavirus COVID-19 in the United States
March 20, 2020 at 22:12 GMT, there have been 18876 confirmed cases and 237 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 00:06 GMT, there have been 19393 confirmed cases and 256 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 02:07 GMT, there have been 19643 confirmed cases and 263 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 04:08 GMT, there have been 19652 confirmed cases and 264 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 06:05 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 08:10 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 10:12 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 12:46 GMT, there have been 19775 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 14:48 GMT, there have been 19823 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 16:48 GMT, there have been 22085 confirmed cases and 282 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 18:45 GMT, there have been 22813 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 20:45 GMT, there have been 24142 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States
March 21, 2020 at 22:45 GMT, there have been 23940 confirmed cases and 301 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 00:40 GMT, there have been 26111 confirmed cases and 324 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 02:40 GMT, there have been 26711 confirmed cases and 341 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 04:45 GMT, there have been 26867 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 06:30 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 08:45 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 10:45 GMT, there have been 26900 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 12:48 GMT, there have been 26905 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 14:45 GMT, there have been 27031 confirmed cases and 349 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 16:42 GMT, there have been 30239 confirmed cases and 388 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 18:48 GMT, there have been 38757 confirmed cases and 400 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 20:44 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
March 22, 2020 at 21:41 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 00:44 GMT, there have been 33346 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 02:37 GMT, there have been 33546 confirmed cases and 419 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 03:55 GMT, there have been 34717 confirmed cases and 452 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 06:45 GMT, there have been 35060 confirmed cases and 457 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 08:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 10:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 12:46 GMT, there have been 35075 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 14:45 GMT, there have been 35179 confirmed cases and 459 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 16:45 GMT, there have been 40773 confirmed cases and 479 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 18:46 GMT, there have been 41569 confirmed cases and 504 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 20:47 GMT, there have been 42443 confirmed cases and 517 deaths due to coronavirus COVID-19 in the United States
March 23, 2020 at 22:31 GMT, there have been 43449 confirmed cases and 545 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 00:47 GMT, there have been 43718 confirmed cases and 552 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 02:33 GMT, there have been 43734 confirmed cases and 553 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 04:46 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 06:43 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 08:48 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 10:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 12:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 14:47 GMT, there have been 46274 confirmed cases and 588 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 16:47 GMT, there have been 49594 confirmed cases and 622 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 18:45 GMT, there have been 50982 confirmed cases and 655 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 20:42 GMT, there have been 52921 confirmed cases and 684 deaths due to coronavirus COVID-19 in the United States
March 24, 2020 at 22:48 GMT, there have been 53205 confirmed cases and 687 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 00:29 GMT, there have been 53655 confirmed cases and 698 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 02:44 GMT, there have been 54823 confirmed cases and 778 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 04:46 GMT, there have been 54867 confirmed cases and 782 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 06:47 GMT, there have been 54916 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 08:48 GMT, there have been 54935 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 10:43 GMT, there have been 54941 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 12:48 GMT, there have been 54979 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 14:48 GMT, there have been 55081 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 16:48 GMT, there have been 60642 confirmed cases and 817 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 18:48 GMT, there have been 62364 confirmed cases and 878 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 20:33 GMT, there have been 64765 confirmed cases and 910 deaths due to coronavirus COVID-19 in the United States
March 25, 2020 at 22:44 GMT, there have been 65527 confirmed cases and 928 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 00:34 GMT, there have been 65797 confirmed cases and 935 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 02:43 GMT, there have been 66741 confirmed cases and 963 deaths due to coronavirus COVID-19 in the United Stats
March 26, 2020 at 05:24 GMT, there have been 68472 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 07:03 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 09:02 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 11:02 GMT, there have been 68581 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 13:01 GMT, there have been 68594 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 14:52 GMT, there have been 68905 confirmed cases and 1037 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 17:02 GMT, there have been 75069 confirmed cases and 1080 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 19:00 GMT, there have been 79082 confirmed cases and 1143 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 21:01 GMT, there have been 81946 confirmed cases and 1177 deaths due to coronavirus COVID-19 in the United States
March 26, 2020 at 23:02 GMT, there have been 83206 confirmed cases and 1201 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 01:00 GMT, there have been 85280 confirmed cases and 1293 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 03:01 GMT, there have been 85520 confirmed cases and 1297 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 04:36 GMT, there have been 85594 confirmed cases and 1300 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 07:33 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 09:32 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 11:31 GMT, there have been 85749 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 13:32 GMT, there have been 85755 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 15:33 GMT, there have been 86548 confirmed cases and 1321 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 17:32 GMT, there have been 94425 confirmed cases and 1429 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 19:33 GMT, there have been 98180 confirmed cases and 1513 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 21:33 GMT, there have been 100514 confirmed cases and 1546 deaths due to coronavirus COVID-19 in the United States
March 27, 2020 at 23:33 GMT, there have been 102325 confirmed cases and 1591 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 01:32 GMT, there have been 104126 confirmed cases and 1692 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 03:34 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 05:35 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 07:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 09:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 11:40 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 13:36 GMT, there have been 104277 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United Sta
March 28, 2020 at 15:45 GMT, there have been 105726 confirmed cases and 1730 deaths due to coronavirus COVID-19 in the United Sta
March 28, 2020 at 17:45 GMT, there have been 116050 confirmed cases and 1937 deaths due to coronavirus COVID-19 in the United Sta
March 28, 2020 at 19:43 GMT, there have been 118592 confirmed cases and 1979 deaths due to coronavirus COVID-19 in the United Sta
March 28, 2020 at 21:44 GMT, there have been 120204 confirmed cases and 1997 deaths due to coronavirus COVID-19 in the United Sta
March 28, 2020 at 23:43 GMT, there have been 123311 confirmed cases and 2211 deaths due to coronavirus COVID-19 in the United Sta
March 29, 2020 at 01:46 GMT, there have been 123578 confirmed cases and 2221 deaths due to coronavirus COVID-19 in the United Sta

In [622]:
DATA="""March 08, 2020 at 23:30 GMT, there have been 537 confirmed cases and 21 deaths due to coronavirus COVID-19 in the United States.
March 09, 2020 at 04:30 GMT, there have been 589 confirmed cases and 22 deaths due to coronavirus COVID-19 in the United States.
March 10, 2020 at 05:30 GMT, there have been 708 confirmed cases and 27 deaths due to coronavirus COVID-19 in the United States.
March 10, 2020 at 23:35 GMT, there have been 975 confirmed cases and 30 deaths due to coronavirus COVID-19 in the United States.
March 11, 2020 at 04:25 GMT, there have been 1010 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States.
March 11, 2020 at 15:17 GMT, there have been 1016 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States.
March 11, 2020 at 23:35 GMT, there have been 1301 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States.
March 12, 2020 at 03:25 GMT, there have been 1327 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States.
March 12, 2020 at 11:37 GMT, there have been 1336 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States.
March 12, 2020 at 22:00 GMT, there have been 1639 confirmed cases and 40 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 00:05 GMT, there have been 1715 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 01:35 GMT, there have been 1725 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 03:45 GMT, there have been 1747 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 06:00 GMT, there have been 1762 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 15:25 GMT, there have been 1832 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States.
March 13, 2020 at 22:25 GMT, there have been 2269 confirmed cases and 48 deaths due to coronavirus COVID-19 in the United States.
March 14, 2020 at 02:40 GMT, there have been 2291 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States.
March 14, 2020 at 14:10 GMT, there have been 2329 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States.
March 14, 2020 at 16:45 GMT, there have been 2499 confirmed cases and 51 deaths due to coronavirus COVID-19 in the United States.
March 14, 2020 at 23:03 GMT, there have been 2836 confirmed cases and 57 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 05:00 GMT, there have been 2982 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 05:40 GMT, there have been 2995 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 07:05 GMT, there have been 3043 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 19:00 GMT, there have been 3329 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 20:05 GMT, there have been 3400 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 21:15 GMT, there have been 3621 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States.
March 15, 2020 at 22:15 GMT, there have been 3502 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 00:35 GMT, there have been 3714 confirmed cases and 68 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 02:48 GMT, there have been 3777 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 05:36 GMT, there have been 3782 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 08:29 GMT, there have been 3802 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 18:40 GMT, there have been 4186 confirmed cases and 73 deaths due to coronavirus COVID-19 in the United States.
March 16, 2020 at 22:40 GMT, there have been 4597 confirmed cases and 86 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 00:45 GMT, there have been 4667 confirmed cases and 87 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 02:40 GMT, there have been 4704 confirmed cases and 91 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 06:35 GMT, there have been 4727 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 10:31 GMT, there have been 4743 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 14:38 GMT, there have been 4752 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 18:41 GMT, there have been 5723 confirmed cases and 97 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 21:55 GMT, there have been 6211 confirmed cases and 102 deaths due to coronavirus COVID-19 in the United States.
March 17, 2020 at 22:40 GMT, there have been 6349 confirmed cases and 106 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 02:20 GMT, there have been 6499 confirmed cases and 112 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 06:05 GMT, there have been 6522 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 10:10 GMT, there have been 6524 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 16:15 GMT, there have been 7601 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 18:16 GMT, there have been 7708 confirmed cases and 120 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 20:21 GMT, there have been 8710 confirmed cases and 132 deaths due to coronavirus COVID-19 in the United States.
March 18, 2020 at 22:10 GMT, there have been 8998 confirmed cases and 150 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 02:17 GMT, there have been 9371 confirmed cases and 153 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 10:16 GMT, there have been 9464 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 12:18 GMT, there have been 9473 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 14:15 GMT, there have been 9486 confirmed cases and 157 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 16:22 GMT, there have been 10692 confirmed cases and 160 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 18:17 GMT, there have been 11355 confirmed cases and 171 deaths due to coronavirus COVID-19 in the United States.
March 19, 2020 at 22:45 GMT, there have been 13737 confirmed cases and 201 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 00:48 GMT, there have been 13865 confirmed cases and 211 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 02:40 GMT, there have been 14316 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 04:34 GMT, there have been 14336 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 06:35 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 08:10 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 10:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 12:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 14:10 GMT, there have been 14373 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 16:11 GMT, there have been 16067 confirmed cases and 219 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 18:12 GMT, there have been 16545 confirmed cases and 225 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 20:12 GMT, there have been 18121 confirmed cases and 233 deaths due to coronavirus COVID-19 in the United States.
March 20, 2020 at 22:12 GMT, there have been 18876 confirmed cases and 237 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 00:06 GMT, there have been 19393 confirmed cases and 256 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 02:07 GMT, there have been 19643 confirmed cases and 263 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 04:08 GMT, there have been 19652 confirmed cases and 264 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 06:05 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 08:10 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 10:12 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 12:46 GMT, there have been 19775 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 14:48 GMT, there have been 19823 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 16:48 GMT, there have been 22085 confirmed cases and 282 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 18:45 GMT, there have been 22813 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 20:45 GMT, there have been 24142 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States.
March 21, 2020 at 22:45 GMT, there have been 23940 confirmed cases and 301 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 00:40 GMT, there have been 26111 confirmed cases and 324 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 02:40 GMT, there have been 26711 confirmed cases and 341 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 04:45 GMT, there have been 26867 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 06:30 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 08:45 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 10:45 GMT, there have been 26900 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 12:48 GMT, there have been 26905 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 14:45 GMT, there have been 27031 confirmed cases and 349 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 16:42 GMT, there have been 30239 confirmed cases and 388 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 18:48 GMT, there have been 38757 confirmed cases and 400 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 20:44 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States.
March 22, 2020 at 21:41 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 00:44 GMT, there have been 33346 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 02:37 GMT, there have been 33546 confirmed cases and 419 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 03:55 GMT, there have been 34717 confirmed cases and 452 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 06:45 GMT, there have been 35060 confirmed cases and 457 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 08:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 10:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 12:46 GMT, there have been 35075 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 14:45 GMT, there have been 35179 confirmed cases and 459 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 16:45 GMT, there have been 40773 confirmed cases and 479 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 18:46 GMT, there have been 41569 confirmed cases and 504 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 20:47 GMT, there have been 42443 confirmed cases and 517 deaths due to coronavirus COVID-19 in the United States.
March 23, 2020 at 22:31 GMT, there have been 43449 confirmed cases and 545 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 00:47 GMT, there have been 43718 confirmed cases and 552 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 02:33 GMT, there have been 43734 confirmed cases and 553 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 04:46 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 06:43 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 08:48 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 10:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 12:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 14:47 GMT, there have been 46274 confirmed cases and 588 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 16:47 GMT, there have been 49594 confirmed cases and 622 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 18:45 GMT, there have been 50982 confirmed cases and 655 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 20:42 GMT, there have been 52921 confirmed cases and 684 deaths due to coronavirus COVID-19 in the United States.
March 24, 2020 at 22:48 GMT, there have been 53205 confirmed cases and 687 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 00:29 GMT, there have been 53655 confirmed cases and 698 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 02:44 GMT, there have been 54823 confirmed cases and 778 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 04:46 GMT, there have been 54867 confirmed cases and 782 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 06:47 GMT, there have been 54916 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 08:48 GMT, there have been 54935 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 10:43 GMT, there have been 54941 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 12:48 GMT, there have been 54979 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 14:48 GMT, there have been 55081 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 16:48 GMT, there have been 60642 confirmed cases and 817 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 18:48 GMT, there have been 62364 confirmed cases and 878 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 20:33 GMT, there have been 64765 confirmed cases and 910 deaths due to coronavirus COVID-19 in the United States.
March 25, 2020 at 22:44 GMT, there have been 65527 confirmed cases and 928 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 00:34 GMT, there have been 65797 confirmed cases and 935 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 02:43 GMT, there have been 66741 confirmed cases and 963 deaths due to coronavirus COVID-19 in the United Stats.
March 26, 2020 at 05:24 GMT, there have been 68472 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 07:03 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 09:02 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 11:02 GMT, there have been 68581 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 13:01 GMT, there have been 68594 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 14:52 GMT, there have been 68905 confirmed cases and 1037 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 17:02 GMT, there have been 75069 confirmed cases and 1080 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 19:00 GMT, there have been 79082 confirmed cases and 1143 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 21:01 GMT, there have been 81946 confirmed cases and 1177 deaths due to coronavirus COVID-19 in the United States.
March 26, 2020 at 23:02 GMT, there have been 83206 confirmed cases and 1201 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 01:00 GMT, there have been 85280 confirmed cases and 1293 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 03:01 GMT, there have been 85520 confirmed cases and 1297 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 04:36 GMT, there have been 85594 confirmed cases and 1300 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 07:33 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 09:32 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 11:31 GMT, there have been 85749 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 13:32 GMT, there have been 85755 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 15:33 GMT, there have been 86548 confirmed cases and 1321 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 17:32 GMT, there have been 94425 confirmed cases and 1429 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 19:33 GMT, there have been 98180 confirmed cases and 1513 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 21:33 GMT, there have been 100514 confirmed cases and 1546 deaths due to coronavirus COVID-19 in the United States.
March 27, 2020 at 23:33 GMT, there have been 102325 confirmed cases and 1591 deaths due to coronavirus COVID-19 in the United States.
March 28, 2020 at 01:32 GMT, there have been 104126 confirmed cases and 1692 deaths due to coronavirus COVID-19 in the United States.
March 28, 2020 at 03:34 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 05:35 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 07:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 09:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States
March 28, 2020 at 11:40 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States"""

28/03/2020,01:32:00,1585330320,1.98,104126,1695 28/03/2020,03:08:00,1585336080,1.6,104205,1701
In [623]:
DATA=DATA.replace("\n","")
lines=DATA.split(".")
cnt=0
for line in lines:
cnt=cnt+1
line=line.lstrip(" ")
if len(line)>5:print (cnt,line)

1 March 08, 2020 at 23:30 GMT, there have been 537 confirmed cases and 21 deaths due to coronavirus COVID-19 in the United States
2 March 09, 2020 at 04:30 GMT, there have been 589 confirmed cases and 22 deaths due to coronavirus COVID-19 in the United States
3 March 10, 2020 at 05:30 GMT, there have been 708 confirmed cases and 27 deaths due to coronavirus COVID-19 in the United States
4 March 10, 2020 at 23:35 GMT, there have been 975 confirmed cases and 30 deaths due to coronavirus COVID-19 in the United States
5 March 11, 2020 at 04:25 GMT, there have been 1010 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States
6 March 11, 2020 at 15:17 GMT, there have been 1016 confirmed cases and 31 deaths due to coronavirus COVID-19 in the United States
7 March 11, 2020 at 23:35 GMT, there have been 1301 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
8 March 12, 2020 at 03:25 GMT, there have been 1327 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
9 March 12, 2020 at 11:37 GMT, there have been 1336 confirmed cases and 38 deaths due to coronavirus COVID-19 in the United States
10 March 12, 2020 at 22:00 GMT, there have been 1639 confirmed cases and 40 deaths due to coronavirus COVID-19 in the United States
11 March 13, 2020 at 00:05 GMT, there have been 1715 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
12 March 13, 2020 at 01:35 GMT, there have been 1725 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
13 March 13, 2020 at 03:45 GMT, there have been 1747 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
14 March 13, 2020 at 06:00 GMT, there have been 1762 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
15 March 13, 2020 at 15:25 GMT, there have been 1832 confirmed cases and 41 deaths due to coronavirus COVID-19 in the United States
16 March 13, 2020 at 22:25 GMT, there have been 2269 confirmed cases and 48 deaths due to coronavirus COVID-19 in the United States
17 March 14, 2020 at 02:40 GMT, there have been 2291 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States
18 March 14, 2020 at 14:10 GMT, there have been 2329 confirmed cases and 50 deaths due to coronavirus COVID-19 in the United States
19 March 14, 2020 at 16:45 GMT, there have been 2499 confirmed cases and 51 deaths due to coronavirus COVID-19 in the United States
20 March 14, 2020 at 23:03 GMT, there have been 2836 confirmed cases and 57 deaths due to coronavirus COVID-19 in the United States
21 March 15, 2020 at 05:00 GMT, there have been 2982 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
22 March 15, 2020 at 05:40 GMT, there have been 2995 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
23 March 15, 2020 at 07:05 GMT, there have been 3043 confirmed cases and 60 deaths due to coronavirus COVID-19 in the United States
24 March 15, 2020 at 19:00 GMT, there have been 3329 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
25 March 15, 2020 at 20:05 GMT, there have been 3400 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
26 March 15, 2020 at 21:15 GMT, there have been 3621 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
27 March 15, 2020 at 22:15 GMT, there have been 3502 confirmed cases and 63 deaths due to coronavirus COVID-19 in the United States
28 March 16, 2020 at 00:35 GMT, there have been 3714 confirmed cases and 68 deaths due to coronavirus COVID-19 in the United States
29 March 16, 2020 at 02:48 GMT, there have been 3777 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
30 March 16, 2020 at 05:36 GMT, there have been 3782 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
31 March 16, 2020 at 08:29 GMT, there have been 3802 confirmed cases and 69 deaths due to coronavirus COVID-19 in the United States
32 March 16, 2020 at 18:40 GMT, there have been 4186 confirmed cases and 73 deaths due to coronavirus COVID-19 in the United States
33 March 16, 2020 at 22:40 GMT, there have been 4597 confirmed cases and 86 deaths due to coronavirus COVID-19 in the United States
34 March 17, 2020 at 00:45 GMT, there have been 4667 confirmed cases and 87 deaths due to coronavirus COVID-19 in the United States
35 March 17, 2020 at 02:40 GMT, there have been 4704 confirmed cases and 91 deaths due to coronavirus COVID-19 in the United States
36 March 17, 2020 at 06:35 GMT, there have been 4727 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
37 March 17, 2020 at 10:31 GMT, there have been 4743 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
38 March 17, 2020 at 14:38 GMT, there have been 4752 confirmed cases and 93 deaths due to coronavirus COVID-19 in the United States
39 March 17, 2020 at 18:41 GMT, there have been 5723 confirmed cases and 97 deaths due to coronavirus COVID-19 in the United States
40 March 17, 2020 at 21:55 GMT, there have been 6211 confirmed cases and 102 deaths due to coronavirus COVID-19 in the United States
41 March 17, 2020 at 22:40 GMT, there have been 6349 confirmed cases and 106 deaths due to coronavirus COVID-19 in the United States
42 March 18, 2020 at 02:20 GMT, there have been 6499 confirmed cases and 112 deaths due to coronavirus COVID-19 in the United States
43 March 18, 2020 at 06:05 GMT, there have been 6522 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
44 March 18, 2020 at 10:10 GMT, there have been 6524 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
45 March 18, 2020 at 16:15 GMT, there have been 7601 confirmed cases and 116 deaths due to coronavirus COVID-19 in the United States
46 March 18, 2020 at 18:16 GMT, there have been 7708 confirmed cases and 120 deaths due to coronavirus COVID-19 in the United States
47 March 18, 2020 at 20:21 GMT, there have been 8710 confirmed cases and 132 deaths due to coronavirus COVID-19 in the United States
48 March 18, 2020 at 22:10 GMT, there have been 8998 confirmed cases and 150 deaths due to coronavirus COVID-19 in the United States
49 March 19, 2020 at 02:17 GMT, there have been 9371 confirmed cases and 153 deaths due to coronavirus COVID-19 in the United States
50 March 19, 2020 at 10:16 GMT, there have been 9464 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States
51 March 19, 2020 at 12:18 GMT, there have been 9473 confirmed cases and 155 deaths due to coronavirus COVID-19 in the United States
52 March 19, 2020 at 14:15 GMT, there have been 9486 confirmed cases and 157 deaths due to coronavirus COVID-19 in the United States
53 March 19, 2020 at 16:22 GMT, there have been 10692 confirmed cases and 160 deaths due to coronavirus COVID-19 in the United States
54 March 19, 2020 at 18:17 GMT, there have been 11355 confirmed cases and 171 deaths due to coronavirus COVID-19 in the United States
55 March 19, 2020 at 22:45 GMT, there have been 13737 confirmed cases and 201 deaths due to coronavirus COVID-19 in the United States
56 March 20, 2020 at 00:48 GMT, there have been 13865 confirmed cases and 211 deaths due to coronavirus COVID-19 in the United States
57 March 20, 2020 at 02:40 GMT, there have been 14316 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
58 March 20, 2020 at 04:34 GMT, there have been 14336 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
59 March 20, 2020 at 06:35 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
60 March 20, 2020 at 08:10 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
61 March 20, 2020 at 10:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
62 March 20, 2020 at 12:11 GMT, there have been 14366 confirmed cases and 217 deaths due to coronavirus COVID-19 in the United States
63 March 20, 2020 at 14:10 GMT, there have been 14373 confirmed cases and 218 deaths due to coronavirus COVID-19 in the United States
64 March 20, 2020 at 16:11 GMT, there have been 16067 confirmed cases and 219 deaths due to coronavirus COVID-19 in the United States
65 March 20, 2020 at 18:12 GMT, there have been 16545 confirmed cases and 225 deaths due to coronavirus COVID-19 in the United States
66 March 20, 2020 at 20:12 GMT, there have been 18121 confirmed cases and 233 deaths due to coronavirus COVID-19 in the United States
67 March 20, 2020 at 22:12 GMT, there have been 18876 confirmed cases and 237 deaths due to coronavirus COVID-19 in the United States
68 March 21, 2020 at 00:06 GMT, there have been 19393 confirmed cases and 256 deaths due to coronavirus COVID-19 in the United States
69 March 21, 2020 at 02:07 GMT, there have been 19643 confirmed cases and 263 deaths due to coronavirus COVID-19 in the United States
70 March 21, 2020 at 04:08 GMT, there have been 19652 confirmed cases and 264 deaths due to coronavirus COVID-19 in the United States
71 March 21, 2020 at 06:05 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
72 March 21, 2020 at 08:10 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
73 March 21, 2020 at 10:12 GMT, there have been 19774 confirmed cases and 275 deaths due to coronavirus COVID-19 in the United States
74 March 21, 2020 at 12:46 GMT, there have been 19775 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States
75 March 21, 2020 at 14:48 GMT, there have been 19823 confirmed cases and 276 deaths due to coronavirus COVID-19 in the United States
76 March 21, 2020 at 16:48 GMT, there have been 22085 confirmed cases and 282 deaths due to coronavirus COVID-19 in the United States
77 March 21, 2020 at 18:45 GMT, there have been 22813 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States
78 March 21, 2020 at 20:45 GMT, there have been 24142 confirmed cases and 288 deaths due to coronavirus COVID-19 in the United States
79 March 21, 2020 at 22:45 GMT, there have been 23940 confirmed cases and 301 deaths due to coronavirus COVID-19 in the United States
80 March 22, 2020 at 00:40 GMT, there have been 26111 confirmed cases and 324 deaths due to coronavirus COVID-19 in the United States
81 March 22, 2020 at 02:40 GMT, there have been 26711 confirmed cases and 341 deaths due to coronavirus COVID-19 in the United States
82 March 22, 2020 at 04:45 GMT, there have been 26867 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
83 March 22, 2020 at 06:30 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
84 March 22, 2020 at 08:45 GMT, there have been 26892 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
85 March 22, 2020 at 10:45 GMT, there have been 26900 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
86 March 22, 2020 at 12:48 GMT, there have been 26905 confirmed cases and 348 deaths due to coronavirus COVID-19 in the United States
87 March 22, 2020 at 14:45 GMT, there have been 27031 confirmed cases and 349 deaths due to coronavirus COVID-19 in the United States
88 March 22, 2020 at 16:42 GMT, there have been 30239 confirmed cases and 388 deaths due to coronavirus COVID-19 in the United States
89 March 22, 2020 at 18:48 GMT, there have been 38757 confirmed cases and 400 deaths due to coronavirus COVID-19 in the United States
90 March 22, 2020 at 20:44 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
91 March 22, 2020 at 21:41 GMT, there have been 32356 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
92 March 23, 2020 at 00:44 GMT, there have been 33346 confirmed cases and 414 deaths due to coronavirus COVID-19 in the United States
93 March 23, 2020 at 02:37 GMT, there have been 33546 confirmed cases and 419 deaths due to coronavirus COVID-19 in the United States
94 March 23, 2020 at 03:55 GMT, there have been 34717 confirmed cases and 452 deaths due to coronavirus COVID-19 in the United States
95 March 23, 2020 at 06:45 GMT, there have been 35060 confirmed cases and 457 deaths due to coronavirus COVID-19 in the United States
96 March 23, 2020 at 08:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
97 March 23, 2020 at 10:47 GMT, there have been 35070 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
98 March 23, 2020 at 12:46 GMT, there have been 35075 confirmed cases and 458 deaths due to coronavirus COVID-19 in the United States
99 March 23, 2020 at 14:45 GMT, there have been 35179 confirmed cases and 459 deaths due to coronavirus COVID-19 in the United States
100 March 23, 2020 at 16:45 GMT, there have been 40773 confirmed cases and 479 deaths due to coronavirus COVID-19 in the United States
101 March 23, 2020 at 18:46 GMT, there have been 41569 confirmed cases and 504 deaths due to coronavirus COVID-19 in the United States
102 March 23, 2020 at 20:47 GMT, there have been 42443 confirmed cases and 517 deaths due to coronavirus COVID-19 in the United States
103 March 23, 2020 at 22:31 GMT, there have been 43449 confirmed cases and 545 deaths due to coronavirus COVID-19 in the United States
104 March 24, 2020 at 00:47 GMT, there have been 43718 confirmed cases and 552 deaths due to coronavirus COVID-19 in the United States
105 March 24, 2020 at 02:33 GMT, there have been 43734 confirmed cases and 553 deaths due to coronavirus COVID-19 in the United States
106 March 24, 2020 at 04:46 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
107 March 24, 2020 at 06:43 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
108 March 24, 2020 at 08:48 GMT, there have been 46145 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
109 March 24, 2020 at 10:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
110 March 24, 2020 at 12:47 GMT, there have been 46168 confirmed cases and 582 deaths due to coronavirus COVID-19 in the United States
111 March 24, 2020 at 14:47 GMT, there have been 46274 confirmed cases and 588 deaths due to coronavirus COVID-19 in the United States
112 March 24, 2020 at 16:47 GMT, there have been 49594 confirmed cases and 622 deaths due to coronavirus COVID-19 in the United States
113 March 24, 2020 at 18:45 GMT, there have been 50982 confirmed cases and 655 deaths due to coronavirus COVID-19 in the United States
114 March 24, 2020 at 20:42 GMT, there have been 52921 confirmed cases and 684 deaths due to coronavirus COVID-19 in the United States
115 March 24, 2020 at 22:48 GMT, there have been 53205 confirmed cases and 687 deaths due to coronavirus COVID-19 in the United States
116 March 25, 2020 at 00:29 GMT, there have been 53655 confirmed cases and 698 deaths due to coronavirus COVID-19 in the United States
117 March 25, 2020 at 02:44 GMT, there have been 54823 confirmed cases and 778 deaths due to coronavirus COVID-19 in the United States
118 March 25, 2020 at 04:46 GMT, there have been 54867 confirmed cases and 782 deaths due to coronavirus COVID-19 in the United States
119 March 25, 2020 at 06:47 GMT, there have been 54916 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
120 March 25, 2020 at 08:48 GMT, there have been 54935 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
121 March 25, 2020 at 10:43 GMT, there have been 54941 confirmed cases and 784 deaths due to coronavirus COVID-19 in the United States
122 March 25, 2020 at 12:48 GMT, there have been 54979 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States
123 March 25, 2020 at 14:48 GMT, there have been 55081 confirmed cases and 785 deaths due to coronavirus COVID-19 in the United States
124 March 25, 2020 at 16:48 GMT, there have been 60642 confirmed cases and 817 deaths due to coronavirus COVID-19 in the United States
125 March 25, 2020 at 18:48 GMT, there have been 62364 confirmed cases and 878 deaths due to coronavirus COVID-19 in the United States
126 March 25, 2020 at 20:33 GMT, there have been 64765 confirmed cases and 910 deaths due to coronavirus COVID-19 in the United States
127 March 25, 2020 at 22:44 GMT, there have been 65527 confirmed cases and 928 deaths due to coronavirus COVID-19 in the United States
128 March 26, 2020 at 00:34 GMT, there have been 65797 confirmed cases and 935 deaths due to coronavirus COVID-19 in the United States
129 March 26, 2020 at 02:43 GMT, there have been 66741 confirmed cases and 963 deaths due to coronavirus COVID-19 in the United Stats
130 March 26, 2020 at 05:24 GMT, there have been 68472 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
131 March 26, 2020 at 07:03 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
132 March 26, 2020 at 09:02 GMT, there have been 68489 confirmed cases and 1032 deaths due to coronavirus COVID-19 in the United States
133 March 26, 2020 at 11:02 GMT, there have been 68581 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States
134 March 26, 2020 at 13:01 GMT, there have been 68594 confirmed cases and 1036 deaths due to coronavirus COVID-19 in the United States
135 March 26, 2020 at 14:52 GMT, there have been 68905 confirmed cases and 1037 deaths due to coronavirus COVID-19 in the United States
136 March 26, 2020 at 17:02 GMT, there have been 75069 confirmed cases and 1080 deaths due to coronavirus COVID-19 in the United States
137 March 26, 2020 at 19:00 GMT, there have been 79082 confirmed cases and 1143 deaths due to coronavirus COVID-19 in the United States
138 March 26, 2020 at 21:01 GMT, there have been 81946 confirmed cases and 1177 deaths due to coronavirus COVID-19 in the United States
139 March 26, 2020 at 23:02 GMT, there have been 83206 confirmed cases and 1201 deaths due to coronavirus COVID-19 in the United States
140 March 27, 2020 at 01:00 GMT, there have been 85280 confirmed cases and 1293 deaths due to coronavirus COVID-19 in the United States
141 March 27, 2020 at 03:01 GMT, there have been 85520 confirmed cases and 1297 deaths due to coronavirus COVID-19 in the United States
142 March 27, 2020 at 04:36 GMT, there have been 85594 confirmed cases and 1300 deaths due to coronavirus COVID-19 in the United States
143 March 27, 2020 at 07:33 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States
144 March 27, 2020 at 09:32 GMT, there have been 85612 confirmed cases and 1301 deaths due to coronavirus COVID-19 in the United States
145 March 27, 2020 at 11:31 GMT, there have been 85749 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States
146 March 27, 2020 at 13:32 GMT, there have been 85755 confirmed cases and 1304 deaths due to coronavirus COVID-19 in the United States
147 March 27, 2020 at 15:33 GMT, there have been 86548 confirmed cases and 1321 deaths due to coronavirus COVID-19 in the United States
148 March 27, 2020 at 17:32 GMT, there have been 94425 confirmed cases and 1429 deaths due to coronavirus COVID-19 in the United States
149 March 27, 2020 at 19:33 GMT, there have been 98180 confirmed cases and 1513 deaths due to coronavirus COVID-19 in the United States
150 March 27, 2020 at 21:33 GMT, there have been 100514 confirmed cases and 1546 deaths due to coronavirus COVID-19 in the United States
151 March 27, 2020 at 23:33 GMT, there have been 102325 confirmed cases and 1591 deaths due to coronavirus COVID-19 in the United States
152 March 28, 2020 at 01:32 GMT, there have been 104126 confirmed cases and 1692 deaths due to coronavirus COVID-19 in the United States
153 March 28, 2020 at 03:34 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United StatesMarch 28, 2020 at 05:35 GMT, there have been 104205 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United StatesMarch 28, 2020 at 07:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United StatesMarch 28, 2020 at 09:35 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United StatesMarch 28, 2020 at 11:40 GMT, there have been 104256 confirmed cases and 1704 deaths due to coronavirus COVID-19 in the United States

import sqlite3 conn=sqlite3.connect("DATA/CoronaData2.db") c = conn.cursor() sql = '''create table if not exists CORONA(data TEXT);''' conn.execute(sql) DATA=DATA.replace("\n","") lines=DATA.split(".") for line in lines: line=line.lstrip(" ") c.execute("insert into CORONA values (?)",(line,)) conn.commit() conn.close()
In [624]:
for line in DEATHS:
print(line, end=",")

21,22,27,30,31,31,38,38,38,40,41,41,41,41,41,48,50,50,51,57,60,60,60,63,63,63,63,68,69,69,69,73,86,87,91,93,93,93,97,102,106,112,116,116,116,120,132,150,153,155,155,157,160,171,201,211,218,218,217,217,217,217,218,219,225,233,237,256,263,264,275,275,275,276,276,282,288,288,301,324,341,348,348,348,348,348,349,388,400,414,414,414,419,452,457,458,458,458,459,479,504,517,545,552,553,582,582,582,582,582,588,622,655,684,687,698,778,782,784,784,784,785,785,817,878,910,928,935,963,1032,1032,1032,1036,1036,1037,1080,1143,1177,1201,1293,1297,1300,1301,1301,1304,1304,1321,1429,1513,1546,1591,1692,1704,1704,1704,1704,1704,1704,1730,1937,1979,1997,2211,2221,
21,22,27,30,31,31,38,38,38,40,41,41,41,41,41,48,50,50,51,57,60,60,60,63,63,63,63,68,69,69,69,73,86,87,91,93,93,93,97,102,106,112,116,116,116,120,132,150,153,155,155,157,160,171,201,211,218,218,217,217,217,217,218, 219,225,233,237,256,263,264,275,275,275,276,276, 282,288,288,301,324,341,348,348,348,348,348,349, 388,400,414,414,414,419,452,457,458,458,458, 459,479,504,517,545,552,553,582,582,582,582,582, 588,622,655,684,687,698,778,782,784,784,784,785,785, 817,878,910,928,935,963,1032,1032,1032,1036,1036,1037, 1080,1143,1177,1201,1293,1297,1300,1301,1301,1304,1304,1321, 1429,1513,1546,1591,1692,1704,1704,1704,1704,1704,1704, 1730,1937,1979,1997,2211, learned data - 459.0 588.0 817.0 1080.0 1429.0 Based on learned data, next three predicted numbers in the sequence are 1,604.7 1,848.2 2,091.6 459.0 588.0 817.0 1080.0 1429.0 1730.0 Based on learned data, next three predicted numbers in the sequence are 1,931.8 2,193.1 2,454.5 Based on learned data, next three predicted numbers in the sequence are 1,931.3 2,192.4 2,453.6
In [625]:
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression

In [626]:
import numpy as np

# the given sequence
data =[
[0, 459.0],
[1, 588.0],
[2, 817.0],
[3, 1080.0],
[4, 1429.0],
[5,1730],
]

X = np.matrix(data)[:,0]
y = np.matrix(data)[:,1]

def J(X, y, theta):
theta = np.matrix(theta).T
m = len(y)
predictions = X * theta
sqError = np.power((predictions-y),[2])
return 1/(2*m) * sum(sqError)

dataX = np.matrix(data)[:,0:1]
X = np.ones((len(dataX),2))
X[:,1:] = dataX

# gradient descent function
def gradient(X, y, alpha, theta, iters):
J_history = np.zeros(iters)
m = len(y)
theta = np.matrix(theta).T
for i in range(iters):
h0 = X * theta
delta = (1 / m) * (X.T * h0 - X.T * y)
theta = theta - alpha * delta
J_history[i] = J(X, y, theta.T)
return J_history, theta

print('\n'+40*'=')

# theta initialization
theta = np.matrix([np.random.random(),np.random.random()])
alpha = 0.01 # learning rate
iters = 2000 # iterations

print('\n== Model summary ==\nLearning rate: {}\nIterations: {}\nInitial theta: {}\nInitial J: {:.2f}\n'.format(alpha, iters, theta, J(X,y,theta).item()))

print('Training the model... ')
# this actually trains our model and finds the optimal theta value
J_history, theta_min = gradient(X, y, alpha, theta, iters)
print('Done.')
print('\nThe modelled prediction function is:\ny = {:.2f} * x + {:.2f}'.format(theta_min[1].item(), theta_min[0].item()))
print('Its cost equals {:.2f}'.format(J(X,y,theta_min.T).item()))

# This function will calculate the predicted profit
def predict(pop):
r