Software to install before the course
QGIS (free GIS software): https://www.qgis.org
GeoDa (spatial data analysis): https://geodacenter.github.io/download.html
R and RStudio (or any other editor for R). A step-by-step installation guide: https://rstudio-education.github.io/hopr/starting.html
Once R is installed, run this line once in the R console to install the packages we will use:
install.packages(c("sf", "spdep", "spatialreg", "plm"))
Base data (“Master.zip”). The four files we will combine in QGIS during Session 1:
Municipalities of Spain: the boundaries of the 8,131 municipalities.
A .csv table: results of the 2023 general election and demographic data for each municipality.
Cities: the main cities of Spain as georeferenced points (from OpenStreetMap).
Night-time lights: a georeferenced satellite raster of light intensity (VIIRS, 2023).
Checkpoint. This is the file we will build step by step during Session 1, with all the information in a single layer. We will use it throughout Session 2. If you miss Session 1, or your own file does not work, download this one to follow Session 2.
Questions and answers. Ask your questions during the class on Slido (preferred) or in the Google Meet chat.
Session 1 (Monday 23/11/2026): Slides (PDF) and R project used during the class.
Session 2 (Tuesday 24/11/2026): Slides (PDF) and R project used during the class.
Spatial econometrics manual: A short guide to the main theoretical concepts, to read before or after the sessions.
Results of the electoral vote of PP in excel