Mohamed Lemine Beydia
12/12/2021
During the assignement for this week,we were asked to Create a web page presentation using R Markdown that features a plot created with Plotly and to host our webpage on either GitHub Pages, RPubs, or NeoCities The dataset used in this presentation is from the Motor Trend Car Road Tests dataset in R and it is called mtcars. The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models).
library(plotly)
data(mtcars)
cars <- mtcars
library(plotly)
p <- plot_ly(cars, x=cars$wt, y=cars$mpg, z=cars$hp,
type="scatter3d", mode="markers",
color=cars$drat, size=cars$qsec) %>%
layout(scene=list(
xaxis = list(title = "Weight (1000 lbs)"),
yaxis = list(title = "miles per gallon"),
zaxis = list(title = "Gross horsepower)"))
)