# NOT RUN {
# }
# NOT RUN {
library(googleAnalyticsModelR)
library(googleAnalyticsR)
library(plotly)
# create your htmlwidget output - in this case plot.ly
output <- ga_time_normalised(81416156, interactive_plot = TRUE)
# if you have a plot.ly account, you can generate a static image
plotly_IMAGE(output$plot, out_file = "tweet.png")
# now upload - assumes auto-authentication with googleCloudStorage
library(googleCloudStorageR)
ga_model_tweet(output,
"@HoloMarked",
"Test2 ga_model twitter upload",
bucket = "mark-edmondson-public-read",
image = "tweet.png")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab