R workshop - Final Project
Author: Hasin Anwar ID: 2011328030
Welcome to my final project of the R workshop. This project reflects the insights gained during the workshop, showcasing a dedicated application of knowledge. The primary focus lies in visually representing stock prices through diverse techniques, encompassing static graphs, interactive graphs, and animations.
The data-set used in this project is: LINK
Stock Price Trend
## 'data.frame': 2956 obs. of 7 variables:
## $ Date : chr "2010-06-29" "2010-06-30" "2010-07-01" "2010-07-02" ...
## $ Open : num 3.8 5.16 5 4.6 4 ...
## $ High : num 5 6.08 5.18 4.62 4 ...
## $ Low : num 3.51 4.66 4.05 3.74 3.17 ...
## $ Close : num 4.78 4.77 4.39 3.84 3.22 ...
## $ Adj.Close: num 4.78 4.77 4.39 3.84 3.22 ...
## $ Volume : int 93831500 85935500 41094000 25699000 34334500 34608500 38557000 20253000 11012500 13400500 ...
Graph Overview: The graphical representation presented above delineates the historical stock prices of Tesla, spanning from its momentous Initial Public Offering (IPO) in 2010 through the year 2022.The dynamic red line traces the trajectory of daily closing prices, providing a visual narrative of the company’s stock performance over the years. The X-axis denotes the chronological progression of time, segmented by years, while the Y-axis accurately portrays the corresponding stock prices, encapsulating the fluctuations and trends that have characterized Tesla’s financial journey.
Trading Volume
## 'data.frame': 2956 obs. of 7 variables:
## $ Date : chr "2010-06-29" "2010-06-30" "2010-07-01" "2010-07-02" ...
## $ Open : num 3.8 5.16 5 4.6 4 ...
## $ High : num 5 6.08 5.18 4.62 4 ...
## $ Low : num 3.51 4.66 4.05 3.74 3.17 ...
## $ Close : num 4.78 4.77 4.39 3.84 3.22 ...
## $ Adj.Close: num 4.78 4.77 4.39 3.84 3.22 ...
## $ Volume : int 93831500 85935500 41094000 25699000 34334500 34608500 38557000 20253000 11012500 13400500 ...
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Explanation: The visual representation above encapsulates Tesla’s market activity over the years, extending from its landmark Initial Public Offering (IPO) in 2010 to the conclusion of 2022. The bars on the graph illustrates the daily trading volume, a crucial metric that mirrors the intensity of market participation. The X-axis meticulously chronicles the passage of time, delineated by years, while the Y-axis accurately portrays the corresponding trading volumes. This graphical portrayal provides a compelling overview of how market interest and participation have evolved alongside Tesla’s journey, offering valuable insights into the ebb and flow of trading dynamics.
Candlestick Chart
## 'data.frame': 2956 obs. of 7 variables:
## $ Date : chr "2010-06-29" "2010-06-30" "2010-07-01" "2010-07-02" ...
## $ Open : num 3.8 5.16 5 4.6 4 ...
## $ High : num 5 6.08 5.18 4.62 4 ...
## $ Low : num 3.51 4.66 4.05 3.74 3.17 ...
## $ Close : num 4.78 4.77 4.39 3.84 3.22 ...
## $ Adj.Close: num 4.78 4.77 4.39 3.84 3.22 ...
## $ Volume : int 93831500 85935500 41094000 25699000 34334500 34608500 38557000 20253000 11012500 13400500 ...
Explanation: Above graph shows the fluctuations in Tesla’s daily stock prices through the candlestick chart. Spanning from its inaugural Initial Public Offering on June 29, 2010, to March 15, 2022, this visual representation vividly captures the open, close, high, and low prices each day. The candlesticks offer a nuanced perspective, allowing for a quick grasp of daily market trends and patterns, providing an insightful glimpse into the journey of Tesla’s stock performance over the years.
Animation with Stock Prices
## 'data.frame': 2956 obs. of 7 variables:
## $ Date : chr "2010-06-29" "2010-06-30" "2010-07-01" "2010-07-02" ...
## $ Open : num 3.8 5.16 5 4.6 4 ...
## $ High : num 5 6.08 5.18 4.62 4 ...
## $ Low : num 3.51 4.66 4.05 3.74 3.17 ...
## $ Close : num 4.78 4.77 4.39 3.84 3.22 ...
## $ Adj.Close: num 4.78 4.77 4.39 3.84 3.22 ...
## $ Volume : int 93831500 85935500 41094000 25699000 34334500 34608500 38557000 20253000 11012500 13400500 ...
## Warning in geom_text(aes(label = paste0("Price: $", round(Price, 2))), hjust =
## 1.1, : Ignoring unknown parameters: `face`
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?
Explanation: The animated chart above showcases Tesla’s stock prices from 2010 to 2022. Watch as the fluctuations unfold, offering a visually compelling journey through the highs and lows of the market.