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 scattergeo maps

Create interactive scattergeo maps - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Create interactive scattergeo maps

- [Instructor] Let's learn how to make Scatter geo plots with Leaflet. What's a Scatter geo plot? Well, it's a map with points of interest labeled as points, markers, or potentially circles. Let's open the scatter underscore geo dot r file in our exercise files and begin from there. I've decreased the size of the environment because I don't need to see it. I'll also maximize my console by double-clicking on console, up here. At the top of this script file, I load the tidyverse, because I need a couple of functions from there, so I'll run that command with Command + Shift + Enter. Then, on line three through eight, I define myself a little tibble. A tibble is the tidyverse version of a data frame, so I'll hit Command + Enter to generate my data frame, and that generates me a set of latitude and longitude coordinates from the normal distribution, generates me a column called size, which is from the uniform distribution between five and 10, and a label column, which has the lower case…

Contents