This course provides an overview of the statistical software R (https://www.r-project.org) and describes several R packages to create static and interactive visualizations, build R packages, create websites, and to easily turn analyses into visually informative and interactive reproducible reports, dashboards, and Shiny web applications that facilitate reproducible research and the communication of insights to collaborators and policymakers.
Objectives: After taking this course, students should be able to use R to create the following:
Week 1: Introduction to R and RStudio (data types, data manipulation, analysis and visualization)
Week 2: R packages for visualization: static visualizations with ggplot2 (including time series and maps)
Week 3: R packages for visualization: interactive visualizations with plotly, gganimate and HTML widgets
Week 3-1 plotly and gganimate:
library(plotly)
<- ggplot() + geom_*()
p ggplotly(p)
library(gganimate)
<- ggplot() + geom_*() + transition_*()
p
p# If plot does not render automatically, use animate()
library(gifski)
animate(p, renderer = gifski_renderer()) # produces gif
Week 3-2 HTML widgets:
Week 4: Reproducible reports with R Markdown. Dashboards with flexdashboard. GitHub (creating R projects and hosting websites)
Week 5: Shiny web applications: user interface, server function,
inputs, outputs, layout
Week 6: Shiny web applications: reactive expressions. Sharing Shiny
apps. Interactive dashboards with flexdashboard and Shiny
Week 7: Break. Shiny web applications: spatial example
Week 8: Presentations
Week 9: Creating websites with several R Markdown documents. Creating presentations with R Markdown
Week 10: R packages for accessing and visualizing open spatial data
Week 11: Presentations
Week 12: Building R Packages: organizing, documenting and testing
code
Week 13: Building R Packages: software review and best practices.
Websites for packages. Hexstickers
Week 14: Authoring books and technical documents with bookdown. Creating websites with blogdown
Week 15: Presentations
You may not copy or distribute the course materials.