This document shows in an interactive map relationship of Mile per Galon (MPG), weight, horsepower and type o transmission from the mtcars database.
d<-format(Sys.Date(), format="%B %d %Y")
print(d)
[1] "agosto 26 2017"
options(warn=-1)
library(plotly)
mtcars$am<-as.factor(mtcars$am)
levels(mtcars$am)<-c("automatic","manual")
plot_ly(x= ~mtcars$mpg, y= ~mtcars$wt, z=~mtcars$hp, color = ~mtcars$am,
text=rownames(mtcars), type="scatter3d", mode = "markers") %>%
layout(title = "Relationship between MPG, Weight, HP and Transmission type",
scene = list(xaxis = list(title = "MPG"),
yaxis = list(title = "Weight (100 lbs)"),
zaxis = list(title = "HorsePower")))