From the course: Creating Maps with R

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Join shapefiles with data in Excel files

Join shapefiles with data in Excel files

From the course: Creating Maps with R

Join shapefiles with data in Excel files

- [Speaker] When building maps and working with geospatial data, it's extremely common to find yourself needing to combine together shape files and data living inside of Excel files. Joining these data sets is achieved with the joint functions from the tidy R package. If you're completely new to the idea of joining data sets, then I recommend the tidyexplain package that provides GIFs that explain how each of the joins work. We're also going to make use of the countrycode package to facilitate joining our two data sets together. I'd like you to open the standardizing country names to R script in the O2_O2b project. And let's start running the code. Lines 1 through 5, we're going to load our packages. Line nine, we're going to read in our shape files. And line 11, we will read in our Excel file. We now want to join these two datasets together so that we get an SF object. To do so, we must start with our SF object.…

Contents