From the course: R: Interactive Visualizations with htmlwidgets

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create interactive treemaps

Create interactive treemaps - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Create interactive treemaps

- [Instructor] Tree maps are very useful visualizations where you want to visualize hierarchical relationships or co-occurrences in data. For instance in group memberships. Let's have a look at how to build such charts in high charter. So I'll open up treemap.R, I'll minimize my environment because I don't need to see it for this exercise. At the top of a script file, I load the tidyverse library with command enter. This loads the standard libraries from the tidyverse for me. I'm also going to load the high charter library at the top of the script file. So if I type library, highcharter and hit command enter and as always when you load a high charter library you're given a reminder as a message that high chart is not free for commercial or governmental use. Now the data set that we're going to be working with is available from the doi that can see in a comment on line three. We import a local version of this data set from the data folder using read_csv and assign it to the variable…

Contents