Welcome to the ‘GIS mapping in R’ workshop! ‘GIS’ stands for Geographic Information System, which the National Geographic Society helpfully define as “a computer system for capturing, storing, checking, and displaying data related to positions on Earth’s surface” (it’s more exciting than it sounds, I promise!)
At this point I should point out (if you didn’t know already) that I’m not a geographer by trade, nor a computer scientist. I’m a linguist! All the techniques I’m covering here are self-taught and this workshop only really scratches the surface when it comes to the power of GIS. Hopefully this will give a good introduction to how GIS can be performed in R and how easy it is to do some pretty cool geospatial analysis, including making some pretty maps!
This workshop is designed specifically with linguists in mind. But the thing is, GIS doesn’t have any specific methods for linguists! It doesn’t matter what kind of datasets you’re working with, or what academic lens you’re using to look at these things. GIS methods are GIS methods, and that’s reflected in how I’ve structured/designed this workshop - I’ll be introducing most of the key concepts/techniques through non-linguistic examples before giving you some linguistic data for you to put these new skills into practice in specific case studies (namely, dialectology and linguistic typology)
How it’ll work in the live session: I’ll go through the materials in a live ‘walkthrough’ to demonstrate all the different techniques in geospatial analysis, and you can follow along at the same time (if you can keep up!). Throughout these materials, the R code will appear in chunks. In all cases, the output of each chunk of code will also appear below. For example:
print("I love maps. I'd be lost without them")
## [1] "I love maps. I'd be lost without them"
Exercise
At the end of each section, and at various points during them, there will be exercises for you to work on independently and put these techniques into practice (or catch up with the live-coding parts if you couldn’t keep up!).
In these exercises, the code (and output) will be hidden by default so you can try it yourself first before revealing the ‘solution’. For example:
print("Why are maps rubbish at playing poker? They always fold.")
## [1] "Why are maps rubbish at playing poker? They always fold."
Note: at various points in this workshop you’ll need to load in external datasets and shapefiles - you can download all the datasets from this link and the shapefiles from this link.
How you organise your files is up to you, but there are certainly good ways and bad ways of doing it. I would recommend writing your code into separate scripts for each part of the workshop, and saving all of these into the same folder - call it something sensible like gis_mapping_workshop
. I also recommend keeping all the datasets in a sub-folder inside this called data
, and keeping all the shapefiles in a sub-folder called shapefiles
. Boring, but sensible! So it should look something like this:
gis_mapping_workshop
| workshop_pt1.R
| workshop_pt2.R
| data
| dialect_survey.csv
| football_tweets.csv
| shapefiles
| uk-areas.shp
| uk-districts.shp