I have data from 1 April 2008 -31 march 2015 (Daily Data).

I wanted to forecast daily Energy Data.From the graphForecast graph ,It is showing that following function is working somehow,so to cross check i decomposed the data(actual + forecasted)Decompostion of forecast,It is showing "Constant Trend" from the point of forecast. By I can conclude that my forecasted data is not correct ,it is picking Seasonality but not Trend. Where i am doing Wrong ? please suggest !!

mydata<-read.csv ("D:/file.csv",header=TRUE);
mydata1<-msts(mydata$Y,seasonal.period=c(7,365.25))
fit<-tbats(mydata1)
plot(forecast(fit))
1

There are 1 best solutions below

4
On

I am not well versed in R and also integrating R and Tableau. However you can run r code directly from tableau if your are good in R. Tableau has built in function called script real using which u can invoke r from tableau and get the output to tableau.

You can create the scripts in r and save the code in a directory and then can call that R function using SCRIPT_REAL from tableau.

Below is the code:

SCRIPT_REAL('
setwd("/path/to/your/working/dir")
source("your_r_file.r")
your_function(param1 = .arg1, param2 = .arg2,)
', [tableau_param1], [tableau_param2])

These links will help you out to begin.

R Sentiment Analysis in Tableau

R Forecasting with Tableau

Integrating Tableau and R for data analytics in four simple steps

Logistic Regression in Tableau using R