Introductory tutorials to QGIS, R and spatial analysis in R

Author

Isak Roalkvam

Published

April 27, 2026

Last week I held a two-day workshop for participants in the Doctoral Network Archaeological Coastal Heritage: Past, present and future of a hidden prehistoric legacy (ArCHe, https://www.arche.uio.no). The workshop consisted of an introduction to GIS and QGIS on the first day, and an introduction to R and the use of R for spatial analysis on the second day. For the workshop I created some stand-alone tutorials, which I’ve now re-purposed to be shared here for anyone to use for whatever purpose (as with all contents on this site they’re released with a CC-BY-NC 4.0 licence, so feel free to use and/or remix them for your own purposes). If you wish to cite the tutorials you can do this with Roalkvam, Isak (2026) Introductory tutorials to GIS, QGIS, R and R for spatial analysis. Zenodo. DOI: https://doi.org/10.5281/zenodo.19816847.

The tutorials are aimed at complete beginners, so I’ve tried to be comprehensive when covering the basics. When the tutorials move on to more advanced topics I’ve reused data from my own publications, so there is a focus on Mesolithic sites and sea-level change in Scandinavia as you get to the later parts. A lot of the underlying concepts are nonetheless transferable, so hopefully this can be of use to people teaching or working with other contexts as well. Also note that these were developed to be worked through in sequence, so the last tutorial on spatial analysis in R assumes that basic concepts in GIS and R are familiar from having worked through the two previous tutorials. It also worth mentioning that the R tutorials focus on base R and do not use the tidyverse, except for ggplot2 and stringr. Finally, I’ll add that any and all feedback is very welcome.

Download the tutorials

If you wish to work through the tutorials they can be downloaded along with the necessary data from the links below (or by going via the link to Zenodo above). Once downloaded, open the folder and then open the HTML file inside, which will open the tutorial in your default web browser.

The introductory tutorial to QGIS can be downloaded from here (51.5 MB): Download introduction to GIS and QGIS

The introductory tutorials to R and spatial analysis in R can be downloaded from here (1.2 MB): Dowload introduction to R and spatial analysis with R.

Codeberg repository

If you wish to have a look at the underlying Quarto documents that generated the HTML documents, either to reuse or edit them for your own use, the Quarto documents and the data can be downloaded from here: https://codeberg.org/isakro/arche_workshop.

Technical details

Finally, while a basic description of software requirements and installation guides is given in the tutorials, the precise technical details could also be of relevance to some. The QGIS tutorial was developed in Linux Mint 22.1 using QGIS v3.40. The tutorial also involves installing the plug in HCMGIS and the use of WMS layers, meaning that an internet connection is required to complete the tutorial.

The R tutorials similarly requires installing packages, the use of WMS layers and downloading temporarily stored rasters with the elevatr package, meaning that an internet connection is also needed for these. Here are the precise details of the R environment in which the tutorials were developed (from running sessionInfo() in R):

R version 4.5.3 (2026-03-11)
Platform: x86_64-pc-linux-gnu
Running under: Linux Mint 22.1

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] stringr_1.6.0  elevatr_0.99.1 tmap_4.3       terra_1.9-11   sf_1.1-0      
[6] here_1.0.2     ggplot2_4.0.3 

loaded via a namespace (and not attached):
 [1] gtable_0.3.6        xfun_0.57           raster_3.6-32      
 [4] htmlwidgets_1.6.4   lattice_0.22-9      vctrs_0.7.3        
 [7] tools_4.5.3         crosstalk_1.2.2     generics_0.1.4     
[10] parallel_4.5.3      tibble_3.3.1        proxy_0.4-29       
[13] pkgconfig_2.0.3     KernSmooth_2.23-26  data.table_1.18.2.1
[16] RColorBrewer_1.1-3  S7_0.2.2            leaflet_2.2.3      
[19] lifecycle_1.0.5     compiler_4.5.3      farver_2.1.2       
[22] codetools_0.2-20    leafsync_0.1.0      leaflegend_1.2.1   
[25] stars_0.7-2         htmltools_0.5.9     class_7.3-23       
[28] yaml_2.3.12         pillar_1.11.1       classInt_0.4-11    
[31] lwgeom_0.2-15       wk_0.9.5            abind_1.4-8        
[34] tidyselect_1.2.1    digest_0.6.39       stringi_1.8.7      
[37] purrr_1.2.2         dplyr_1.2.1         rprojroot_2.1.1    
[40] fastmap_1.2.0       grid_4.5.3          colorspace_2.1-2   
[43] cli_3.6.6           logger_0.4.1        magrittr_2.0.5     
[46] maptiles_0.11.0     base64enc_0.1-6     XML_3.99-0.23      
[49] cols4all_0.10       leafem_0.2.5        e1071_1.7-17       
[52] withr_3.0.2         scales_1.4.0        sp_2.2-1           
[55] rmarkdown_2.31      otel_0.2.0          progressr_0.19.0   
[58] png_0.1-9           evaluate_1.0.5      knitr_1.51         
[61] tmaptools_3.3       s2_1.1.9            rlang_1.2.0        
[64] Rcpp_1.1.1-1        glue_1.8.1          DBI_1.3.0          
[67] rstudioapi_0.18.0   jsonlite_2.0.0      R6_2.6.1           
[70] spacesXYZ_1.6-0     units_1.0-1