28 03 2020

Slide 1

Important Information It is especially important to submit this assignment before the deadline, Mar 29, 11:59 PM PDT, because it must be graded by others. If you submit late, there may not be enough classmates around to review your work. This makes it difficult - and in some cases, impossible - to produce a grade. Submit on time to avoid these risks.

Slide 2

Review criterialess The rubric contains the following two questions:

  • Does the web page feature a date and is this date less than two months before the date that you’re grading this assignment?
  • Is the web page a presentation and does it feature an interactive plot that appears to have been created with Plotly?

Slide 3 Let’s create a Three Dimensional ‘Scatterplot3d’ with ‘mtcars’ data

library(plotly)
library(tidyr)
library(dplyr)
library(data.table)
dat <- data.table(mtcars, keep.rownames = TRUE)
dat[rn %like% "^M"]
##                rn  mpg cyl  disp  hp drat    wt  qsec vs am gear carb
##  1:     Mazda RX4 21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4
##  2: Mazda RX4 Wag 21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4
##  3:     Merc 240D 24.4   4 146.7  62 3.69 3.190 20.00  1  0    4    2
##  4:      Merc 230 22.8   4 140.8  95 3.92 3.150 22.90  1  0    4    2
##  5:      Merc 280 19.2   6 167.6 123 3.92 3.440 18.30  1  0    4    4
##  6:     Merc 280C 17.8   6 167.6 123 3.92 3.440 18.90  1  0    4    4
##  7:    Merc 450SE 16.4   8 275.8 180 3.07 4.070 17.40  0  0    3    3
##  8:    Merc 450SL 17.3   8 275.8 180 3.07 3.730 17.60  0  0    3    3
##  9:   Merc 450SLC 15.2   8 275.8 180 3.07 3.780 18.00  0  0    3    3
## 10: Maserati Bora 15.0   8 301.0 335 3.54 3.570 14.60  0  1    5    8

Slide with Plot