I'm making bar charts that show the difference between groups over separate periods, however I also want to shade out certain bars that don't meet certain criteria (i.e CV > 20 or Sample_size < 30).
Can someone please help me to do this? I've attached a picture as an example of what I'm looking for my output to look like (mocked up in excel), and some example data below.
Thanks a million!!
Example data:
structure(list(Group = c("A", "B", "C", "D", "E", "F", "G", "H",
"I", "J", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J"),
Perc = c(38, 38, 46, 27, 18, 39, 43, 27, 38, 40, 39, 39,
50, 32, 33, 41, 52, 32, 43, 43), Lower_CI = c(36, 36, 36,
15, 8, 31, 30, 14, 18, 23, 38, 37, 40, 21, 15, 31, 40, 17,
24, 27), Upper_CI = c(39, 40, 57, 39, 27, 47, 55, 40, 58,
56, 41, 41, 60, 44, 51, 51, 64, 47, 63, 60), CV = c(2, 2,
11, 12, 28, 11, 15, 6, 18, 13, 2, 2, 10, 19, 5, 13, 12, 23,
14, 20), Sample_size = c(30, 15, 140, 40, 69, 75, 56, 256,
45, 536, 4852, 785, 36, 48, 315, 120, 83, 15, 123, 45), Period = c(1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)), row.names = c(NA,
-20L), class = c("tbl_df", "tbl", "data.frame"))


