Skip to content
R for the Rest of Us Logo

Mapping with R

34 lessons

Compare Locations/Events with Geobubble Charts in leaflet (03_05)

This lesson is locked

Get access to all lessons in this course.

If the video is not playing correctly, you can watch it in a new window


Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Open the 03_05 project.

Use the your-turn.R script in 03_05 to create a geobubble chart of the busiest airports in the US.

  • Ensure small circles are not overlapped by bigger circles

  • Give the circles both a fill color and border color

  • Add a label to each airport

Learn More

In the video I mentioned that the {leaflegend} package provides the ability to add a bubble size legend. The 03_05 folder also includes an example script demonstrating how to use this package.

I’ve purposefully not added the fill legend to this chart as I feel it is confusing using two different aesthetics to communicate the same variable. However, in the 03_06 folder I’ve included a script that shows you how to do this.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.