24/06/2020

Synopsis

This presentation is submission for the week 3 assignment of developing data products course.

Load libraries and dataset

library(plotly)
data("airquality")
head(airquality)
##   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
## 4    18     313 11.5   62     5   4
## 5    NA      NA 14.3   56     5   5
## 6    28      NA 14.9   66     5   6

Simple Plot

plot_ly(airquality, x = ~ Temp, y = ~ Ozone, type = "scatter", color = ~ factor(Month))
## Warning: Ignoring 37 observations

Plot with sizes

plot_ly(airquality, x = ~ Temp, y = ~ Ozone, type = "scatter", color = ~ factor(Month), size = ~Solar.R)
## Warning: Ignoring 37 observations
## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.

## Warning: `line.width` does not currently support multiple values.