ComBINeS - Show off your data

Dr. Nandor Poka @ 24.06.2020

Julia

In [1]:
using CSV;
In [2]:
using Plots;
plotlyjs()

Unable to load WebIO. Please make sure WebIO works for your Jupyter client. For troubleshooting, please see the WebIO/IJulia documentation.

/opt/julia/artifacts/a42f5c72a500a8683c08a5e818d27a104fc9cd5a/lib/node_modules/electron/dist/electron: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory
Out[2]:
Plots.PlotlyJSBackend()
In [2]:
using PlotlyJS;

Unable to load WebIO. Please make sure WebIO works for your Jupyter client. For troubleshooting, please see the WebIO/IJulia documentation.

In [3]:
bw_infections= CSV.read("COVID_BW.csv", skipto=8, footerskip=3)
bw_deaths=CSV.read("COVID_BW_deaths.csv", skipto=8, footerskip=3)
Out[3]:

44 rows × 102 columns (omitted printing of 96 columns)

Column1Column2Column3Column4Column5Column6
StringInt64Int64Int64Int64Int64
1Alb-Donau-Kreis2727272727
2Baden-Baden (Stadtkreis)1919191919
3Biberach3434343434
4Böblingen4747474747
5Bodenseekreis88888
6Breisgau-Hochschwarzwald7171717171
7Calw2727272727
8Emmendingen4343434343
9Enzkreis2121212121
10Esslingen116116116115115
11Freiburg im Breisgau (Stadtkreis)7878787878
12Freudenstadt3838383838
13Göppingen3939393939
14Heidelberg (Stadtkreis)77777
15Heidenheim4141414141
16Heilbronn4242424241
17Heilbronn (Stadtkreis)1616161616
18Hohenlohekreis4747474747
19Karlsruhe7979797979
20Karlsruhe (Stadtkreis)1313131313
21Konstanz1616161616
22Lörrach6161616161
23Ludwigsburg7272727272
24Main-Tauber-Kreis1010101010
25Mannheim (Stadtkreis)1313131313
26Neckar-Odenwald-Kreis2121212121
27Ortenaukreis126126126126125
28Ostalbkreis3737373737
29Pforzheim (Stadtkreis)88888
30Rastatt1717171717
In [4]:
color_range_values=Float64[];
for i =1:44
    push!(color_range_values, (bw_deaths.Column2[i]/bw_infections.Column2[i])*100)
end
color_range_values
Out[4]:
44-element Array{Float64,1}:
  4.147465437788019
 10.27027027027027
  5.657237936772046
  3.2959326788218792
  2.711864406779661
  6.2335381913959615
  3.562005277044855
  8.082706766917292
  3.1390134529147984
  6.280454791553872
  8.024691358024691
  6.666666666666667
  4.905660377358491
  ⋮
  5.283505154639175
  4.049844236760125
  3.829160530191458
  6.77382319173364
  5.172413793103448
  4.381443298969072
  4.128440366972478
  4.643962848297214
  4.518664047151278
  1.7361111111111112
 11.217948717948719
  6.3426688632619435
In [5]:
bar(bw_infections.Column2)
Out[5]:
Plots.jl
In [6]:
plot(bw_infections.Column2)
Out[6]:
Plots.jl
In [7]:
sc = scatter(bw_infections.Column2, bw_deaths.Column2, marker_z = color_range_values, color = :viridis, lab=false)
inf_hist = histogram(bw_infections.Column2, bins=10, xticks=0:250:2000, lab=false)
death_hist = histogram(bw_deaths.Column2, bins=10, lab=false)
plot(inf_hist,death_hist,sc, size=(700,700), layout=3)
Out[7]:
Plots.jl
In [11]:
inf_hist = Plot(histogram(x=bw_infections.Column2, bins=10 ))
death_hist = Plot(histogram(y=bw_deaths.Column2, bins=10))
nat_scat=Plot(scatter(x=bw_infections.Column2, y=bw_deaths.Column2, mode="markers", marker=(color=color_range_values, colorscale="Viridis",showscale=true)))
empty_plot=Plot()
p=Plot([inf_hist empty_plot 
        nat_scat death_hist])
#p.layout=Layout(autosize = false,height = 800, width = 600)
p
Out[11]: