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 scatter charts and bubble charts

Create interactive scatter charts and bubble charts - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Create interactive scatter charts and bubble charts

- [Instructor] Scatter charts, line charts, and bubble charts are very useful charts for visualizing a wide range of different datasets. Let's look at how we can create these in a highcharter. We'll open up our exercise file, scatter-and-bubble.R, and we'll minimize the environment because we don't need it for now. At the top of our script file, we can see we load the tidyverse. We have library("tidyverse"), which I'll run with Command + Enter, and you'll notice, we don't actually load the highcharter library, so let's do that. Let's load library("highcharter"). We'll hit Command + Enter, and, as with every time we load the highcharter library, we're reminded Highcharts is not free for commercial or governmental use. Now, to generate our scatter plot, we need some scatter data. So let's use read_csv to import a csv file and store it against the variable scatter_data. We can see printed in our console a summary of the columns in our dataset, and that's quite useful to just see. We can…

Contents