9/1/2020

Load the data set

The data set I chose for this assignment is the built-in data set “airquality” in R, which recorded daily air quality measurements in New York from May to September 1973.

data("airquality")
data <- airquality; head(data, 3)
##   Ozone Solar.R Wind Temp Month Day
## 1    41     190  7.4   67     5   1
## 2    36     118  8.0   72     5   2
## 3    12     149 12.6   74     5   3

Plot with Plotly

library(plotly)
plot_ly(data, x = ~Day, y = ~Ozone, type = "scatter", 
        mode = "lines", color = ~Month)