As critical nodes in urban transportation networks, the operational resilience of urban tunnels directly affects roadway network efficiency and public safety. Existing studies on tunnel resilience exhibit deficiencies in the attention paid to routine incidents, the interpretability of evaluation methods, and the robustness of underlying data. To address these gaps, this paper constructs a three-layer resilience evaluation framework (pre-event, during-event, and post-event) based on 1123 accident records, hourly traffic flow data, and expert scoring data from 10 urban tunnels in Shanghai in 2024. The framework integrates the Analytic Hierarchy Process (AHP) and min–max normalization to derive comprehensive resilience scores. Furthermore, two explainable artificial intelligence (XAI) techniques—SHAP (SHapley Additive exPlanations) feature importance analysis and K-means clustering—are introduced to identify key drivers of resilience differentiation and typical resilience patterns, respectively. Empirical results reveal that (1) half of the 10 tunnels achieve a B-level rating or above, while C/D-level tunnels still account for 50%, indicating considerable room for improvement; (2) SHAP analysis suggests that during-event absorption capacity contributes most significantly to resilience differences (50.24%), with the average traffic reduction rate being the most influential single indicator within this model; and (3) K-means clustering classifies the tunnels into four patterns: high-resilience balanced type, pre-event weak type, post-event weak type, and during-event weak type, each corresponding to distinct resilience enhancement strategies. The methodological framework developed in this paper effectively enables the quantification, interpretation, and pattern recognition of tunnel resilience, providing data-driven decision support for urban tunnel operation and management. It should be noted that the A–D ratings are sensitive to the normalization method: under an alternative normalization, 7 out of 10 tunnels change grade. The ratings should therefore be interpreted as relative to the selected sample rather than as absolute performance levels.
Rapid urbanization has intensified jobs–housing separation and increased commuting distances in megacities, posing challenges for sustainable urban development. Existing studies often examine commuting behavior at a single spatial scale or focus on either residential or employment locations. Using mobile phone signaling data, this study derives network-based commuting distances within the suburban ring of Shanghai and integrates multiple built environment indicators. A multiscale framework is developed using six spatial units, ranging from 2 to 4 km grids to street-level zones, to assess spatial scale effects and support the selection of an appropriate analytical unit. The 3.5 km grid was selected for subsequent analysis as a balance between spatial detail and statistical stability. Within this framework, Multiscale Geographically Weighted Regression (MGWR) examines the spatial heterogeneity and scale effects of built environment factors from both residential and employment perspectives. The results show: (1) The choice of spatial unit significantly affects model performance, with the 3.5 km grid providing a suitable balance between spatial detail and statistical stability. (2) Built environment indicators exhibit clear multiscale effects, with different variables operating at global and local spatial scales. (3) Residential and employment locations show significant asymmetric effects, as enterprise density is associated with shorter commuting distances at residential locations but longer distances at employment centers. These findings indicate the joint role of multiscale spatial structure and dual-end built environments, supporting spatially differentiated planning and transport policies.