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 - R Tutorial
From the course: R: Interactive Visualizations with htmlwidgets
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…
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 Leaflet library?6m 10s
-
(Locked)
Create interactive scattergeo maps9m 56s
-
(Locked)
Change map styles in Leaflet4m 36s
-
(Locked)
Prepare data for a choropleth plot9m 48s
-
(Locked)
Create interactive choropleth maps10m 7s
-
(Locked)
Create interactive geolines maps13m 50s
-
(Locked)
Add legends to Leaflet maps7m 52s
-
(Locked)
Extract click information from Leaflet6m 35s
-
-
-
-
-
-