plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Added fable/feast support

Open moutikabdessabour opened this issue 2 years ago • 5 comments

Implemented to_basic methods that handle the output of fabletools:autoplot.fbl_ts and Added tests

library(dplyr)
library(forecast)
library(tsibble)

data <- tourism %>%
    filter(Region == "Melbourne") %>%
    `[`(, c("Quarter", "Trips", "Region")) %>%
    distinct(Quarter, .keep_all = TRUE) %>%
    as_tsibble(key = Region) 
p <- data %>%
    model(
        ets = ETS(Trips ~ trend("A")),
    ) %>%
    forecast(h = "5 years") %>%
    autoplot(data)

p

ggplotly(p)

ggplot

ggplotly .

moutikabdessabour avatar Oct 13 '21 05:10 moutikabdessabour

@danton267 would you mind filing an issue to request this feature so that it should up in this list of issues? https://github.com/plotly/plotly.R/issues/created_by/danton267

cpsievert avatar Nov 02 '21 18:11 cpsievert

@moutikabdessabour what package is the model() function from in your example?

cpsievert avatar Nov 02 '21 21:11 cpsievert

@moutikabdessabour if we're going to add support for {fable}/{feasts}, we should try our best to cover anything that one could create via forecast::forecast() + autoplot(), which would at least include forecast::GeomForecast

cpsievert avatar Nov 02 '21 22:11 cpsievert

@cpsievert Ok I will work on it.

moutikabdessabour avatar Nov 02 '21 22:11 moutikabdessabour

@cpsievert The model function is exported from the {fabletools} package

moutikabdessabour avatar Nov 03 '21 10:11 moutikabdessabour