Korona virus

Projekt - Alen

Razdelitev stikov na različne vrste: družina, služba, prijatelji, drugi. Mere samozaščitnosti. Ali je mogoče te količine meriti na telefonu.

Slovenski podatki

> D <- read.csv("https://raw.githubusercontent.com/slo-covid-19/data/master/csv/stats.csv")
> names(D)
 [1] "day"                                "date"
 [3] "phase"                              "tests.performed.todate"
 [5] "tests.performed"                    "tests.positive.todate"
 [7] "tests.positive"                     "cases.confirmed.todate"
 [9] "cases.confirmed"                    "cases.active.todate"
[11] "cases.closed.todate"                "cases.hs.employee.confirmed.todate"
[13] "cases.rh.employee.confirmed.todate" "cases.rh.occupant.confirmed.todate"
[15] "state.in_hospital"                  "state.icu"
[17] "state.critical"                     "state.in_hospital.todate"
[19] "state.out_of_hospital.todate"       "state.deceased.todate"
[21] "state.recovered.todate"             "region.lj.todate"
[23] "region.ce.todate"                   "region.nm.todate"
[25] "region.mb.todate"                   "region.kr.todate"
[27] "region.sg.todate"                   "region.po.todate"
[29] "region.ms.todate"                   "region.kp.todate"
[31] "region.za.todate"                   "region.ng.todate"
[33] "region.kk.todate"                   "region.foreign.todate"
[35] "region.todate"                      "age.0.4.todate"
[37] "age.5.14.todate"                    "age.15.24.todate"
[39] "age.25.34.todate"                   "age.35.44.todate"
[41] "age.45.54.todate"                   "age.55.64.todate"
[43] "age.65.74.todate"                   "age.75.84.todate"
[45] "age.85..todate"                     "age.todate"
[47] "age.female.0.4.todate"              "age.female.5.14.todate"
[49] "age.female.15.24.todate"            "age.female.25.34.todate"
[51] "age.female.35.44.todate"            "age.female.45.54.todate"
[53] "age.female.55.64.todate"            "age.female.65.74.todate"
[55] "age.female.75.84.todate"            "age.female.85..todate"
[57] "age.female.todate"                  "age.male.0.4.todate"
[59] "age.male.5.14.todate"               "age.male.15.24.todate"
[61] "age.male.25.34.todate"              "age.male.35.44.todate"
[63] "age.male.45.54.todate"              "age.male.55.64.todate"
[65] "age.male.65.74.todate"              "age.male.75.84.todate"
[67] "age.male.85..todate"                "age.male.todate"
> dim(D)
[1] 41 68
> D[is.na(D)] <- 0
> Day <- D$day
> Day
 [1] -8 -7 -6 -5 -4 -3 -2 -1  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
[28] 19 20 21 22 23 24 25 26 27 28 29 30 31 32
> Date <- as.character(D$date)
> Date
 [1] "2020-02-24" "2020-02-25" "2020-02-26" "2020-02-27" "2020-02-28" "2020-02-29"
 [7] "2020-03-01" "2020-03-02" "2020-03-03" "2020-03-04" "2020-03-05" "2020-03-06"
[13] "2020-03-07" "2020-03-08" "2020-03-09" "2020-03-10" "2020-03-11" "2020-03-12"
[19] "2020-03-13" "2020-03-14" "2020-03-15" "2020-03-16" "2020-03-17" "2020-03-18"
[25] "2020-03-19" "2020-03-20" "2020-03-21" "2020-03-22" "2020-03-23" "2020-03-24"
[31] "2020-03-25" "2020-03-26" "2020-03-27" "2020-03-28" "2020-03-29" "2020-03-30"
[37] "2020-03-31" "2020-04-01" "2020-04-02" "2020-04-03" "2020-04-04"
> Tests <- D$tests.performed
> Tests
 [1]   NA   21   41   43   35   16   17   54   48   51  103  278  177  238  367  542
[17]  749 1045 1197  916  590  871 1121 1026 1184 1242  872  731 1257 1243 1181 1075
[33] 1387  997  596 1125 1288 1095 1064 1188   NA
> Positive <- D$tests.positive
> Positive
 [1] NA NA NA NA NA NA NA NA NA  1  5  4  6  4 11 18 33 49 48 36 35 27 10 32 23 26 38
[28] 35 36 48 46 61 52 46 26 46 39 56 37 43 NA
> Hospital <- D$state.in_hospital
> Hospital
 [1]  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  18  17  22  29
[21]  33  32  38  43  47  46  51  52  56  69  78  81 102 100 108 117 110 109 108 114
[41] 109
> Critical <- D$state.critical
> Critical
 [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  1  3  2  3  1 NA NA  2  2  2
[28]  4 10 10 13 15 20 20 20 24 25 26 28 26 27
> Deceased <- D$state.deceased.todate
> Deceased
 [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA  1  1  1  1  1  1  1  1
[28]  2  3  4  5  7  9  9 11 13 15 15 16 20 22
> D <- read.csv("https://raw.githubusercontent.com/slo-covid-19/data/master/csv/stats.csv")
> names(D)
> D[is.na(D)] <- 0
> Day <- D$day
> Date <- as.character(D$date)
> Tests <- D$tests.performed
> Positive <- D$tests.positive
> Hospital <- D$state.in_hospital
> Critical <- D$state.critical
> Deceased <- D$state.deceased.todate

> n <- nrow(D)
> Hosp <- c(0,Hospital[2:n]-Hospital[1:(n-1)])
> Crit <- c(0,Critical[2:n]-Critical[1:(n-1)])
> Dece <- c(0,Deceased[2:n]-Deceased[1:(n-1)])

PDF to text

Extract data from SVG path

d="m 0,55.277142 4.7619047,4.685413 4.7619047,-1.713169 4.7619046,0.962383 4.761905,0.297131 
4.761906,1.535606 4.761903,-2.948124 4.761904,-3.409599 4.761906,-1.239453 4.761905,-0.910476 
4.761906,10.419006 4.761902,-2.892898 4.761906,-0.47168 4.761905,1.077557 4.761902,0.634868 
4.76191,0.356304 4.761901,0.603943 4.761902,-1.501999 4.76191,-2.814506 4.761902,3.312771 
4.761909,-5.440464 L 100,43.322399 l 4.7619,17.750992 4.76191,-5.180096 4.7619,0.546536 
4.76191,-18.363102 4.76191,8.662597 4.7619,29.904473 4.7619,9.922287 4.76191,-4.973473 
4.76191,9.957932 4.7619,-0.638825 4.7619,1.236534 4.7619,-1.062873 4.7619,4.633194 
4.76192,33.648425 4.7619,-40.198253 4.76191,6.106789 4.7619,-1.394822 4.7619,3.833359 
4.76192,-4.880287 4.7619,0.235153 L 200,128.62906"

> dy1 <- c(55.277142 ,4.685413 ,-1.713169 ,0.962383 ,0.297131 ,1.535606 ,-2.948124 ,-3.409599 ,
+ -1.239453 ,-0.910476 ,10.419006 ,-2.892898 , -0.47168 ,1.077557 ,0.634868 ,0.356304 ,0.603943 ,
+ -1.501999 ,-2.814506 ,3.312771 ,-5.440464 )
> dy2 <- c(43.322399 ,17.750992 ,-5.180096 ,0.546536 ,-18.363102 ,8.662597 ,29.904473 ,9.922287 ,
+ -4.973473 ,9.957932 ,-0.638825 ,1.236534 , -1.062873 ,4.633194 ,33.648425 ,-40.198253 ,
+ 6.106789 ,-1.394822 ,3.833359 ,-4.880287 ,0.235153 )
> dy3 <- c(128.62906)
> y1 <- cumsum(dy1); y2 <- cumsum(dy2); y3 <- cumsum(dy3)
> y <- 297 - c(y1,y2,y3) # in SVG the (0,0) is the left upper corner
> n <- length(y); x <- 1:n
> plot(x,y,pch=16,cex=0.5,type="l",lw=2)

> y <- 60 - c(y1,y2,y3) # in SVG the (0,0) is the left upper corner
> Y <- 1.30*y; plot(x,Y,type="l",lwd=2)
> lines(c(0,n),c(0,0),col="red"); lines(c(0,n),c(-40,-40),col="blue")

http://vladowiki.fmf.uni-lj.si/lib/exe/fetch.php?media=pics:work:cv19:sipic.pdf

vlado/work/cv19.txt · Last modified: 2021/02/10 04:03 by vlado
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki