Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- raw %>% group_by(dt) %>%
- summarise(mean = mean(price, na.rm = TRUE), median = median(price, na.rm = TRUE)) %>%
- ggplot(aes(x = dt)) +
- geom_rect(aes(xmin = as.Date("2018-01-01"),
- xmax = as.Date("2018-01-15"),
- ymin = -Inf, ymax = Inf), fill = "gray", alpha = 0.01) +
- geom_point(aes(y = mean), col = "blue") +
- geom_point(aes(y = median), col = "red") +
- scale_x_date(date_breaks = "week") +
- theme(axis.text.x = element_text(angle = 90))
Add Comment
Please, Sign In to add comment