Closed zkamvar closed 5 years ago
Since the check passed, I'm going to merge this feature into the master branch.
happy to see @jakobschumacher working on this! (servus!) Think the episquares addition would make a lot of epis quite happy, but the horizontal lines i dont think is the cleanest solution for this, can get quite messy!
but the horizontal lines i dont think is the cleanest solution for this, can get quite messy!
Agreed. That's why in this PR, I've swapped out horizontal lines for an extra grid of empty cells overlaying the bars. It makes it so you can add obnoxious colors to the chart:
library(incidence)
library(outbreaks)
require(ggplot2)
#> Loading required package: ggplot2
onset <- ebola_sim$linelist$date_of_onset
sex <- ebola_sim$linelist$gender
inc.week.gender <- incidence(onset, interval = 7, groups = sex)
## show individual cases at the beginning of the epidemic
inc.week.8 <- subset(inc.week.gender, to = "2014-06-01")
plot(inc.week.8, show_cases = TRUE, border = "purple", color = c(f = "grey20", m = "grey80"))
Created on 2018-10-31 by the reprex package (v0.2.1)
ah sweet, love it! Obnoxious colours very majestic. Chucking coord_equal() on the end sometimes makes nice boxes making cleaner looking, but depends on number of cases and timeframe
This was a request from the Bulgaria workshop and in general from EPIET folks. @jakobschumacher had contributed an example of how to do this using horizontal lines in the vignette. However, adding this as a single option is best to avoid frustrated epis (as @aspina7 mentioned). Here's what it looks like in practice:
Created on 2018-10-31 by the reprex package (v0.2.1)