Street view-derived city built environment and vulnerability to temperature extremes: a nationally representative population-based cohort study Authors: Wanzhou Wang, Chao Yang, Ze Liang, Fulin Wang, Jinwei Wang, Feifei Zhang, Pengfei Li, Luxia Zhang Published: 2025 ABSTRACT BackgroundThe city built environment plays a crucial role in influencing population vulnerability to temperature extremes, yet population-based evidence has been limited.MethodsWe included 21,494 urban residents from a nationally representative cohort study. Temperature extremes were defined using residential address-specific thresholds lasting for ≥ 3 days. Street view images within participants’ residences (500-m radius) were evaluated using semantic segmentation by DeepLabV3 Plus-ResNet101 pretrained by the Cityscapes dataset. Cox proportional hazard models and interaction models were applied to explore the moderating effects of street view-derived built environments on the effects of temperature extremes on mortality.ResultsEach additional day of heatwave (95th) and coldspell (5th) duration per year was associated with a 6% (HR = 1.06, 1.03–1.08) and 4% (HR = 1.04, 1.01–1.08) increase in all-cause mortality risk, respectively. Lower sky view factor (SVF) and openness, and higher grayness, building coverage, and interface enclosure (IE) were associated with increased risks of mortality. Street view-derived built environment factors could modify the associations between temperature extremes and mortality. Specifically, high levels of IE, along with low levels of SVF and openness, across different road levels intensified the effects of heatwaves. Conversely, low levels of IE, along with high levels of SVF and openness, in residential roads amplified the effects of coldspells.ConclusionsOur findings provide insights for evidence-based urban planning and public health strategies, emphasizing the need for adaptive, context-specific urban design that balances the potentially competing demands of population heat resilience and cold adaptation.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12916-025-04585-y. Background The increasing frequency and severity of temperature extremes, particularly heatwaves and coldspells, have become significant public health concerns worldwide [1, 2]. Extreme heat, in particular, is the leading cause of weather-related deaths, with an estimation of 236 deaths per 10 million residents, which has risen by over 50% in the past two decades [1]. Heatwaves and coldspells have also been linked to higher risks of all-cause and cardiovascular disease (CVD) events and mortality [3]. Moreover, the disease burden attributed to temperature extremes is expected to worsen in the global context of climate change [4]. Efforts to mitigate the health impacts of temperature extremes have traditionally focused on interventions such as green spaces, green roofs, and cooling centers designed to alleviate the urban heat island (UHI) effect [2, 5–10]. Meanwhile, early warning systems and local vulnerability maps have also been used in reducing temperature-related mortality [11, 12]. However, these measures often face challenges in scalability and accessibility, limiting their real-world applications and effectiveness [12, 13]. Emerging evidence highlights the critical role of the built environment (i.e., the human-made surrounding environments) in shaping the resilience of populations to temperature extremes [14–16]. Built environment factors such as urban greenness, building density, openness, and street layout have been found to influence microclimatic conditions and thermal comfort, which may modify the health effects of temperature extremes [17–19]. Nevertheless, prior evidence has primarily focused on region-level (e.g., county or tract census) isolated metrics (e.g., green spaces) [5, 9, 13], which fail to capture the surrounding built environments exposed by individuals in the real-world context. Recent advancements in artificial intelligence and geospatial technologies provide opportunities to characterize street-level built environments through accurate quantification of street view imagery [14, 20–22]. Combined with population-based cohort data, this approach can provide deeper insights into how specific built environment characteristics might modify individual vulnerability to temperature extremes. In this study, we aim to fill this gap by investigating the impact of temperature extremes on mortality, particularly examining how built environment factors derived from street view imagery around participants’ residences may modify the associations. Our findings would provide evidence-based insights for urban planning and public health interventions aimed at mitigating the adverse health effects of temperature extremes. Methods Study design and cohort profile The China National Survey of Chronic Kidney Disease (CNSCKD) is a nationwide study that employed a multistage stratified sampling design to ensure broad geographical coverage and representativeness across China [23]. As shown in Fig. 1, the first step in the selection process involved choosing 13 provinces (Additional file 1: Fig. S1), autonomous regions, and municipalities. The selected regions covered four major climate zones of China, including the Temperate Monsoon (Beijing and Shandong), Subtropical Monsoon (Sichuan, Jiangsu, Zhejiang, Hubei, Hunan, and Shanghai), Tropical Monsoon (Guangdong and Guangxi), and Temperate Continental (Inner Mongolia, Xinjiang, and Ningxia) climates. Within each of these regions, one district from both urban and rural regions, three subdistricts from each district, and five communities from each subdistrict were subsequently selected using simple random sampling. The participants were further chosen using simple random sampling within each community.Fig. 1Flow chart for the participants included in the final analyses Flow chart for the participants included in the final analyses The inclusion criteria for baseline enrollment required individuals to be residents of the selected communities, aged 18 years or older, and to provide consent to participate in the study. This process resulted in the enrollment of 50,550 participants, whose demographic, health, and lifestyle baseline data were collected between 2007 and 2010. Trained healthcare professionals carried out comprehensive assessments, which included interviews, anthropometric measurements (e.g., weight, height, waist circumference), and biological sample collection. A detailed questionnaire was used to gather sociodemographic information, medical history, and lifestyle factors. Blood pressure was measured three times, and blood and urine samples were taken after a 10-h fast. These samples were then analyzed in laboratories following standardized protocols. Follow-up continued through December 31, 2017, during which mortality data were tracked. The study linked participants to the China Cause of Death Reporting System to ascertain both all-cause and cause-specific mortality. Death causes were coded according to ICD-10 guidelines, which classify the primary causes into categories comprising CVDs (I00–I99), respiratory diseases (J00–J99), cancers (C00–C99), and others [24]. To ensure accurate data matching, each participant’s death was identified using their administrative personal identification, with additional verification against demographic details (name, birth, sex, and family address). As shown in Fig. 1, participants with incorrect address information (N = 3), without kidney function data (N = 3343), and those without detailed address information or with inconsistent addresses between baseline and death records (N = 118) were excluded. Considering the limited availability of road and street view data in rural regions, we narrowed the cohort to urban-based settings. Participants without available street view images (N = 3844) were excluded, and a total of 21,494 participants were included in the final analyses. The research protocols were approved by the Biomedical Ethics Review Committee of Peking University (approval code: IRB00001052-20030). Signed informed consent was collected before the study began. More details are provided in Additional file 1: Supplementary Methods. Temperature extremes We utilized the China Daily Air Temperature (CDAT) dataset [25], which provides long-term time-series daily near-surface air temperature (Ta) data at 0.1° spatial resolution across China, comprising daily maximum (Tmax), minimum (Tmin), and 24-h average (Tavg) temperatures. CDAT integrates multi-source datasets (remote sensing products and in situ measurements) and applies corrections for regional climatic discrepancies, enabling robust Ta estimation under both clear-sky and non-clear-sky conditions. Validation against ground stations demonstrated high accuracy (R2 = 0.95–1.00) [25, 26]. In line with previous studies, heatwaves and coldspells were defined using residence-specific (0.1° grid) thresholds to account for regional climate variability [27–29]. Heatwaves were defined as ≥ 3 consecutive days during April ~ September with Tmax exceeding the residence-specific warm-season percentile thresholds (80th, 85th, 90th, or 95th) [27]. Coldspells were defined as ≥ 3 consecutive days during October ~ March with Tmin below the residence-specific cold-season percentile thresholds (20th, 15th, 10th, or 5th) [28]. To align temperature threshold definitions with the cohort period, residence-specific percentile thresholds for heatwaves and coldspells were computed using the 2007–2017 (cohort baseline and follow-up window) subset of CDAT. Durations of heatwave and coldspell events were calculated by summing these days. Street view-based built environment factors The schematic diagram of street view image processing is shown in Fig. 2. All road networks (primary, secondary, tertiary, residential, and others) within a 500-m radius of participants’ residences were extracted from OpenStreetMap [30, 31]. This distance has been widely adopted in previous environmental epidemiology and urban health studies as it approximates a reasonable walking distance and represents the scale of individual exposure [32, 33]. Secondary, tertiary, and residential roads were also separately analyzed, as these road levels may be associated with daily activities and environmental exposures of the participants. Sampling points were generated at 100-m intervals along selected streets using geographic coordinates (latitude/longitude). This ensured systematic coverage of streetscapes relevant to participants’ residences. At each sampling point, four-directional (0°, 90°, 180°, 270°) street view images were retrieved via Baidu Map API (the street view images were not available before 2013, and thus we collected historical images from 2013 to 2017). A total of 45,804 images were processed using a semantic segmentation model DeepLabV3 Plus-ResNet101, pretrained on the Cityscapes dataset (19-class pixel annotations, mean intersection over union [mIoU] = 0.762) [34, 35]. Six pixel-proportion-based indicators were further calculated for all (comprising primary, secondary, tertiary, residential, and others), secondary, tertiary, and residential roads [19, 36–38], comprising:Greenness: Defined as the proportion of pixels classified as vegetation and terrain. This metric represents the perceived density of natural elements. This metric can complement satellite-based vegetation indices by capturing greenness directly perceivable at the pedestrian level [32].Sky view factor (SVF): Defined as the proportion of pixels classified as sky. This metric indicates the degree of vertical openness. The image-derived SVF can capture the actual visible sky from a specific viewpoint compared to the theoretical geometric SVF calculated by the 3D model [19].Grayness: Defined as the proportion of pixels classified as built structures, including buildings, walls, fences, poles, traffic lights, and traffic signs. This metric indicates urbanization intensity and human-made dominance over the landscape [18, 36].Building coverage: Defined as the proportion of pixels classified as buildings and walls. This metric indicates the spatial compactness of building footprints and vertical structures. Compared to Geographic Information System (GIS)-based metrics, the grayness and building coverage can capture the vertical presence of a wider range of structural elements [36].Openness: Defined as the proportion of pixels classified as terrain, sky, roads, and sidewalks. The openness indicates unobstructed horizontal areas that facilitate physical or environmental circulation at the pedestrian level.Interface enclosure (IE): Defined as the proportion of pixels classified as buildings, walls, fences, poles, and vegetation that enclose the space creating physical boundaries. High IE values suggest strong boundary enclosure and environmental blockage, which may influence microclimatic conditions like wind flow [19, 38]. More details are provided in Additional file 1: Supplementary Methods.Fig. 2Schematic diagram of street view image processing. A Streets of various levels within 500 m of the residential address of the participants; B latitude and longitude sampling of the roads at 100-m intervals; C four-direction street view image recognition using the DeepLabV3 Plus-ResNet101 pretrained on the Cityscapes dataset; D typical street views for each level of road; E typical street views with high levels of built environment factors of interests Greenness: Defined as the proportion of pixels classified as vegetation and terrain. This metric represents the perceived density of natural elements. This metric can complement satellite-based vegetation indices by capturing greenness directly perceivable at the pedestrian level [32]. Greenness: Defined as the proportion of pixels classified as vegetation and terrain. This metric represents the perceived density of natural elements. This metric can complement satellite-based vegetation indices by capturing greenness directly perceivable at the pedestrian level [32]. Sky view factor (SVF): Defined as the proportion of pixels classified as sky. This metric indicates the degree of vertical openness. The image-derived SVF can capture the actual visible sky from a specific viewpoint compared to the theoretical geometric SVF calculated by the 3D model [19]. Sky view factor (SVF): Defined as the proportion of pixels classified as sky. This metric indicates the degree of vertical openness. The image-derived SVF can capture the actual visible sky from a specific viewpoint compared to the theoretical geometric SVF calculated by the 3D model [19]. Grayness: Defined as the proportion of pixels classified as built structures, including buildings, walls, fences, poles, traffic lights, and traffic signs. This metric indicates urbanization intensity and human-made dominance over the landscape [18, 36]. Grayness: Defined as the proportion of pixels classified as built structures, including buildings, walls, fences, poles, traffic lights, and traffic signs. This metric indicates urbanization intensity and human-made dominance over the landscape [18, 36]. Building coverage: Defined as the proportion of pixels classified as buildings and walls. This metric indicates the spatial compactness of building footprints and vertical structures. Compared to Geographic Information System (GIS)-based metrics, the grayness and building coverage can capture the vertical presence of a wider range of structural elements [36]. Building coverage: Defined as the proportion of pixels classified as buildings and walls. This metric indicates the spatial compactness of building footprints and vertical structures. Compared to Geographic Information System (GIS)-based metrics, the grayness and building coverage can capture the vertical presence of a wider range of structural elements [36]. Openness: Defined as the proportion of pixels classified as terrain, sky, roads, and sidewalks. The openness indicates unobstructed horizontal areas that facilitate physical or environmental circulation at the pedestrian level. Openness: Defined as the proportion of pixels classified as terrain, sky, roads, and sidewalks. The openness indicates unobstructed horizontal areas that facilitate physical or environmental circulation at the pedestrian level. Interface enclosure (IE): Defined as the proportion of pixels classified as buildings, walls, fences, poles, and vegetation that enclose the space creating physical boundaries. High IE values suggest strong boundary enclosure and environmental blockage, which may influence microclimatic conditions like wind flow [19, 38]. More details are provided in Additional file 1: Supplementary Methods. Interface enclosure (IE): Defined as the proportion of pixels classified as buildings, walls, fences, poles, and vegetation that enclose the space creating physical boundaries. High IE values suggest strong boundary enclosure and environmental blockage, which may influence microclimatic conditions like wind flow [19, 38]. More details are provided in Additional file 1: Supplementary Methods. Schematic diagram of street view image processing. A Streets of various levels within 500 m of the residential address of the participants; B latitude and longitude sampling of the roads at 100-m intervals; C four-direction street view image recognition using the DeepLabV3 Plus-ResNet101 pretrained on the Cityscapes dataset; D typical street views for each level of road; E typical street views with high levels of built environment factors of interests Statistical analyses Cox proportional hazards regression models were employed to estimate hazard ratios (HRs) and 95% confidence intervals (CIs) for mortality risks associated with temperature extremes and built environment factors based on the time-to-event data [39]. The Cox proportional hazards model is given by:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h(t|X)={h}_{0}(t)\cdot \mathrm{exp}({\beta }_{1}{X}_{1}+{\beta }_{2}{X}_{2}+\cdots +{\beta }_{k}{X}_{k}+{\beta }_{X}X)$$\end{document}h(t|X)=h0(t)·exp(β1X1+β2X2+⋯+βkXk+βXX)where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h(t|X)$$\end{document}h(t|X) is the hazard of mortality at time \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$t$$\end{document}t for an individual with covariate values. The covariates included demographic and socio-economic variables, lifestyle factors, health-related conditions, and annual average temperature and relative humidity, with detailed settings described in Additional file 1: Supplementary Methods. Missing data in categorical covariates were handled by creating a separate missing category, which was included in the models as a dummy variable. No numerical variables had missing data. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${h}_{0}(t)$$\end{document}h0(t) is the baseline hazard at time \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$t$$\end{document}t, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\beta }_{1},{\beta }_{2},...,{\beta }_{k}$$\end{document}β1,β2,...,βk are the regression coefficients associated with the covariates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${X}_{1},{X}_{2},...,{X}_{k}$$\end{document}X1,X2,...,Xk. The key exposure variables of interest (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X$$\end{document}X) are annual numbers of heatwave/coldspell days and street view-derived built environment factors. To account for the dynamic nature of environmental changes over the study period (2007–2017), temperature extremes were treated as a time-varying covariate in the Cox models [39, 40]. No violation of the proportional hazard (PH) assumption was detected, indicating the absence of time-dependent effects on hazard ratio estimates. Multicollinearity diagnostics showed that all variance inflation factors (VIFs) were below 5 across models, suggesting no multicollinearity among the covariates. To examine the moderating effects of street view-derived built environment factors on associations between temperature extremes and mortality, their main effect terms and multiplicative interaction terms were included in the models [41]. Built environment factors were divided into two groups (Lower and Higher) based on the median levels. The interaction model is specified as:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h(t|X,B)={h}_{0}(t)\cdot \mathrm{exp}({\beta }_{1}{X}_{1}+\cdots +{\beta }_{k}{X}_{k}+{\beta }_{X}X+{\beta }_{B}B+{\delta }_{XB}(X\cdot B))$$\end{document}h(t|X,B)=h0(t)·exp(β1X1+⋯+βkXk+βXX+βBB+δXB(X·B))where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X\cdot B$$\end{document}X·B is the interaction term, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\delta }_{XB}$$\end{document}δXB is the coefficient of the interaction term, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$B$$\end{document}B is one of Lower or Higher. The subgroup coefficients of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X$$\end{document}X were calculated to be \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\beta }_{X}$$\end{document}βX (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$B=\mathrm{Lower})$$\end{document}B=Lower) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\beta }_{X}+{\delta }_{XB}$$\end{document}βX+δXB (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$B=\mathrm{Higher})$$\end{document}B=Higher). The statistical significance of the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\delta }_{XB}$$\end{document}δXB was examined [41]. Sensitivity analyses were conducted to assess robustness. First, non-linear exposure–response associations between temperature extremes and mortality were explored using restricted cubic splines with three knots [42]. Second, two-pollutant models adjusted for annual averages of fine particulate matter (PM2.5), ozone (O3), and nitrogen dioxide (NO2) to address residual air pollution confounding [43–45]. We also conducted a three-pollutant model including PM2.5 and NO2 to assess co-pollutant confounding common in urban contexts [46]. Third, directed acyclic graphs (DAGs) were used to identify a minimally sufficient adjustment set, ensuring covariates were selected based on causal pathways [47]. Fourth, built environment factors were reclassified into three categories (Low, Medium, and High, based on tertiles) to test the stability of the moderating effect examinations. Fifth, to account for potential regional variations, we further included a random intercept for province or climate zone in the models. Sixth, considering the opposite roles of greenness and built structures in cooling effects [38], we also calculated IE_no_vegetation by excluding vegetation and repeated the main and interaction analyses. The data analyses were performed using Python (version 3.12), ArcGIS (version 10.8), and R (version 4.3.2). The statistical significance level was set as two-sided α = 0.05. Anonymous data were analyzed strictly following the individual privacy and ethical guidelines. Role of the funding source The funder of the study had no role in study design, data collection, data analysis, data interpretation, or writing of the report. Results Baseline characteristics Among 25,338 urban participants, street view images were available for 21,494 individuals (84.8%). Compared with those with images, participants without images were slightly younger, more likely to be females, and had lower income and education levels (Additional file 1: Table S1). Nevertheless, the absolute differences between the original cohort participants and those with images were below 2% for all subgroups. These results suggest that although selection bias due to missing street view data cannot be excluded, the final sample was generally representative of the original cohort. A total of 21,494 urban residents were included in the final analyses, with 20,699 in the non-death group and 795 in the death group (Table 1). The leading cause of death was cancer (N = 328, 41.3%), followed by CVDs (N = 267, 33.6%) and respiratory diseases (N = 57, 7.2%). The average age of participants was 52.2 ± 14.4 years, with the death group being significantly older (66.0 ± 11.8 years vs 51.7 ± 14.2 years, P < 0.001). Participants in the death group also had lower income and education levels and higher rates of current smoking and alcohol consumption ≥ 3 times per week. Chronic disease conditions comprising HTN, diabetes, and CKD were more prevalent in the death group. Table 1Characteristics of the participantsVariableAll participants (N = 21,494)Non-deaths (N = 20,699)Deaths (N = 795)P valueFollow-up (person*months)2,639,7492,579,26460,485Age (years)52.2 ± 14.451.7 ± 14.266.0 ± 11.8 < 0.001BMI (kg/m2)24.1 ± 3.624.1 ± 3.624.4 ± 3.70.010Income (CNY, per capita per month)0.003 ≤ 5002761 (17.7%)2670 (17.7%)91 (19.3%) 500 ~ 10006290 (40.4%)6071 (40.3%)219 (46.4%) > 10006504 (41.8%)6342 (42.0%)162 (34.3%)Education < 0.001 Below primary school892 (4.2%)816 (4.0%)76 (9.6%) Primary school2364 (11.0%)2177 (10.5%)187 (23.6%) Middle school5151 (24.0%)4932 (23.9%)219 (27.7%) High school7364 (34.3%)7177 (34.7%)187 (23.6%) College and upper5674 (26.5%)5552 (26.9%)122 (15.4%)Sex < 0.001 Female13,332 (62.0%)12,935 (62.5%)397 (49.9%) Male8162 (38.0%)7764 (37.5%)398 (50.1%)Diet DASH group0.230 Low13,877 (80.6%)13,345 (80.5%)532 (82.5%) High3347 (19.4%)3234 (19.5%)113 (17.5%)Physical activity level0.960 < 180 min/week7694 (49.5%)7459 (49.5%)235 (49.7%) ≥ 180 min/week7861 (50.5%)7623 (50.5%)238 (50.3%)Alcohol consumption < 0.001 < 1 time/week18,378 (85.7%)17,732 (85.8%)646 (82.0%) 1 ~ 2 times/week1171 (5.5%)1129 (5.5%)42 (5.3%) ≥ 3 times/week1895 (8.8%)1795 (8.7%)100 (12.7%)Tobacco use < 0.001 Non-smoking16,985 (79.1%)16,402 (79.3%)583 (73.6%) Current smoking4485 (20.9%)4276 (20.7%)209 (26.4%)Hypertension (HTN)7425 (34.5%)6953 (33.6%)472 (59.4%) < 0.001Diabetes mellitus5319 (24.7%)4992 (24.1%)327 (41.1%) < 0.001Chronic kidney disease (CKD)2081 (9.7%)1927 (9.3%)154 (19.4%) < 0.001Cause-specific deaths CVDs (N and person*months)21,227 (2,619,538)267 (20,211) Respiratory diseases (N and person*months)21,437 (2,635,151)57 (4598) Cancer (N and person*months)21,166 (2,615,387)328 (24,362)Distributions are shown as mean ± standard deviation (SD) for continuous variables and N (%) for categorical variables. Student t-test and chi-square test were used to examine the differences between non-deaths and deaths.DASH Dietary Approaches to Stop Hypertension, CVDs cardiovascular diseases Table 1Characteristics of the participantsVariableAll participants (N = 21,494)Non-deaths (N = 20,699)Deaths (N = 795)P valueFollow-up (person*months)2,639,7492,579,26460,485Age (years)52.2 ± 14.451.7 ± 14.266.0 ± 11.8 < 0.001BMI (kg/m2)24.1 ± 3.624.1 ± 3.624.4 ± 3.70.010Income (CNY, per capita per month)0.003 ≤ 5002761 (17.7%)2670 (17.7%)91 (19.3%) 500 ~ 10006290 (40.4%)6071 (40.3%)219 (46.4%) > 10006504 (41.8%)6342 (42.0%)162 (34.3%)Education < 0.001 Below primary school892 (4.2%)816 (4.0%)76 (9.6%) Primary school2364 (11.0%)2177 (10.5%)187 (23.6%) Middle school5151 (24.0%)4932 (23.9%)219 (27.7%) High school7364 (34.3%)7177 (34.7%)187 (23.6%) College and upper5674 (26.5%)5552 (26.9%)122 (15.4%)Sex < 0.001 Female13,332 (62.0%)12,935 (62.5%)397 (49.9%) Male8162 (38.0%)7764 (37.5%)398 (50.1%)Diet DASH group0.230 Low13,877 (80.6%)13,345 (80.5%)532 (82.5%) High3347 (19.4%)3234 (19.5%)113 (17.5%)Physical activity level0.960 < 180 min/week7694 (49.5%)7459 (49.5%)235 (49.7%) ≥ 180 min/week7861 (50.5%)7623 (50.5%)238 (50.3%)Alcohol consumption < 0.001 < 1 time/week18,378 (85.7%)17,732 (85.8%)646 (82.0%) 1 ~ 2 times/week1171 (5.5%)1129 (5.5%)42 (5.3%) ≥ 3 times/week1895 (8.8%)1795 (8.7%)100 (12.7%)Tobacco use < 0.001 Non-smoking16,985 (79.1%)16,402 (79.3%)583 (73.6%) Current smoking4485 (20.9%)4276 (20.7%)209 (26.4%)Hypertension (HTN)7425 (34.5%)6953 (33.6%)472 (59.4%) < 0.001Diabetes mellitus5319 (24.7%)4992 (24.1%)327 (41.1%) < 0.001Chronic kidney disease (CKD)2081 (9.7%)1927 (9.3%)154 (19.4%) < 0.001Cause-specific deaths CVDs (N and person*months)21,227 (2,619,538)267 (20,211) Respiratory diseases (N and person*months)21,437 (2,635,151)57 (4598) Cancer (N and person*months)21,166 (2,615,387)328 (24,362)Distributions are shown as mean ± standard deviation (SD) for continuous variables and N (%) for categorical variables. Student t-test and chi-square test were used to examine the differences between non-deaths and deaths.DASH Dietary Approaches to Stop Hypertension, CVDs cardiovascular diseases Characteristics of the participants Distributions are shown as mean ± standard deviation (SD) for continuous variables and N (%) for categorical variables. Student t-test and chi-square test were used to examine the differences between non-deaths and deaths. DASH Dietary Approaches to Stop Hypertension, CVDs cardiovascular diseases Exposure levels Additional file 1: Table S2 presents the distribution of exposure levels of temperature extremes and built environment factors among participants. In general, the death group was exposed to longer durations of heatwaves and coldspells at various thresholds. Meanwhile, the death group was exposed to lower levels of SVF and openness, but higher levels of grayness, building coverage, and IE across all roads. Similar patterns in SVF, grayness, building coverage, openness, and IE were observed for secondary, tertiary, and residential roads. Greenness in secondary roads was higher in the death group, whereas no significant differences in greenness were found between the non-death and death groups for all roads, or for tertiary and residential roads. Spearman correlations between built environment factors are shown in Additional file 1: Table S3. Greenness was consistently negatively correlated with grayness and building coverage (ρ: − 0.32 to − 0.48) and positively correlated with IE (ρ: 0.10 to 0.71). SVF and openness showed strong positive associations (ρ: 0.92 to 0.96) and were strongly negatively correlated with IE (ρ: − 0.96 to − 0.93). Grayness and building coverage were strongly positively correlated (ρ: 0.97 to 0.99), and they were also positively correlated with IE (ρ: 0.32 to 0.76). Associations between temperature extremes and mortality Heatwaves and coldspells exhibited threshold-dependent associations with increased risks of all-cause and cause-specific mortality, with stronger associations for more extreme thresholds (Fig. 3). For instance, each additional day of heatwave duration at the 80th, 85th, 90th, and 95th percentile threshold was associated with a 2% (HR: 1.02, 1.01–1.03), 3% (HR: 1.03, 1.02–1.05), 4% (HR: 1.04, 1.02–1.06), and 6% (HR: 1.06, 1.03–1.08) higher risk of all-cause mortality, respectively. Each additional day of coldspell duration at 20th, 15th, 10th, and 5th percentile threshold was associated with a 2% (HR: 1.02, 1.00–1.03), 2% (HR: 1.02, 1.01–1.04), 2% (HR: 1.02, 1.00–1.04), and 4% (HR: 1.04, 1.01–1.08) higher risk of all-cause mortality, respectively. Heatwaves at the 95th percentile threshold were associated with increased risks of respiratory disease (HR: 1.12, 1.02–1.24) and cancer (HR: 1.05, 1.01–1.09) mortality. In contrast, coldspells at the 5th percentile threshold were associated with increased risks of CVD (HR: 1.11, 1.04–1.18), but not respiratory disease or cancer mortality.Fig. 3Association of temperature extremes with all-cause and cause-specific mortality. A Heatwaves; B coldspells. Note: Adjusted hazard ratio with 95% confidence intervals associated with 1 day increase in durations of temperature extremes per year. Models were adjusted for age, body mass index, sex, income, education, diet, physical activity, alcohol consumption, tobacco use, history of hypertension, diabetes mellitus, chronic kidney disease, annual average temperature, and relative humidity Association of temperature extremes with all-cause and cause-specific mortality. A Heatwaves; B coldspells. Note: Adjusted hazard ratio with 95% confidence intervals associated with 1 day increase in durations of temperature extremes per year. Models were adjusted for age, body mass index, sex, income, education, diet, physical activity, alcohol consumption, tobacco use, history of hypertension, diabetes mellitus, chronic kidney disease, annual average temperature, and relative humidity Associations between street view-derived built environment factors and mortality Street view-derived greenness showed distinct patterns across different road levels (Fig. 4). Per standard deviation (SD) increase in greenness was associated with reduced all-cause mortality in all roads (HR: 0.89, 0.83–0.95) and tertiary roads (HR: 0.90, 0.83–0.98), but no significant associations were found for secondary or residential roads. In contrast, other built environment factors generally showed similar patterns. For instance, per SD increment in SVF, grayness, building coverage, openness, and IE in secondary roads was associated with an 18% decrease (HR: 0.82, 0.74–0.91), 14% increase (HR: 1.14, 1.06–1.24), 15% increase (HR: 1.15, 1.07–1.25), 18% decrease (HR: 0.82, 0.74–0.91), and 21% increase (HR: 1.21, 1.10–1.34) in all-cause mortality, respectively.Fig. 4Association of level-specific street view-based built environment factors with all-cause and cause-specific mortality. Note: Adjusted hazard ratio with 95% confidence intervals associated with one standard deviation (SD) increase in factors. Models were adjusted for age, body mass index, sex, income, education, diet, physical activity, alcohol consumption, tobacco use, history of hypertension, diabetes mellitus, and chronic kidney disease Association of level-specific street view-based built environment factors with all-cause and cause-specific mortality. Note: Adjusted hazard ratio with 95% confidence intervals associated with one standard deviation (SD) increase in factors. Models were adjusted for age, body mass index, sex, income, education, diet, physical activity, alcohol consumption, tobacco use, history of hypertension, diabetes mellitus, and chronic kidney disease Street view-derived built environment factors and vulnerability to temperature extremes As shown in Fig. 5A, high building coverage and IE levels in tertiary and residential roads consistently intensified the effects of heatwaves on all-cause mortality, while high SVF and openness levels across different road levels consistently mitigated the effects. For instance, in residential roads, high SVF (P for interaction < 0.001) and openness (P for interaction < 0.001) could mitigate the effects of heatwaves on all-cause mortality, while high building coverage (P for interaction = 0.002) and IE (P for interaction < 0.001) showed opposite directions.Fig. 5Moderating effects of level-specific street view-based built environment factors on associations between temperature extremes and all-cause mortality. A Heatwaves; B coldspells. Note: Adjusted hazard ratio with 95% confidence intervals associated with 1 day increase in durations of temperature extremes per year in groups with lower and higher (based on the median level) built environment factors. In addition to covariates, models included the interaction terms of the temperature extremes and built environment factors. P inter, the statistical significance of the interaction terms (P for interaction) Moderating effects of level-specific street view-based built environment factors on associations between temperature extremes and all-cause mortality. A Heatwaves; B coldspells. Note: Adjusted hazard ratio with 95% confidence intervals associated with 1 day increase in durations of temperature extremes per year in groups with lower and higher (based on the median level) built environment factors. In addition to covariates, models included the interaction terms of the temperature extremes and built environment factors. P inter, the statistical significance of the interaction terms (P for interaction) In contrast to the heatwave findings, the moderating effects of built environment factors on coldspells showed opposite directions, especially at the residential road level (Fig. 5B). Specifically, participants in the high IE group had a mitigated effect of coldspells on mortality compared to those in the low IE group (P for interaction < 0.001), while high SVF (P for interaction = 0.012) and openness (P for interaction < 0.001) intensified the effects. For cause-specific mortality, the results for CVD and cancer mortality were generally consistent with those for all-cause mortality, whereas built environment factors did not significantly modify the effects of temperature extremes on respiratory disease mortality (Additional file 1: Figs. S2–S7). Sensitivity analyses Exposure–response curves showed consistently similar associations between temperature extremes and mortality, as shown in Additional file 1: Fig. S8. Two- and multiple-pollutant sensitivity analyses reported robust findings when additionally adjusted for PM2.5, O3, and NO2 (Additional file 1: Table S4). The DAG identified age, sex, income, education, temperature, and relative humidity as the minimally sufficient adjustment set (Additional file 1: Fig. S9), and the result remained robust when including these variables as covariates only (Additional file 1: Table S5). Moderating effects of street view-based built environment factors based on three-category-sensitivity analyses also highlighted similar moderating effects of SVF, openness, and IE, as shown in Additional file 1: Fig. S10. After including province or climate zone as a random effect, the associations were slightly amplified for province and similar for climate zone, with statistical significance remaining robust in both cases (Additional file 1: Table S6). After recalculating IE with vegetation pixels excluded, effect estimates varied slightly, and the overall patterns of the main associations and the effect modification remained consistent (Additional file 1: Tables S7 and S8). Discussion Real-world evidence on how micro-scale urban design interacts with temperature extremes can offer actionable insights for mitigating the health impacts of temperature extremes in the global context of climate change. Our population-based study found that heatwaves and coldspells are associated with increased risks of all-cause, CVD, and cancer mortality. Beyond the direct effects of temperature extremes, we also observed that street view-derived built environment characteristics modify these associations. Specifically, high levels of IE, along with low levels of SVF and openness, across different levels of roads consistently intensified the effects of heatwaves on mortality. Conversely, for coldspells, low levels of IE, along with high levels of SVF and openness, in residential roads amplified the mortality risks. Our study reveals threshold-dependent associations between temperature extremes and mortality, with stronger effects observed at more extreme temperature thresholds, which are consistent with previous evidence across countries [28, 48–50]. A multi-country, multi-community study across 400 communities in 18 countries reported stronger associations between heatwaves and mortality when more extreme temperature thresholds were applied [27]. A study among deaths in 31 Chinese capital cities also reported higher risks of all-cause and cause-specific mortality associated with coldspells defined by extreme percentile thresholds compared to fixed thresholds [28]. A study among 151,001 deaths aged ≥ 65 years in São Paulo also found stronger effects of temperature extremes on CVD mortality at more extreme temperature thresholds with longer durations [49]. Our study contributes to the understanding of the cumulative effects of heatwaves and coldspells on mortality [29, 51], addressing a gap in previous research mostly utilized ecological time-series designs. One potential mechanism for the cumulative effects of heatwaves on mortality is progressive cardiovascular strain. Extended heat exposure can lead to sustained cardiometabolic stress, which may exacerbate underlying cardiometabolic conditions and elevate the risk of mortality [52, 53]. Another hypothesis is thermal dysregulation, where prolonged heat exposure impairs the ability to maintain normal temperature regulation [54, 55], potentially leading to heat exhaustion or heat stroke, both associated with higher mortality risk [54]. Additionally, prolonged heat exposure may exacerbate inflammatory responses, contributing to elevated mortality risk [53]. For coldspells, one potential mechanism is impaired thermoregulation, where prolonged cold exposure hampers the ability to maintain core temperature, leading to hypothermia and increased mortality risk [28, 52, 56]. Another mechanism is increased blood viscosity, where cold temperatures cause blood vessel constrictions, leading to higher blood pressure and increased risk of cardiovascular mortality [57]. Furthermore, elevated sympathetic nervous system activity during cold exposure can increase heart rate and blood pressure, contributing to cardiovascular strain and higher mortality risk [57, 58]. Recent advances in artificial intelligence and geospatial technologies have enabled the quantitative characterization of street-level built environments using large-scale street view images [14, 36]. These image-derived indicators provide opportunities to capture the visual and structural features of built environment characteristics from a pedestrian perspective [32, 36, 59]. Unlike conventional GIS- or 3D-based urban morphology metrics, which primarily describe building structures and spatial configuration from a top-down view, street view-based metrics can measure vertical and horizontal built environment characteristics at eye level [20, 32, 59]. Such human-scale representations are particularly important for understanding how the built environment modifies temperature-related health risks. This study for the first time found that lower SVF and openness, and higher IE, grayness, and building coverage in tertiary and residential roads were consistently associated with increased risks of mortality. Higher SVF and openness may allow for better air circulation [17], which can reduce ambient temperatures and mitigate the UHI effect, thereby lowering mortality risks [17, 60, 61]. In contrast, increased grayness, building coverage, and IE can reduce air circulation and increase heat retention, exacerbating the UHI effect [18]. Studies have shown that areas with higher grayness and building density were associated with increased health risks [62, 63]. In addition, we observed protective effects of greenness in all roads on all-cause and cause-specific mortality, consistent with previous findings that urban greenness reduces mortality risks. However, the lack of significance for greenness in residential roads was contradictory to previous studies emphasizing neighborhood-scale vegetation [64, 65], suggesting road hierarchy may influence the health effects of green spaces [45]. We found that built environment characteristics significantly influence the associations between heatwaves and mortality. High levels of grayness, building coverage, and IE could intensify the effects of heatwaves on all-cause, CVD, and cancer mortality, while high levels of SVF and openness could mitigate the effects. High grayness and building coverage may contribute to a higher thermal load in urban areas, enhancing the intensity and duration of heatwaves. Meanwhile, high IE can limit the ability to cool through evapotranspiration, leading to more pronounced warming effects [37, 66]. Another explanation is the UHI effect, which has been shown to intensify the health impacts of heatwaves in areas with higher grayness and building coverage [66, 67]. In contrast, higher SVF and openness attenuated mortality risks of heatwaves, likely by enhancing radiative cooling, promoting air circulation, and reducing heat retention [17, 19, 61]. Conversely, built environment factors exhibited opposing effects during coldspells, particularly in residential roads. High IE levels were found to mitigate the mortality risks during coldspells, while high openness intensified these risks. This finding aligns with a study in West Midlands (UK), which reported that wintertime UHI may offer protection against cold-related mortality [68]. One possible explanation is that increased IE can act as barriers to wind chill, reducing heat loss and providing a buffer against extreme cold temperatures [68]. Nevertheless, high openness, while beneficial during heatwaves, may increase exposures to unmitigated wind and convective heat loss [36, 61]. Our findings underscore the importance of adaptive, context-specific urban planning that balances the potentially competing demands of heat resilience and cold adaptation. Strategies like region-specific facilities may be beneficial for creating built environments that buffer against both heatwaves and coldspells while promoting health equity. Considering the moderating effects of coldspells were particularly observed in residential roads, protection strategies such as windbreaks and cold shelters may be important for mitigating the health impacts of coldspells, especially in communities with lower grayness, IE, and higher openness. Notably, regarding generalizability, the urban form in China, characterized by higher density, mixed land use, and rapid development, may differ from other regions such as low-density Western suburbs or historical European city centers [2, 4, 8, 36]. The magnitude and direction of the observed interactions may thus vary by city typology, climatic zone, and the extent and configuration of urban vegetation across different settings [8, 9]. Our results may be likely applicable to other compact, rapidly developing cities. However, the findings should be interpreted cautiously when applied to cities with substantially different urban designs or development patterns. This study for the first time investigated the moderating role of street view-derived built environments on the health effects of temperature extremes on mortality. A key strength of our study is the use of a large, nationally representative cohort, which enhances the generalizability of our findings. Additionally, the integration of street view-derived built environment factors allows for a detailed and accurate assessment of individual-level built environment exposures. However, our study has limitations. First, due to the limited availability of high-quality road and street view data prior to 2013, we were unable to incorporate built environment factors as time-varying covariates in the Cox proportional hazard models. An important limitation is the temporal mismatch between the cohort data (2007–2017) and the street view images (2013–2017). Given the rapid pace of urban development in China, the built environment captured by the images may not accurately reflect the participants’ exposure in the earlier years [63, 69]. This is likely to result in non-differential misclassification of built environment exposure, which would under-estimate its main and modifying effects. Therefore, future large-scale prospective studies with data collection temporally aligned to the acquisition of street view imagery are needed to validate our findings. Second, the relatively sparse road and street view data available in rural areas constrained our ability to explore less-developed settings in China. Meanwhile, approximately 15% of urban participants were excluded due to missing street view images. These individuals were slightly younger, more likely to be females, and had lower income and education levels, which may result in selection bias. Nevertheless, the included participants remained broadly comparable to the original cohort (< 2% absolute difference in subgroup proportions), suggesting limited impact on the effect estimates. Third, since individual data were only collected at baseline, we were unable to examine the potential mediating effects of individual behaviors due to time-order limitations. Fourth, regional variations in the urban built environment and climate characteristics could contribute to potential heterogeneity in the estimated associations. However, our sensitivity analyses after including province and climate zone yielded consistent results, indicating the robustness of our findings against unmeasured regional confounding. Fifth, street view-derived metrics, particularly greenness, are subject to seasonal bias due to phenological changes in vegetation, which may introduce exposure misclassification [70]. Meanwhile, although a 500-m radius to average built environment characteristics is widely used in epidemiological studies for characterizing individual exposure, it may smooth out meaningful micro-scale variations [32, 33]. Future studies incorporating individual mobility data (e.g., GPS tracking) to construct dynamic exposure measures across daily activity spaces would improve the accuracy of individual exposure assessments. Sixth, the number of respiratory disease deaths was relatively small (N = 57), and therefore, this limited power should be considered when interpreting null findings for respiratory disease mortality. In addition, this study focused on the general population without stratifying by age or sex, as adding further interaction terms beyond temperature extremes and built environment factors would have substantially increased the model complexity (i.e., three-way interaction). Future prospective studies are still warranted to provide group-specific evidence on the health impacts of temperature extremes and the modifying effects of the built environment. Conclusions Our national population-based cohort study revealed that exposure to heatwaves and coldspells is associated with increased risks of all-cause and CVD mortality. In addition to direct effects, street view-derived built environment factors could modify the impact of temperature extremes. Specifically, high levels of IE, along with low levels of SVF and openness, across different levels of roads consistently intensified the effects of heatwaves on mortality. Conversely, for coldspells, low levels of IE, along with high levels of SVF and openness, in residential roads could amplify the mortality risks. Our findings provide insights for evidence-based urban planning and public health strategies and the need for adaptive, context-specific urban built environment design that balances potentially competing demands of population heat resilience and cold adaptation. Supplementary Information Additional file 1. Supplementary Methods, Tables S1–S8, and Figs. S1–S10. Supplementary Methods—Detailed methodology. Table S1 Participant characteristics with or without street view images. Table S2 Exposure distributions. Table S3 Built environment factor correlations. Table S4 Two- and multiple-pollutant sensitivity analyses. Table S5 Minimal sufficient adjustment analysis. Table S6 Sensitivity analyses including province or climate zone as a random effect term. Table S7 IE-mortality analyses excluding vegetation. Table S8 IE moderating effect analyses excluding vegetation. Fig. S1 Map of included provinces. Fig. S2 Moderating effects on heatwave-CVD mortality. Fig. S3 Moderating effects on coldspell-CVD mortality. Fig. S4 Moderating effects on heatwave-respiratory mortality. Fig. S5 Moderating effects on coldspell-respiratory mortality. Fig. S6 Moderating effects on heatwave-cancer mortality. Fig. S7 Moderating effects on coldspell-cancer mortality. Fig. S8 Exposure–response curves. Fig. S9 Directed acyclic graph. Fig. S10 Moderating effects based on tertiles Additional file 1. Supplementary Methods, Tables S1–S8, and Figs. S1–S10. Supplementary Methods—Detailed methodology. Table S1 Participant characteristics with or without street view images. Table S2 Exposure distributions. Table S3 Built environment factor correlations. Table S4 Two- and multiple-pollutant sensitivity analyses. Table S5 Minimal sufficient adjustment analysis. Table S6 Sensitivity analyses including province or climate zone as a random effect term. Table S7 IE-mortality analyses excluding vegetation. Table S8 IE moderating effect analyses excluding vegetation. Fig. S1 Map of included provinces. Fig. S2 Moderating effects on heatwave-CVD mortality. Fig. S3 Moderating effects on coldspell-CVD mortality. Fig. S4 Moderating effects on heatwave-respiratory mortality. Fig. S5 Moderating effects on coldspell-respiratory mortality. Fig. S6 Moderating effects on heatwave-cancer mortality. Fig. S7 Moderating effects on coldspell-cancer mortality. Fig. S8 Exposure–response curves. Fig. S9 Directed acyclic graph. Fig. S10 Moderating effects based on tertiles