diff --git a/.gitignore b/.gitignore index f4003f4..5dda642 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,11 @@ COVID.py #ignore all the data files data/* +#except the population one +!data/co-est2020-alldata.csv + #ignore the figure files figures/* -#except the population one -!data/co-est2020-alldata.csv +#except an example +!figures/select_active_cases.png \ No newline at end of file diff --git a/COVID.R b/COVID.R index 65c89ff..5ebad87 100644 --- a/COVID.R +++ b/COVID.R @@ -416,12 +416,12 @@ ggsave(filename = "WI_active_cases.png" , ggplot() + geom_line(data = us_county_data %>% - filter(county_state %in% c("Clallam, Washington", "Cook, Illinois", "Milwaukee, Wisconsin", "Dane, Wisconsin", "Alameda, California", 'Salt Lake, Utah')), + filter(county_state %in% c("Clallam, Washington", "Cook, Illinois", "Milwaukee, Wisconsin", "Dane, Wisconsin", 'Salt Lake, Utah')), aes(x = date, y = active_estimate, color = county)) + geom_label_repel(data = us_county_data %>% - filter(county_state %in% c("Clallam, Washington", "Cook, Illinois", "Milwaukee, Wisconsin", "Dane, Wisconsin", "Alameda, California", 'Salt Lake, Utah'), + filter(county_state %in% c("Clallam, Washington", "Cook, Illinois", "Milwaukee, Wisconsin", "Dane, Wisconsin", 'Salt Lake, Utah'), date %in% maxdate), aes(x = date + 0.5, y = active_estimate, @@ -454,7 +454,7 @@ ggplot() + plot.subtitle = element_text(color = "grey50"), plot.caption = element_text(color = "grey50")) + coord_cartesian(ylim = c(0,NA)) -ggsave(filename = "Important_active_cases.png" , +ggsave(filename = "select_active_cases.png" , path = paste(getwd(),"/figures/", sep = ""), device = "png", width = 11, diff --git a/figures/select_active_cases.png b/figures/select_active_cases.png new file mode 100644 index 0000000..3f110fe Binary files /dev/null and b/figures/select_active_cases.png differ