Skip to content
R for the Rest of Us Logo

Mapping with R

34 lessons

Disambiguating Country Names (01_08)

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

Transcript

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 01_08 project. Then, within the your-turn.R file:

Combine the rnaturalearthdata::countries110 dataset with gapminder_2007 and create a choropleth comparing country populations.

  1. Use countryname() to add a column to gapminder_2007 that contains the ISO3C country codes

  2. Join together the countries110 and gapminder_2007 dataset using your new column

  3. Use mapview() to visualise the lifeExp column

Learn More

The Gapminder dataset used in this video comes from Hans Rosling’s TED Talk and I highly recommend watching it. The animated GIF included in my slides was produced using the gganimate package using this script.

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

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