Coronavirus geographical distribution

plotted over time
Download the raw data to a file:
In[]:=
file=URLDownload["https://docs.google.com/spreadsheets/d/1yZv9w9zRKwrGTaR-YzmAqMefw4wMlaXocejdxZaTs6w/export?format=xlsx"];
Import the file as a XLSX spreadsheet:
In[]:=
xlsx=Import[file,"XLSX"];
Process one day of the data and convert it to a map of the world:
In[]:=
ComputeCoronaVirusMap[data_,n_]:=Module{ds,countries,max,map,date},​​ds=Map[​​<|​​"region"Interpreter["AdministrativeDivision"][First[#]<>" "<>#[[2]]]/.{_FailureMissing["NotAvailable"]},​​"country"Interpreter["Country"][#[[2]]],​​"date"#[[3]],​​"cases"Interpreter["Integer"][#[[4]]]/.{_Missing0},​​"deaths"Interpreter["Integer"][#[[5]]],​​"recoveries"Interpreter["Integer"][Last[#]]​​|>&,DeleteCases[Rest[data],{""..}]]//Dataset;​​countries=Join
Alaska, United States
ADMINISTRATIVE DIVISION
,
world
GEOGRAPHIC REGION

countries
;​​max=Max@Normal[ds[All,Log[1+N[#cases]]&]];​​date=Echo@ds[1,"date"];​​map=Graphics[{​​{EdgeForm[{White,AbsoluteThickness[0.1]}],FaceForm[Gray],Map[#["Polygon"]&,countries]},​​Map[{EdgeForm[White],FaceForm[Blend[{LightOrange,Red},Log[1+N[#cases]]/max]],#region["Polygon"]}&,Normal[ds[All,<|"region"If[MissingQ[#region],#country,#region],"cases"#cases|>&]]]​​},ImageSize1024,BackgroundWhite,PlotLabelDateString[date]];​​Export["D:\\coronavirus\\out-"<>IntegerString[n,10,3]<>".png",map]​​
Compute a map for every day or time interval:
In[]:=
Table[ComputeCoronaVirusMap[xlsx[[i]],1+Length[xlsx]-i],{i,Length[xlsx]}]
»
Thu 30 Jan 2020 21:30:00GMT-6.
»
Thu 30 Jan 2020 11:00:00GMT-6.
»
Wed 29 Jan 2020 21:00:00GMT-6.
»
Wed 29 Jan 2020 14:30:00GMT-6.
»
Wed 29 Jan 2020 13:30:00GMT-6.
»
Tue 28 Jan 2020 23:00:00GMT-6.
»
Tue 28 Jan 2020 18:00:00GMT-6.
»
Tue 28 Jan 2020 13:00:00GMT-6.
»
Mon 27 Jan 2020 20:30:00GMT-6.
»
Mon 27 Jan 2020 19:00:00GMT-6.
»
Mon 27 Jan 2020 09:00:00GMT-6.
»
Sun 26 Jan 2020 23:00:00GMT-6.
»
Sun 26 Jan 2020 11:00:00GMT-6.
»
Sat 25 Jan 2020 22:00:00GMT-6.
»
Sat 25 Jan 2020 12:00:00GMT-6.
»
Sat 25 Jan 2020 00:00:00GMT-6.
»
Fri 24 Jan 2020 12:00:00GMT-6.
»
Fri 24 Jan 2020 00:00:00GMT-6.
»
Thu 23 Jan 2020 12:00:00GMT-6.
»
Wed 22 Jan 2020 12:00:00GMT-6.
»
Tue 21 Jan 2020 00:00:00GMT-6.
Out[]=
{D:\coronavirus\out-021.png,D:\coronavirus\out-020.png,D:\coronavirus\out-019.png,D:\coronavirus\out-018.png,D:\coronavirus\out-017.png,D:\coronavirus\out-016.png,D:\coronavirus\out-015.png,D:\coronavirus\out-014.png,D:\coronavirus\out-013.png,D:\coronavirus\out-012.png,D:\coronavirus\out-011.png,D:\coronavirus\out-010.png,D:\coronavirus\out-009.png,D:\coronavirus\out-008.png,D:\coronavirus\out-007.png,D:\coronavirus\out-006.png,D:\coronavirus\out-005.png,D:\coronavirus\out-004.png,D:\coronavirus\out-003.png,D:\coronavirus\out-002.png,D:\coronavirus\out-001.png}
Read in the saved PNG images:
In[]:=
res=Map[Import,FileNames["*.png","D:\\coronavirus"]];
Export them as an animated GIF:
In[]:=
Export["D:\\tmp\\out.gif",res,"DisplayDurations"1,AnimationRepetitions->Infinity]
Out[]=
D:\tmp\out.gif
Copy final GIF to the GitHub repository:
In[]:=
CopyFile["D:\\tmp\\out.gif","D:\\git\\coronavirus\\out.gif"]
Out[]=
D:\git\coronavirus\out.gif
​