Daily website visits by year

daily_visits <- visits %>% 
  mutate(
    dt = as.Date(visitStartTime)) %>% 
  group_by(dt) %>% 
  summarise(
    number_of_visits_per_day = n(),
    .groups = "drop")
    
ggplotly(daily_visits %>% ggplot( aes(x= year(dt), y = number_of_visits_per_day, fill = factor(year(dt)))) +
  geom_boxplot() +
  geom_jitter(size = 0.5)+
  labs(
    x = "year",
    y = "Number of visits",
    title = "How many visitors enter daily on the website",
    fill = "year"))