8/4/2020

R Markdown Presentation & Plotly

Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity!

Description

  • I’ll be showing a plot of Miles/(US) gallon (mpg) vs Weight (1000 lbs) (wt).
  • I have used the mtcars dataset.
  • The size of the dot, i.e. the radius of the circle is directly proportional to Number of cylinders (cyl).

Loading Plotly

data("mtcars")
library(plotly)

Scatter plot using Plotly

plot_ly(mtcars, x = ~ wt, y = ~ mpg, mode = "markers", size = ~ cyl)

Thank you!!