Note that the interactive plots displayed in this slide deck do not seem to render well (if at all) in Firefox. Chrome and Safari appear to be unaffected by this issue (though this has not been thoroughly tested). YMMV.
This repository contains a slide deck entitled "Advanced R Data Visualization," which was presented to UC Berkeley Epidemiology PhD students on 16 March 2017. Included in the presentation are examples of the use of ggplot2 and a subset of the interactive graphic authoring packages currently available for R. The deck was built using the R package xaringan, with support from knitr, R Markdown, and pandoc. Extensions employed in this deck include:
- the remark.js framework,
- the RefManageR bibliography manager, and
- the highlight.js syntax highlighter.
The file for the main deck is index.html, built from the RMarkdown file index.Rmd. To recompile in R:
# install.packages("rmarkdown")
library(rmarkdown)
render("index.Rmd")
browseURL("index.html")
The relevant code used to generate the presentation has been purl()
ed out into index.R. If you wish to recreate the plots interactively but not rerender the deck, this is the file you should use. Note: To step through this R script as-is, the following R packages should be installed from CRAN unless otherwise noted (versions used to successfully render this document are included for reference):
- WHO v0.2
- ggplot2 v2.2.1
- sysfonts v0.5
- showtext v0.4-6
- dplyr v0.5.0
- ggrepel v0.6.5
- tidyr v0.6.1
- ggdendro v0.1-20
- gtable v0.2.0
- ggiraph v0.3.2.9000 (install via
devtools::install_github()
as of this writing) - gdtools v0.1.3
- plotly v4.5.6
- DT v0.2
- jsonlite v1.3
- leaflet v1.1.0
- googleVis v0.6.2
The following packages are additionally required to render index.Rmd:
- rmarkdown v1.3
- RefManageR v0.13.1
- pander v0.6.0
Note: the googleVis
graphic to which there is a link on slide 76 requires Flash. Your browser may require additional configuration to display this graphic when working from a local repository.
- Improved
leaflet
example - Resized
rbokeh
output - Dog tax