business-science / timetk

Time series analysis in the `tidyverse`
https://business-science.github.io/timetk/
613 stars 101 forks source link

Feature request: an equivalent of the feasts::gg_season() #123

Open guzu92 opened 2 years ago

guzu92 commented 2 years ago

It seems that timetk does not avec the equivalent of the feasts::gg_season()function. I was trying to plot with timetk (+ ggplot) the 3 last plots of the vic_elec dataset (as a tibble !), I just could not do it.

With regards to the a10 dataset plot on the same page, it was easy (see below), but for the vic_elec dataset mentioned above it would require more lines of code.

gp_a10 <- a10_tbl %>% 
  tk_seasonal_diagnostics(.date_var = Month, 
                          .value = Cost) %>% 
  ggplot() +
  geom_line(mapping = aes(x = month.lbl, 
                          y = .value, 
                          group = year, 
                          color = year))
ggplotly(gp_a10)
mdancho84 commented 1 year ago

I'm going to look into this more for timetk's next CRAN release. This one has to go due to some recipes fixes. But I like this idea. 👍