From the course: Creating Maps with R
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Solution: Visualizing continent populations
From the course: Creating Maps with R
Solution: Visualizing continent populations
(upbeat music) - [Instructor] Let's get started by solving this challenge by loading our packages and reading in our data set. So I'm going to run lines one through seven, and I want to print these two objects to the console so I can see what they look like. World_sf has got two continents, name and continent, and the country population has got the column's name and pop_est. So I want to join these two data sets together. So I'll take world_sf, I'll pipe that into the function left_join. Remembering when joining together sf_objects for tables, we always start with the sf_object, and then I'll provide the country population table. Now because both of these data sets contain the same column name for country name we don't need to provide for by argument. We can see this joins together so that we've got the name, continent and pop_est column. Now let's pipe for into filter because I wanted you to remove Antarctica. I'll…