Section: Module 5 - Running the model in R or the Shiny app | Cities Spatial Model Training | Short Courses

Main course page
  • General

    • About the course

      This online training course provides a practical, in-depth introduction to the Cities Spatial Model, designed for policymakers, urban practitioners, and analysts working on city planning and economic development. The course builds a clear intuition for how the model works and why spatial and equilibrium effects matter for urban policy.

      Participants will learn what data the model requires, where to find reliable sources, and how to clean, structure, and manipulate datasets into the formats needed for analysis using QGIS and R. Step-by-step guidance is provided on running the model in R, interpreting outputs, and using visual tools to explore results. The course also focuses on how to communicate findings clearly and effectively, translating technical outputs into policy-relevant insights that can inform real-world decisions. There is also an option to use the Shiny app interface - enabling users to upload data and run the basic model without any coding whatsoever. 

      By the end of the course, participants will be equipped with both the conceptual understanding and practical skills needed to apply the Cities Spatial Model to real urban challenges, supporting better-informed, evidence-based planning and investment decisions. Please note that there is no certificate provided on completion of the course, it is designed for practical application and knowledge sharing.

      While researchers and students are welcome to participate, the emphasis will be on practical applications of the model rather than its technical details. For those in search of a more in-depth understanding of quantitative spatial models, we encourage you to engage further here: https://www.quantitativeurbanmodels.com/toolkits 

    • Meet your instructors

      Nick Tsivanidis - Associate Professor of Economics, UC Berkeley and IGC Cities Research Programme Director

      Nick Tsivanidis

      Maria Del Mar Gomez - Research Analyst, Cities Spatial Model

      Maria Del Mar Gomez - Research Analyst on the Cities Spatial Model

      Daniel Ruiz Palomo - Research Analyst, Cities Spatial Model

      Daniel Ruiz Palomo

    • Join the virtual office hours

      5 June 2026: https://lse.zoom.us/meeting/tZYqf-qprDsiG90wJssVW5PLKNsduteWVEU8/calendar/google/add?meetingMasterEventId=DkQJckhmQ7uSs8EjJ2Ou7Q

      3 July 2026: https://lse.zoom.us/meeting/tZUrf-GppjstEtCU1YxhKm_JUZClk4cdvJR-/calendar/google/add?meetingMasterEventId=a8Gzh8rLTiyvn5UzHuAT2Q

      Register your interest and submit questions here.

Module 5 - Running the model in R or the Shiny app

  • Module 5 - Running the model in R or the Shiny app

    • Objectives

      • Translate a policy or shock into concrete changes in the model’s input variables 
      • Clearly identify and implement the steps required to run the baseline version of the model 
      • Understand the two ways to run the model  (using R code or the Shiny app) and choose the appropriate interface depending on flexibility, parameter control, and connectivity needs
    • Module contents

    • Download this folder which contains data and code sample files to show you how to prepare the data for the model. You will need to use these files to follow the steps in the video Getting the data in the right format from this module.

      Download the folder before you open the interactive module and keep the files accessible as you watch the videos

    • Download this folder which contains sample data and code to run the model in R. You will need to use these files to follow the steps in the video How to run the model  from this module.

      Download the folder before you open the interactive module and keep the files accessible as you watch the videos

      • Running the model sample files Running the model sample files
    • Additional resources

    • Check this pdf if you want to review the steps of the code for running the model in R