6/22/2020

Coursera / John Hopkins Data Science Specialization

Course 9 - Week 3 Course Project

Creating a Plot with Plotly including Current Date

Author: LT


Load libraries and generate current date/time

library(plotly)
library(tidyr)
library(dplyr)
# Insert current date/time
date <- Sys.time()

Generate Plotly plot
Current Date: 2020-06-22 13:10:15

# Insert simple plotly plot
plot_ly(mtcars, x = ~wt, y = ~mpg, mode = "markers", 
        color=as.factor(mtcars$cyl), size=~hp, width = 600, height = 300)