r Sys.Date()```{r setup, include=FALSE} knitr::opts_chunk$set(echo = FALSE) library(plotly) Welcome to the Presentation This presentation was created for the Developing Data Products course.
We are using the mtcars dataset to visualize car performance.
Today`s date: r Sys.Date()
Visualizing MPG vs Horsepower The following plot is interactive. You can hover over points to see details.
plot_ly(mtcars, x = ~hp, y = ~mpg, type = “scatter”, mode = “markers”, color = ~as.factor(cyl), size = ~wt, text = ~paste(“Car:”, rownames(mtcars))) %>% layout(title = “MPG vs Horsepower by Cylinder Count”, xaxis = list(title = “Horsepower”), yaxis = list(title = “Miles Per Gallon”)) Summary We observed a clear negative correlation between horsepower and MPG.
Larger points represent heavier cars.
Interactive plots allow for deeper data exploration without cluttering the slide.