R for reproducible spatial analysis
IP: Application Development (GIS) - Part 2
Syllabus
Time | From 25.11.24 - Mondays 15:00-17:30 |
Location | GI_Lab, 1st Floor, Building 15, Techno_Z, Schillerstr. 30, 5020 Salzburg |
Expected effort | Both parts: 6 ECTS (i.e. 150 hours), 3 semester hour per week in class |
Office hours | via Blackboard or by appointment |
Overview
These are the course materials for the IP: Application Development Course (GIS) - Part 2 where you will learn how to develop reproducible R workflows for spatial analysis. What you can expect:
- Introduction to R and its ecosystem
- Spatial data handling in R (raster and vector data)
- Connecting to GIS software for spatial workflow automation
- Spatial visualization with R (static and interactive)
Objectives
By the end of the course you should be able:
- to read and write R code and to navigate the R-spatial package ecosystem
- to perform spatial analysis with vector and raster datasets in R
- to design maps programmatically
- to create reproducible workflows for spatial analysis in R
Schedule and format
This is the tentative course schedule of the lessons and assignments.
DATE | TOPIC | ACTIVITY | DUE DATE |
---|---|---|---|
25.11.24 | Getting started with R | Practical 1 | 01.12.24 |
02.12.24 | R basics and functions; intro to Quarto | Practical 2 / Practical 3 | End of class |
09.12.24 | Data cleaning, wrangling & plotting | Practical 4 | 15.12.124 |
16.12.24 | Spatial data 1: vector data | Practical 5 | End of class |
13.01.25 | Spatial data 2: raster data and data cubes | Define final project | |
20.01.25 | Making maps with R (static & interactive) | Practical 6 | 26.01.25 |
27.01.25 | Bridges to GIS software |
The lessons are meant to give you a broad overview of the basics and of what is possible with R for spatial analysis. Learning by yourself is highly encouraged and expected. The Complementary course materials section lists a number of additional resources for your self-learning, and at the end of the lessons you will have references to the relevant chapters for you to go through.
In class, we will work with hand-on practicals that will allow you to develop R skills from the first lesson.
If you find yourself taking longer or having trouble with concepts, please ask for help on the course’s Blackboard message board or in class (there is an excellent chance someone else has the same question!) rather than via e-mail.
About the use of AI
Using AI in this course is not discouraged if it helps you understand code or discover new ways of doing a task. Think of AI as an extended version of googling your issues or a Stack Overflow entry. However, beware to always test the code that you receive as an output, and also think about the logic that the AI tool follows. I expect that you learn from this course as much as possible, and copy pasting solutions generated by a LLM without critical thinking is unfortunately not going to meet those expectations.
If you select a final project using R, please add a disclaimer section explaining if you used AI for the completion of the project and how you used it.
Assignments and grading
- Practical exercises (~5) – 30%
- To be submitted by the end of the class or by a specific date
- End-of-term assignment – 50%
- Programming project, either R or Python or both
- Active participation – 20%
Required Course Materials
R, RStudio, and Rtools will be installed in the lab computers. If you use your own laptop, see the Complementary course materials section below.
Complementary course materials
Install R and Co.
To work on your own laptop, you need to install R, RStudio and Quarto to follow the course materials.
- Install R (>= 4.0) and RStudio (>= 2024.04.x with Quarto). You can follow the steps in Appendix 1 of Hands-On Programming with R.
- If you are on Windows, install Rtools for the R version you have.
- Installing R spatial packages in Windows (Rtools is required, see above) and Mac should be straightforward, and we will do it together. If you have a Linux system, please read this blogpost.
If you have any problems with installation, please reach out via Blackboard.
R programming resources
Intro & Basics
- RYouWithMe from R-Ladies Sydney.
- fasteR: Fast Lane to Learning R! by Norm Matloff.
- Teacups, Giraffes, & Statistics by Hasse Walum and Desiree de Leon.
Interactive R learning
- Learn or freshen up R basics interactively with swirl
- Follow the instructions to start interactive courses from the R console.
- Check Step 5 for instructions to download more courses, in different languages available at the Swirl Course Network.
Books
Entry-level
- Hands-on programming with R by Garrett Grolemund.
- R for Data Science (2e) by Hadley Wickham, Mine Çetinkaya-Rundel and Garrett Grolemund.
R-Spatial
- Geocomputation with R by Robin Lovelace, Jakub Nowosad and Jannes Muenchow.
- Spatial Data Science: With Applications in R by Edzer Pebesma and Roger Bivand.
Advanced
- Advanced R (2e) by Hadley Wickham
- R Packages (2e) by Hadley Wickham and Jennifer Bryan
All links to these materials are also included in Blackboard.
Please note that the specifics of this Course Syllabus can be changed at any time, and you will be responsible for abiding by any such changes. Any changes will be communicated in class, via e-mail, or course announcement via Blackboard.