Skip to content

araiari/mobility-and-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Urban Mobility and Academic Performance

Repository for the paper: "Urban mobility and learning: analyzing the influence of commuting time on students' GPA at Politecnico di Milano"
Published in Studies in Higher EducationDOI: 10.1080/03075079.2024.2374005

Authors: Arianna Burzacchi*, Lidia Rossi*, Tommaso Agasisti, Anna Maria Paganoni, Simone Vantini
* Joint first authorship

Overview

This repository contains the R code used to conduct the analysis described in the paper. The study investigates how commuting time affects the academic performance (GPA) of first-year engineering students at Politecnico di Milano.

The research follows a two-step pipeline:

  1. Commuting Time Estimation
    Accessibility maps of Milan are created using GPS data and Kernel Regression Estimation to estimate travel times from home to campus.

  2. Causal Impact Analysis
    A causal inference framework is applied to evaluate the effect of commuting time on GPA using multilevel polynomial mixed-effects models and balancing weighting methods (e.g., Entropy Balancing).

Key Features

  • Data-driven commuting time estimation from smartphone GPS data
  • Multilevel causal modeling with mixed-effect polynomial regression
  • Application of balancing methods (CBPS, Entropy Balancing, IPW)
  • Emphasis on reproducibility and methodological rigor

Repository Structure

mobility-and-learning/
├── README.md
├── LICENSE
├── data/             # Input data (NOT included)
│   ├── mobility/
│   └── learning/
├── scripts/          # All R scripts used in the analysis
│   ├── .R
├── output/           # Output figures, tables, and model results (NOT included)
├── figures/          # Selected plots used in the paper
├── paper/            # Pre-print PDF
├── install.R         # Script to install required packages
└── .gitignore

Requirements

  • R version ≥ 4.1.0
  • Required packages:
    • sf
    • np
    • fields
    • lme4
    • lmerTest
    • WeightIt
    • marginaleffects
    • ggplot2
    • dplyr
    • tidyr

Install them all with:

source("install.R")

How to Run

1. Clone the repository

git clone https://github.com/araiari/mobility-and-learning.git

2. Prepare the data

This project uses two datasets:

  • GPS Mobility Data (from Cuebiq Inc.):
    Used to estimate commuting time. GDPR-compliant and anonymized.
    Not included in this repo. To request access: cuebiq.com/data-for-good

  • Student Data (from Politecnico di Milano):
    Includes GPA, gender, age, income level, high school background, and bachelor program.
    Pseudonymized, not publicly available due to privacy restrictions.

Note: Place both datasets in the data/ folder with filenames expected by the scripts.

3. Run the scripts

Open scripts/ in RStudio and execute the scripts in order.

Each script is modular and can be adapted to new datasets or extended for future research.

License

This repository is licensed under the MIT License.

See the LICENSE file for full terms.

About

Repository for the paper: "Urban mobility and learning: analyzing the influence of commuting time on students' GPA at Politecnico di Milano"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages