Skip to content

Instantly share code, notes, and snippets.

@kenmomd
Last active March 27, 2020 15:18
Show Gist options
  • Save kenmomd/5aaad75ea09304d0b2579429ce9bb423 to your computer and use it in GitHub Desktop.
Save kenmomd/5aaad75ea09304d0b2579429ce9bb423 to your computer and use it in GitHub Desktop.
とりあえず作った日本のエピカーブ作成のRスクリプトです
#とりあえず作った日本のエピカーブ作成の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