added example figure

Signed-off-by: Ben Varick <ben@dendroalsia.net>
This commit is contained in:
Ben Varick 2022-01-05 21:38:15 -08:00
parent a6914eb726
commit ad677e7e46
Signed by: ben
SSH Key Fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
3 changed files with 8 additions and 5 deletions

7
.gitignore vendored
View File

@ -9,8 +9,11 @@ COVID.py
#ignore all the data files #ignore all the data files
data/* data/*
#except the population one
!data/co-est2020-alldata.csv
#ignore the figure files #ignore the figure files
figures/* figures/*
#except the population one #except an example
!data/co-est2020-alldata.csv !figures/select_active_cases.png

View File

@ -416,12 +416,12 @@ ggsave(filename = "WI_active_cases.png" ,
ggplot() + ggplot() +
geom_line(data = us_county_data %>% 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, aes(x = date,
y = active_estimate, y = active_estimate,
color = county)) + color = county)) +
geom_label_repel(data = us_county_data %>% 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), date %in% maxdate),
aes(x = date + 0.5, aes(x = date + 0.5,
y = active_estimate, y = active_estimate,
@ -454,7 +454,7 @@ ggplot() +
plot.subtitle = element_text(color = "grey50"), plot.subtitle = element_text(color = "grey50"),
plot.caption = element_text(color = "grey50")) + plot.caption = element_text(color = "grey50")) +
coord_cartesian(ylim = c(0,NA)) coord_cartesian(ylim = c(0,NA))
ggsave(filename = "Important_active_cases.png" , ggsave(filename = "select_active_cases.png" ,
path = paste(getwd(),"/figures/", sep = ""), path = paste(getwd(),"/figures/", sep = ""),
device = "png", device = "png",
width = 11, width = 11,

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB