This question already has an answer here:
- Join CSV file to shapefile 4 answers
I'm looking to perform what I've been taught is called a spatial join. After researching this further, it's looking like this operation is most often called a table join. So sorry for any confusion in the wording!
What I want to accomplish is very straightforward. I have a CSV that contains data for admin boundaries in the Philippines. I have a shapefile of said admin boundaries. I want to join these together in R to make choropleth maps. Easy enough, right?
As you can see, the Admin category of the CSV file matches the REGION category of the shapefile's attributes. Once those are joined, I am easily able to create choropleth maps from any of the other attributes from the CSV. Quick dummy-proof example here:
Now how the heck do I do this in R? It seems like it should be really easy to do, but I can't find much information, as all of my queries have yielded results of spatial joins concerning "join attributes by location" from data management tools in QGIS. I am not trying to find out which points fall within x polygons. I simply need to join the CSV to the shapefile so that I can make a choropleth map!
This question seems most similar to what I'm asking, but I couldn't sift through it enough to make sense of what I needed out of it.