January 2026

Introduction

This presentation demonstrates an interactive data product created using R Markdown and Plotly.

Dataset

We use the built-in mtcars dataset.

Interactive Plot (Plotly)

The interactive plot below shows the relationship between car weight and MPG.

library(plotly)

plot_ly( data = mtcars, x = ~wt, y = ~mpg, type = “scatter”, mode = “markers”, color = ~as.factor(cyl), text = ~paste(“Horsepower:”, hp) )

Model

A simple linear regression model is used to predict MPG based on

weight and horsepower. model <- lm(mpg ~ wt + hp, data = mtcars) summary(model)$coef

Conclusion

This presentation includes:

A recent date

An interactive Plotly visualization

A reproducible R Markdown presentation

```{r, echo=FALSE} head(mtcars)