R for reproducible spatial analysis

IP: Application Development (GIS) - Part 1

Author

Lorena Abad

Published

April 10, 2025

Syllabus

Time From 07.03.25 - Fridays 12:00-14: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 1 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)
  • Develop R packages and Quarto dashboards

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
07.03.25 Intro to R, RStudio, Quarto; how to ask for help?
14.03.25 Fundamentals of R; functional programming Practical 1 End of class
21.03.25 (Spatial) data cleaning, wrangling & plotting Hands-on;
Practical 21

05.05.25
28.03.25 R-spatial ecosystem, vector, raster, data cubes Practical 3 End of class
04.04.25 GIS: in-house and bridges Hands-on
11.04.25 Quarto interactive dashboards
09.05.25 R package development Practical 2 showcase

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.

Warning

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 (e.g. to understand code, to style it, to debug, etc.)

Be mindful of what you submit! If your submission looks like a copy paste of AI output from the code to the documentation, you will very likely fail the course.

Assignments and grading

  • Practical exercises (3) – 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

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
R-Spatial
Advanced

All links to these materials are also included in Blackboard.

Disclaimer

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.


  1. Explanation of assignment↩︎