4.4 Learn more

Many of the packages for these types of interactive graphics were developed by people at R Studio, and they have an excellent website with more information about the htmlwidgets family. This website links through to tutorials for each package, including DT, plotly, and leaflet, with lots of examples and the code behind them. This website also has a gallery, with great examples.

Lots of people are using htmlwidgets to create interesting visualizations through R, and they will often blog about what they did. If you want more examples of how to create visualizations with a certain package (e.g., leaflet), it’s worth googling something like “blog post R leaflet example.”29 Some of the htmlwidgets R packages have the same name as the Javascript library they’re associated with, so be sure to include “R” in your Google search, so you’ll find examples in the right programming language.

Once you’ve worked some with the htmlwidgets packages, you should also check out Shiny. Shiny allows you to create much more complex interactive graphics in R—actual web applications, where the R code to create the visualization is re-run when the user interacts with elements of the visualization. To get an idea of the things you can create with Shiny, you should check out the Shiny gallery and Show Me Shiny.