Last active
March 27, 2020 15:18
-
-
Save kenmomd/5aaad75ea09304d0b2579429ce9bb423 to your computer and use it in GitHub Desktop.
とりあえず作った日本のエピカーブ作成のRスクリプトです
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
#とりあえず作った日本のエピカーブ作成のRスクリプトです | |
#とりあえずエクセルで、不明、不詳、N/Aを空白にしてRで削除する形でやりました | |
library(tidyverse) | |
library(readxl) | |
#エクセルファイルから読み込み | |
P <- read_excel("positivelist.xlsx") | |
P %>% | |
select(都道府県,年齢,発症日) %>% | |
gather(key = variable,value = 都道府県, -発症日, -年齢) -> P2 | |
g1 <- ggplot(P2,aes(x=発症日))+ | |
geom_histogram()+ | |
scale_x_datetime(date_breaks = "1 months", date_labels = "%B")+ | |
facet_wrap(~ 都道府県)+ | |
theme_minimal(base_size = 14, base_family = "HiraKakuPro-W3") | |
g1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment