Developing Data Products Project - Tooth Growth

Raphael Parrado

June 1, 2019

The Objective

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!

Review Criteria

The Plan - The Tooth Growth Data Set

ToothGrowth data set contains the result from an experiment studying the effect of vitamin C on tooth growth in 60 Guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, (orange juice or ascorbic acid (a form of vitamin C and coded as VC).

## [1] 60  3
##    len supp dose
## 1  4.2   VC  0.5
## 2 11.5   VC  0.5
## 3  7.3   VC  0.5
## 4  5.8   VC  0.5
## 5  6.4   VC  0.5
## 6 10.0   VC  0.5

How is growth compared by the method (using base plotly)

plot_ly(data=ToothGrowth,y=~len, x=~supp ,type="box")

What if we subdivide by dose? (using plotly + ggplot2)

graph <- ggplot(ToothGrowth, aes(factor(supp),len)) +
  geom_boxplot(aes(fill=supp),show.legend = FALSE) +
  facet_grid(.~dose)+ 
  labs(title ="Tooth Growth by Supportive Method for each Dose",
       x="Method", y="Length") +
  theme_classic()
gg <- ggplotly(graph)
gg

Conclusion

Thanks for Reviewing