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 stacked bar charts - R Tutorial
From the course: R: Interactive Visualizations with htmlwidgets
Create interactive stacked bar charts
- [Instructor] Bar charts are excellent visualization tools for comparing variables across multiple categories. For instance, you might be interested in visualizing the number of movies in each genre on Netflix. If you have subcategories data, for instance, you break down comedies to include romantic and horror comedies, then stacked bar charts are what you want to use. Highcharter makes it easy to build these charts. Let's see how in the bar-charts.R file. So I'll open that file. I minimize my environment because I don't need it. At the top of the script file, we load the tidyverse library. We Command + Enter. We import our data using read_csv and store it against the gig_economy_data variable. Now on line six through eight, I use two deep prior verbs: first, group_by to group my data by country_group, and then summarize to count the number of rows in each group using the function n and store this data in a new column called jobs.in.country. Let's run this code with Command + Enter…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
What is the Highcharter library?7m 29s
-
(Locked)
Create interactive stacked bar charts5m 52s
-
(Locked)
Create interactive scatter charts and bubble charts7m
-
(Locked)
Create interactive time series6m 8s
-
(Locked)
Create interactive treemaps4m 38s
-
(Locked)
Create interactive choropleth maps9m 59s
-
(Locked)
Specify your own colors4m 34s
-
(Locked)
Modify tooltips in Highcharter6m 11s
-
(Locked)
Extract click information from Highcharter9m 27s
-
-
-
-