Professional Documents
Culture Documents
Q17 - Financial Market Data
Q17 - Financial Market Data
library(ggplot2)
library(reshape2)
library(plotly)
# 1. How does stock price relate to both volume traded and market capitalization?
print(market_data)
# 5. Compare the 3D plots of stock price against both volume traded and market cap
separately
# 3D plot of Stock Price vs Volume Traded
plot_ly(market_data, x = ~Volume_Traded, y = ~Stock_Price, z = ~Market_Cap, type =
'scatter3d', mode = 'markers') %>%
layout(title = "3D Scatter Plot of Stock Price vs Volume Traded",
scene = list(xaxis = list(title = "Volume Traded (millions)"),
yaxis = list(title = "Stock Price ($)"),
zaxis = list(title = "Market Cap ($ millions)")))