Is there a way, we can highlight the week days somehow ?
Since it varies each day and month
for e.g.
1st Day of Jan might be Tuesday but
1st Day of Feb need not be same day
therefore, cannot use facet at all
But is there a way to high light when we have facet_grid as
month and year Is there a way to highlight weekday on such plot !!!
Please consider the reprex
library(tidyverse)
# Dataset available @
# https://raw.githubusercontent.com/jbrownlee/Datasets/master/shampoo.csv
data = read_csv("shampoo.csv")
data %>% #glimpse()
mutate(date = as.Date(Month, format = "%d-%m"),
month = format(as.Date(date), format = "%m"),
week_day = weekdays(as.Date(date)),
Month = NULL) %>%
# filter(date < as.Date("2019-02-01")) %>%
ggplot(aes(date,Sales, group = 1)) +
geom_point() +
facet_grid(vars(week_day),vars(month))
Thanks for recommendation.
Actually, since we can now differentiate between weekday vs weekend, we dont need Facet at all
We can use geom_point for distinguishing these difference and connect all the geom_points with line
now, the visualization has line and points (bigger and colorful)