Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > glimpse(pdata_world)
- Observations: 108
- Variables: 2
- $ date <date> 2019-04-01, 2019-04-02, 2019-04-03, 2019-04-04, 2019-04-05, 2019-04-06, 2019-04-07, 2019-04-08, 2019-04-09…
- $ organic_installs <dbl> 1572, 1593, 2391, 2857, 2015, 2677, 3800, 3308, 855, 2122, 4420, 2979, 4324, 4532, 3775, 3490, 3487, 3605, …
- > glimpse(usa_launch_overlay)
- Observations: 1
- Variables: 2
- $ start <date> 2019-05-28
- $ end <date> 2019-05-30
- > glimpse(marketing_campaign_overlay)
- Observations: 1
- Variables: 2
- $ start <date> 2019-06-24
- $ end <date> 2019-07-17
- pdata_world %>%
- ggplot(aes(x = date, y = organic_installs)) +
- geom_line() +
- geom_rect(data = marketing_campaign_overlay, inherit.aes = F,
- aes(xmin = start, xmax = end,
- ymin = -Inf, ymax = Inf,
- alpha = "Marketing Campaign"),
- fill = "black") +
- geom_rect(data = usa_launch_overlay, inherit.aes = F,
- aes(xmin = start, xmax = end,
- ymin = -Inf, ymax = Inf,
- alpha = "USA Launch"),
- fill = "blue") +
- scale_alpha_manual(name = '', values = c("USA Launch" = 0.1, "Marketing Campaign" = 0.1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement