R: Interactive Visualizations with htmlwidgets

0
Join & Subscribe
LinkedIn Learning
Free Trial Available
English
Certificate Available
5 hours worth of material
selfpaced

Overview

Learn how to rapidly create rich, interactive data visualizations with R and htmlwidgets—packages that connect R to popular JavaScript libraries like Plotly, Leaflet, and DT.

Using the R language almost exclusively, htmlwidgets allow you to create the same interactive maps, charts, and graphs you see on popular data journalism sites and in BI dashboards. You can connect R to popular JavaScript libraries—such as Plotly and Leaflet—with htmlwidget packages. The interactive visualizations you create can be used in R Markdown reports and presentations, and even integrated into rich, responsive Shiny applications. This course introduces you to the fundamental skills needed to add htmlwidgets to your R workflow.

Start by learning to manage packages and structure data for visualizations with the tidyverse and the pipe operator. Then there is an important question: Which library should you choose? The course introduces five popular options: Leaflet, Plotly, Highcharter, visNetwork, and DataTables (DT). Instructor Martin Hadley shows how to use these libraries to create scattergeo, choropleth, and geolines maps; stacked bar charts, scatter charts, bubble charts, and heat maps; treemaps and time series charts; interactive networks and graphs; and responsive, interactive data tables. Plus, learn how to customize your visualizations with legends and tooltips, and extract click information for Shiny apps.

Syllabus

Introduction
  • Welcome
  • What you should know
  • Exercise files
1. Getting Started with htmlwidgets
  • What are htmlwidgets?
  • Where can you use htmlwidgets?
  • Set up RStudio for htmlwidgets
  • Install htmlwidget libraries
  • Select the best htmlwidget
  • Use the pipe operator (%>%)
  • Prepare data to be tidy
2. Creating Interactive Maps with Leaflet
  • What is the Leaflet library?
  • Create interactive scattergeo maps
  • Change map styles in Leaflet
  • Prepare data for a choropleth plot
  • Create interactive choropleth maps
  • Create interactive geolines maps
  • Add legends to Leaflet maps
  • Extract click information from Leaflet
3. Creating Interactive Charts with Plotly
  • What is the Plotly library?
  • Make ggplot2 interactive using Plotly
  • Create interactive stacked bar charts
  • Interactive scatter, line, and bubble charts with Leaflet
  • Create interactive maps
  • Specify custom colors
  • Customize tooltips
  • Combine multiple charts
  • Extract click information from Plotly
4. Creating Interactive Charts with Highcharter
  • What is the Highcharter library?
  • Create interactive stacked bar charts
  • Create interactive scatter charts and bubble charts
  • Create interactive time series
  • Create interactive treemaps
  • Create interactive choropleth maps
  • Specify your own colors
  • Modify tooltips in Highcharter
  • Extract click information from Highcharter
5. Creating Interactive Networks with visNetwork
  • What is the visNetwork library?
  • Create basic network diagrams
  • Style visNetwork graph
  • Use visNetwork with igraph
  • Choose graph layouts and embeddings
  • Cluster nodes in visNetwork using groups
  • Add legends to visNetwork
  • Extract click information from visNetwork
6. Creating Interactive Tables
  • What is the DT library?
  • Create interactive data tables with DT
  • Format columns and data
  • Design responsive (mobile-ready) tables
  • Allow users to download data
  • Extract click information from data tables
Conclusion
  • Next steps

Taught by

Charlie Joey Hadley