- The plot shows the RCL stock prices since Dec 2007
- The data was obtained as a CSV from http://www.nasdaq.com/symbol/rcl/historical
- prices were presented as a Plotly graph
January 3, 2018
# Get Data
setwd("~/Course9 - DevelopingDataProducts/DDP")
rcl <- read.csv("HistoricalQuotes.csv",header = T)
# Format the Various Fonts and Axes Titles
f1 <- list(family = "Arial, sans-serif",
size = 18,
color = "lightgrey")
f2 <- list(family = "Old Standard TT, serif",
size = 7,
color = "black")
b <- list(title = "Date",showticklabels = TRUE,
tickangle = 45,titlefont = f1,tickfont = f2)
a <- list(title = "Price",showticklabels = TRUE,
titlefont = f1,tickfont = f2)
p <- plot_ly(rcl,x=~date) %>% add_lines(y=~open,name="Open") %>%
add_lines(y=~close,name="Close") %>%
add_lines(y=~high,name="High") %>%
add_lines(y=~low,name="Low") %>%
layout(xaxis = b, yaxis = a)