Last active
March 24, 2020 12:39
-
-
Save Gro-Tsen/d07878262cb6dd32793135afd60b3c78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/pcm-dpc/COVID-19/ | |
cd COVID-19 | |
fgrep -i lombardia dati-regioni/dpc-covid19-ita-regioni.csv | cut -d , -f 11,12 | perl -pe 's/,/\t/g' > /tmp/lombardia.dat | |
(echo 'set terminal pngcairo size 800,600' ; echo 'set output "/tmp/lombardia.png"' ; echo 'plot "/tmp/lombardia.dat" using ($0+1):($2/$1), -0.01199*x+0.35964') | gnuplot | |
R | |
data = read.table("/tmp/lombardia.dat", header=FALSE, sep="\t") | |
colnames(data) = c("cases", "variation") | |
data$id <- seq.int(nrow(data)) | |
fit = lm(data$variation/data$cases ~ data$id) | |
summary(fit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment