projects
/
python.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b55010b
)
Update to the new URL.
author
Francois Fleuret
<francois@fleuret.org>
Sun, 29 Mar 2020 15:10:21 +0000
(17:10 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Sun, 29 Mar 2020 15:10:21 +0000
(17:10 +0200)
covid19.py
patch
|
blob
|
history
diff --git
a/covid19.py
b/covid19.py
index
3d80907
..
beccb9b
100755
(executable)
--- a/
covid19.py
+++ b/
covid19.py
@@
-23,7
+23,7
@@
def gentle_download(url, delay = 86400):
######################################################################
nbcases_filename = gentle_download(
######################################################################
nbcases_filename = gentle_download(
- 'https://
github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed
.csv'
+ 'https://
raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global
.csv'
)
######################################################################
)
######################################################################
@@
-43,7
+43,7
@@
with open(nbcases_filename, newline='') as csvfile:
if not country in nb_cases:
nb_cases[country] = numpy.zeros(len(times))
elif col_nb >= time_col:
if not country in nb_cases:
nb_cases[country] = numpy.zeros(len(times))
elif col_nb >= time_col:
- if field == '': field = '0'
+
#
if field == '': field = '0'
nb_cases[country][col_nb - time_col] += int(field)
countries = list(nb_cases.keys())
nb_cases[country][col_nb - time_col] += int(field)
countries = list(nb_cases.keys())