This is a piece of project, which is required to create a web page presentation using R Markdown that features a plot created with Plotly.
The project used stock prices of 06 tech giants, which were extracted from NASDAQ. They are: Google (‘GOOGL’), Tesla (‘TSLA’), Facebook (‘FB’), Amazon (‘AMZN’), Microsoft (‘MSFT’), and Apple (‘AAPL’).
Link is enclosed: https://www.nasdaq.com/market-activity/stocks/screener
## Warning: package 'plotly' was built under R version 4.0.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.0.3
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Warning: package 'tidyverse' was built under R version 4.0.3
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v tibble 3.0.4 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.5.1
## v purrr 0.3.4
## Warning: package 'tibble' was built under R version 4.0.3
## Warning: package 'stringr' was built under R version 4.0.3
## Warning: package 'forcats' was built under R version 4.0.3
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks plotly::filter(), stats::filter()
## x dplyr::lag() masks stats::lag()
## Warning: package 'tseries' was built under R version 4.0.3
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Warning: package 'quantmod' was built under R version 4.0.3
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
## Loading required package: TTR
## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
##
## This message is shown once per session and may be disabled by setting
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## GOOGL TSLA FB AMZN AAPL MSFT
## 2020-01-02 1368.68 86.052 209.78 1898.01 75.0875 160.62
## 2020-01-03 1361.52 88.602 208.67 1874.97 74.3575 158.62
## 2020-01-06 1397.81 90.308 212.60 1902.88 74.9500 159.03
## 2020-01-07 1395.11 93.812 213.06 1906.86 74.5975 157.58
## 2020-01-08 1405.04 98.428 215.22 1891.97 75.7975 160.09
## 2020-01-09 1419.79 96.268 218.30 1901.05 77.4075 162.09
## Warning: package 'reshape' was built under R version 4.0.3
##
## Attaching package: 'reshape'
## The following object is masked from 'package:dplyr':
##
## rename
## The following objects are masked from 'package:tidyr':
##
## expand, smiths
## The following object is masked from 'package:plotly':
##
## rename
## date stock_name close_price
## 1 2020-01-02 .GOOGL 1368.68
## 2 2020-01-03 .GOOGL 1361.52
## 3 2020-01-06 .GOOGL 1397.81
## 4 2020-01-07 .GOOGL 1395.11
## 5 2020-01-08 .GOOGL 1405.04
## 6 2020-01-09 .GOOGL 1419.79
## No scatter mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
## Warning: Ignoring unknown aesthetics: text
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'