Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
厚労省のCOVID-19オープンデータ
[go: Go Back, main page]

厚労省のCOVID-19オープンデータ

厚労省はCOVID-19関係のデータをオープンデータとして公開するようになった。これをRでプロットしてみる:

df = read.csv("https://www.mhlw.go.jp/content/pcr_positive_daily.csv", fileEncoding="UTF-8-BOM")
plot(as.POSIXct(df[[1]]), df[[2]], type="h", xlab="月", ylab="感染者数", lwd=3, col="orange")

さらに死亡数を重ねてみる:

df2 = read.csv("https://www.mhlw.go.jp/content/death_total.csv", fileEncoding="UTF-8-BOM")
points(as.POSIXct(df2[[1]])[-1], diff(df2[[2]]), type="h", lwd=3, col="red")