Back to Course

Mapping with R

0% Complete
0/0 Steps
  1. Welcome to Mapping with R (01_01)
  2. Geospatial Data
    Making Maps is Complex (01_02)
  3. mapview for Quick Maps (01_03)
  4. sf for Simple Features (01_04)
  5. Turning Data Frames into sf Objects (01_05)
  6. Importing Shapefiles (01_06)
  7. Joining Geospatial Datasets (01_07)
  8. Disambiguating Country Names (01_08)
  9. Converting Addresses to Coordinates (01_09)
  10. U.S.-Specific Datasets (01_10)
  11. Advice on Finding International Datasets (01_11)
  12. CRS and Projections: Geographic and Projected CRS (01_12)
  13. CRS and Projections: How to Choose a CRS (01_13)
  14. Introducing Raster GIS with raster and stars (01_14)
  15. Basics of Using the raster Package (01_15)
  16. Static Maps
    ggplot2 Essentials (02_01)
  17. Starting a Map in ggplot2 (02_02)
  18. Labelling ggplot2 Maps (02_03)
  19. Compare Locations/Events with Geobubble Charts (02_04)
  20. Highlight a Region in a Country with ggplot2 (02_05)
  21. Make a Choropleth Map of Discrete Variables with ggplot2 (02_06)
  22. Make a Choropleth Map of Continuous Variables with ggplot2 (02_07)
  23. Faceting Choropleth Maps with ggplot2 (02_08)
  24. Visualize Raster Data with ggplot2 (02_09)
  25. Adding Scale Bars and North Arrows with ggplot2 (02_10)
  26. Interactive Maps
    What is leaflet? (03_01)
  27. Starting a Map in leaflet (03_02)
  28. Necessary HTML for Labelling leaflet Maps (03_03)
  29. Highlight a Region in a Country with leaflet (03_04)
  30. Compare Locations/Events with Geobubble Charts in leaflet (03_05)
  31. Make a Choropleth Map of Discrete Variables with leaflet (03_06)
  32. Make a Choropleth Map of Continuous Variables with leaflet (03_07)
  33. Visualize Raster Data with leaflet (03_08)
  34. Wrapping Up
    You Did It!
Lesson 8 of 34
In Progress

Disambiguating Country Names (01_08)

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
Solutions
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!