This output aims to create a web page using R Markdown that features a plot created with Plotly.
2023-08-07
This output aims to create a web page using R Markdown that features a plot created with Plotly.
Using Plotly and diamonds data set, we will generate an interactive scatter plot and analyze its results
library(plotly) data <- diamonds[sample(nrow(diamonds), 1000), ]
We will analyze the diamonds data set and conduct a comparison between the carat and price (in US Dollars) of diamonds.
By examining the plot, we can notice a clear linear relationship between the carat and price of diamonds. As the carat size increases, there is a corresponding increase in the price. This correlation is evident in the color representation, where the dark green points are plotted at the highest carat sizes and prices.