Jian Liu, Ketong Shen, Xintao Liu
ABSTRACT Understanding the intricate relationship between traffic crash risk (TCR) and urban environments is essential for improving urban safety. This study used multi‐source datasets, including detailed crash data, built environment (BE), street environment (SE), and socioeconomic factors, to explore these dynamics in Hong Kong. By integrating spatial analysis with explainable machine learning, this study revealed nonlinear, threshold, and interaction effects of multilevel urban environments on TCR. Results indicated significant spatial heterogeneity and scale effects in both the spatial distribution of TCR and their associations with environmental factors. Notably, building density increases TCR only when exceeding a threshold of 0.23, while road intersection density significantly impacts TCR beyond three intersections per kilometer. Additionally, interactions among environmental factors demonstrate varied grouping effects on TCR, where different combinations can collectively reduce or increase risk. These findings provide valuable insights for designing targeted safety interventions to promote safer urban environments.