Next Article in Journal
The Impact of Digitalized All-Electric Aircraft on the Sustainable Development of the Aviation Industry: A Dynamic Differential Game Study Considering Delayed Effects
Previous Article in Journal
Automating the Construction of Environmental Policy Knowledge Graph with Large Language Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Effects of Streetscapes on Residents’ Sentiments During Heatwaves in Shanghai: Evidence from Multi-Source Data and Interpretable Machine Learning for Urban Sustainability

College of Landscape Architecture and Art, Fujian Agriculture and Forestry University, Fuzhou 350108, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Sustainability 2025, 17(22), 10281; https://doi.org/10.3390/su172210281
Submission received: 23 September 2025 / Revised: 7 November 2025 / Accepted: 10 November 2025 / Published: 17 November 2025

Abstract

Using Shanghai as a case study, this paper develops a multi-source fusion and interpretable machine learning framework. Sentiment indices were extracted from Weibo check-ins with ERNIE 3.0, street-view elements were identified using Mask2Former, and urban indicators like the Normalized Difference Vegetation Index, floor area ratio, and road network density were integrated. The coupling between residents’ sentiments and streetscape features during heatwaves was analyzed with Extreme Gradient Boosting, SHapley Additive exPlanations, and GeoSHAPLEY. Results show that (1) the average sentiment index is 0.583, indicating a generally positive tendency, with sentiments clustered spatially, and negative patches in central areas, while positive sentiments are concentrated in waterfronts and green zones. (2) SHapley Additive exPlanations analysis identifies NDVI (0.024), visual entropy (0.022), FAR (0.021), road network density (0.020), and aquatic rate (0.020) as key factors. Partial dependence results show that NDVI enhances sentiment at low-to-medium ranges but declines at higher levels; aquatic rate improves sentiment at 0.08–0.10; openness above 0.32 improves sentiment; and both visual entropy and color complexity show a U-shaped relationship. (3) GeoSHAPLEY shows pronounced spatial heterogeneity: waterfronts and the southwestern corridor have positive effects from water–green resources; high FAR and paved surfaces in the urban area exert negative influences; and orderly interfaces in the vitality corridor generate positive impacts. Overall, moderate greenery, visible water, openness, medium-density road networks, and orderly visual patterns mitigate negative sentiments during heatwaves, while excessive density and hard surfaces intensify stress. Based on these findings, this study proposes strategies: reducing density and impervious surfaces in the urban area, enhancing greenery and quality in waterfront and peripheral areas, and optimizing urban–rural interfaces. These insights support heat-adaptive and sustainable street design and spatial governance.

1. Introduction

Global temperatures continue to rise, and the frequency of extreme heat and heatwave events has increased significantly, becoming a major climate risk that threatens urban safety and public health [1]. Unlike sudden disasters such as typhoons and floods, heatwaves typically intensify resource stress and ecological degradation in a hidden and cumulative manner, while directly affecting both physical and mental health [2]. Previous studies have shown that high temperatures not only trigger cardiovascular and respiratory diseases but are also strongly associated with sentimental disorders, depression, and psychiatric consultation rates [3]. By the summer of 2022, China and several other Northern Hemisphere countries experienced extreme heat exceeding 40 °C, with many cities breaking historical temperature records [4]. Extreme heat has therefore become a pressing ecological and public health concern worldwide [5]. Against the backdrop of rapid urbanization, the role of public spaces and landscape environments in shaping residents’ sentiments and well-being has become increasingly prominent. Pleasant streetscapes can help relieve stress, whereas extreme heat may amplify negative sentimental experiences [6]. The increasing frequency of heatwaves in recent years has made residents more vulnerable to the combined effects of temperature and streetscape environments in daily life and outdoor activities. In high-density cities such as Shanghai, residents’ perceptions of streetscapes and their sentimental responses exhibit complex nonlinear patterns, which carry important implications for mental health, quality of life, and urban sustainability [7]. Therefore, exploring the mechanisms linking residents’ sentiments and streetscapes during heatwaves not only deepens the understanding of environment–sentiment interactions but also provides empirical support for adaptive street design and spatial governance [8]. Such efforts are vital for enhancing urban resilience and public health, while also aligning with the United Nations Sustainable Development Goals (SDG 3: Good Health and Well-being; SDG 11: Sustainable Cities and Communities). They provide critical insights for sustainable urban transformation in the context of global climate change.
Against the backdrop of nearly 3 °C of global warming, scholars have increasingly explored the profound impacts of climate change and mitigation measures on human well-being. Previous research on heatwaves has primarily focused on temperature regulation, energy disruptions, and infrastructure vulnerability [9], while relatively less attention has been paid to the psychology and sentiments of residents. In recent years, the academic community has come to recognize that high temperatures not only threaten physical health but also profoundly affect emotional states [10]. In this context, this study examines how heatwave conditions shape residents’ perceptions and sentiments toward urban environments. Thermal and perceptual factors are inherently interrelated and should be analyzed as a unified system. Elevated temperatures can reshape how people perceive and emotionally engage with urban spaces, often reinforcing preferences for cooler and more sheltered environments. Existing studies have employed multi-source data such as remote sensing, meteorological records, and social media to reveal the close connections between heatwaves and sentiments. For example, Wang et al. found that extreme heat significantly altered sentimental expressions on social media [11]; Baylis et al. confirmed a correlation between rising temperatures and increased affective expressions [12]; Noelke et al. demonstrated that sentimental levels continuously declined during hot weather in the United States [13]; and Chen et al. revealed that residents’ irritability exhibited clear spatiotemporal clustering during heatwaves in Beijing [14]. Guo et al. emphasized the interaction between thermal radiation, human activities, and spatial context, highlighting how these factors influence urban health risks during heatwaves [15]. These findings suggest that heatwaves and sentiments interact in complex ways, yet fine-grained research at the street scale remains limited. Existing studies largely rely on questionnaires, interviews, and small-scale field surveys, which are insufficient for capturing large-scale dynamic sentimental changes among residents [16]. Moreover, traditional linear statistical models are limited in explaining nonlinear effects and multivariable interactions, thereby constraining systematic understanding of the mechanisms linking heatwaves, streetscapes, and residents’ sentiments. On the other hand, research on urban streetscape environments and residents’ sentiments provides important insights into this issue. Existing evidence indicates that elements such as streetscape greening, tree canopy coverage, and the Configuration of open spaces positively influence residents’ comfort and sentiments [17]. Streetscapes are not only critical for enhancing urban livability but are also closely linked to residents’ mental health and social well-being. Although prior studies have demonstrated the positive effects of streetscape greening, tree canopy coverage, and spatial Configuration on residents’ sentiments and well-being, the mechanisms by which specific streetscape characteristics influence changes in positive and negative sentiments remain unclear. Under extreme heat conditions, these landscape elements may interact with sentimental responses in complex nonlinear ways. However, empirical studies remain scarce, and systematic examinations are still lacking.
In recent years, the rapid advancement of machine learning and social media data has opened new possibilities for investigating the interactions between residents’ sentiments and urban environments. User-generated content, with its large scale, real-time availability, and natural expression of sentiments, has gradually become an important data source for sentiment research [18]. By integrating deep learning models, such as ResNet and Inception-v3, with machine learning techniques like Extreme Gradient Boosting, researchers can efficiently model large datasets and capture the relationship between environmental features and residents’ sentiments. This approach provides a strong complement to traditional small-sample studies based on questionnaires or experiments, opening new avenues for sentiment research at the street level [19]. Moreover, advances in deep learning and neural networks have enabled the exploration of nonlinear relationships between environmental effects and climatic variables [20]. Models like random forests, regression trees, and XGBoost have been widely applied in urban heat environment modeling [21]. Despite the “black box” dilemma of machine learning models, the rise in explainable artificial intelligence—particularly the SHapley Additive exPlanations method—offers new approaches for uncovering complex interactions among variables. Its dual strengths in prediction and interpretation enable researchers to more intuitively understand the nonlinear coupling mechanisms among streetscape characteristics, temperature changes, and residents’ sentiments [22]. Some studies have combined XGBoost with GeoSHAPLEY and compared it with spatial lag models and multiscale geographically weighted regression. The results indicate that GeoSHAPLEY performs better in handling complex spatial contexts with both nonlinearities and interactions, and it can serve as an effective alternative to traditional spatial statistical models [23]. In the context of extreme heat, examining the nonlinear relationship between residents’ sentiments and streetscapes in Shanghai can address the lack of micro-scale studies and provide valuable insights for urban planning. Drawing on multi-source data and the XGBoost–GeoSHAPLEY approach, this study aims to uncover the mechanisms through which streetscape environments affect sentiments, thereby contributing to enhanced urban resilience and residents’ well-being. In this regard, previous studies have demonstrated the feasibility of using social media data for heatwave-related research despite concerns regarding user self-selection and marketing noise. Jung and Uejio showed the effectiveness of using Twitter data for examining heatwave responses [24]. Similarly, Wang et al. utilized social media data to assess heatwave exposure in Chinese megacities [25]. Furthermore, Zander et al. explored the correlation between heatwaves and Twitter activity across various regions, finding strong associations between heat intensity and social media responses [26]. These studies highlight the value of social media as a data source for examining public responses to heat events, despite the potential biases from non-residential users or marketing influences. Given the large volume of data used in this study and the rigorous data cleaning and filtering process, the impact of such biases is minimized. The substantial dataset and the careful selection of relevant content help ensure the robustness of the findings and mitigate the influence of potential bias from non-residential accounts or marketing noise.
This study aims to develop an analytical framework based on multi-source data and interpretable machine learning to uncover the nonlinear mechanisms linking residents’ sentiments and streetscape environments in Shanghai during heatwaves. By integrating social media texts, meteorological data, and street-view images, the study seeks to enable rapid, fine-grained, and interpretable analyses of residents’ sentimental dynamics and streetscape elements. This approach identifies spatial contexts where sentiments are more vulnerable and provides evidence for spatial optimization and climate-adaptive design. The study addresses the following questions: How do streetscape elements influence the spatial distribution of residents’ sentiments under heatwave conditions? Do different streetscape characteristics exhibit nonlinear effects in mitigating or exacerbating negative sentiments? Can these explorations advance quantitative and evidence-based research on streetscape perception and provide scientific decision support for urban street renewal and heat-adaptive design?

2. Data and Methodology

2.1. Study Area

Shanghai is located on the eastern coast of China at the Yangtze River estuary, between 30°40′–31°53′ N and 120°52′–122°12′ E. It covers an area of about 6340 km2 and has a permanent population of over 24 million as of 2022 [27], making it one of the most densely populated and highly urbanized megacities in China (Figure 1). As the core city of the Yangtze River Delta urban agglomeration and a major global metropolis, Shanghai serves as a hub for economy, transportation, finance, and culture, while also facing typical climate and environmental challenges of a megacity [28]. The city’s annual mean relative humidity is about 77%, and in the summer of 2024 there were 47 days with maximum daily temperatures at or above 35 °C, indicating a heat-risk environment characterized by both high temperature and high humidity [29]. With high population mobility, intensive commuting, and a permanent population density of about 4000 people per km2, Shanghai experiences intensified spatiotemporal heterogeneity and compounded peak effects of heat exposure due to strong human–environment coupling. Influenced by its polycentric spatial structure and river–coast geomorphology, Shanghai exhibits a complex urban heat island pattern, with cores, sub-cores, and river–coast corridors coexisting and forming compound heat environments under extreme high temperatures. To ensure spatial accuracy and data consistency, all datasets were projected to WGS 84/UTM Zone 51N using ArcGIS 10.8. A regular grid of 500 m × 500 m was created in ArcMap as the basic analysis unit, covering 29,574 grids across the city. Mean values were calculated for each grid cell to characterize the built environment and streetscape features in detail, providing a reliable spatial basis for examining the distribution of residents’ sentiments and their coupling with landscapes under heatwave conditions.

2.2. Methodological Framework

First, this study used Python 3.10 to crawl Weibo check-in data and extracted user-generated text content as the basic dataset. The posts were tagged with geographic coordinates, which were matched to specific street locations, ensuring that the sentiment analysis was accurately linked to the areas where users were located. The applicability of Weibo data for sentiment analysis in urban environments has been supported by previous studies [30,31]. Next, the ERNIE 3.0 model was applied for natural language processing to calculate sentiment indices, which were used as the dependent variable in this study. At the same time, the Mask2Former semantic segmentation model was used to process street-view images and quantify streetscape indicators such as greenery, sky, buildings, and roads. In addition, Matlab was employed to calculate visual entropy and color complexity, thereby further characterizing the overall quality of the visual environment. Subsequently, a dataset was constructed from sentiment indices, landscape elements, and visual quality indicators, and the XGBoost model was trained to reveal the coupling relationship between street environments and residents’ sentiments under heatwave conditions. Furthermore, the SHAP method was applied to interpret the model, clarifying the relative contributions and directional effects of different streetscape elements on sentiments, while also identifying potential nonlinear effects. Finally, GeoSHAPLEY was used to analyze spatial effects, identifying sentiment-sensitive areas and key landscape elements, thereby providing evidence for streetscape optimization and climate-adaptive planning (Figure 2).

2.3. Data Collection and Processing

The data used in this study include Weibo check-in texts, street-view images, and remote sensing and spatial datasets. First, Weibo check-in data from the high-temperature period of July–August 2024 in Shanghai were collected. Texts related to heat were extracted using keyword filtering (e.g., “heatwave,” “sultry”), followed by data cleaning to remove emojis, duplicate content, and invalid characters, resulting in 4233 valid texts. Subsequently, sentiment recognition was performed using the ERNIE 3.0 Chinese pre-trained language model, fine-tuned with two labeled Chinese sentiment corpora, Weibo_Senti_100k and ChnSentiCorp. The model produced sentiment scores ranging from 0 to 1, where higher values indicated more positive sentiments, thereby constructing a sentiment index for residents under heatwave conditions. Second, street-view images were collected in March 2025 using the Baidu Street View API (https://lbs.baidu.com/, accessed on 15 March 2025), covering the entire Shanghai metropolitan area. Based on OpenStreetMap (OSM) road network data, sampling points were generated in ArcMap at 50 m intervals. At each point, images were captured at four fixed headings (0°, 90°, 180°, and 270°) with consistent resolution, yielding a total of 1,887,356 high-quality images. The OpenCV toolkit was then used to stitch multi-directional images into 360° panoramas. These panoramas were processed using the Mask2Former semantic segmentation model trained on the Mapillary Vistas dataset to extract streetscape elements such as greenery, sky openness, buildings, and roads. Finally, additional spatial datasets were integrated to supplement environmental information. The Normalized Difference Vegetation Index (NDVI) was obtained from Google Earth Engine (GEE) as the average value for the period of July to August 2024, matching the timing of the posts collected. Road network and building density data were derived from OpenStreetMap (OSM), with data extracted in July 2024 (https://www.openstreetmap.org/, accessed on 10 July 2024).

2.4. Selection of Variables

To ensure the scientific validity and comparability of indicator selection, this study developed a comprehensive indicator system comprising three dimensions: landscape perception, environmental elements, and visual quality, based on studies conducted between 2015 and 2025.
In terms of landscape perception, the green view index is an important factor affecting residents’ mental health, as vegetation also influences microclimates by altering albedo, providing thermal regulation through evapotranspiration, and serving as shading shelters for people and vehicles on the streets [32]. Openness and enclosure, respectively, reflect sky visibility and the sense of building enclosure, while the aquatic rate is related to comfort and emotional experience. It is important to note that pavement degree, often linked to the urban heat island effect, can contribute to increased thermal stress, which may intensify the emotional impact of heatwaves [33]. The Mask2Former model was used to perform semantic segmentation on street-view images to extract these elements, and the Normalized Difference Vegetation Index (NDVI) was incorporated to provide a more comprehensive characterization of vegetation conditions [34]. Regarding environmental elements, floor area ratio, building coverage ratio, and road network density were used to describe the built-up pattern and thermal environment characteristics [35]. The point-of-interest (POI) composite index was employed to measure land use diversity and functional vitality, all of which may influence residents’ sentimental responses [36]. These indicators were derived from OpenStreetMap (OSM) data and processed using ArcMap. In terms of visual quality, landscape complexity and diversity are important factors influencing sentimental experiences [37]. Visual entropy reflects the evenness of landscape element distribution, while color complexity captures the influence of color characteristics on environmental perception. These metrics were calculated using Matlab. The selected indicators and their corresponding descriptions are presented in Table 1.

2.5. Research Methods

2.5.1. Mask2Former-Based Framework for Streetscape Element Extraction

The model formulates segmentation as a set prediction task through a mask classification mechanism, significantly improving accuracy and robustness compared with traditional pixel-wise approaches [38]. During training and validation, the Mapillary Vistas dataset, which includes elements such as roads, buildings, and vegetation, was used to enhance the model’s generalization ability in Shanghai’s street environments [39]. The contextual modeling and multi-scale feature fusion capabilities of Mask2Former make it particularly suitable for analyzing streetscapes with complex built environments and heterogeneous element distributions. It has demonstrated superior performance in semantic, instance, and panoptic segmentation tasks across datasets including COCO, Cityscapes, ADE20K, and Mapillary Vistas, outperforming models including UniFormer, SegFormer, UperNet-MpViT, and Twins-PCPVT, with better efficiency and faster convergence [40]. In this study, the model was applied to extract key landscape indicators, including OP, GR, AR, PD, and EN, thereby providing essential data support for subsequent analysis of the nonlinear relationships between streetscapes and residents’ sentiments under heatwave conditions.

2.5.2. Matlab-Based Calculation of Visual Entropy and Color Complexity

To quantify the visual characteristics of streetscapes, this study used Matlab R2023b to calculate VE and CC from images. VE reflects the diversity and informational complexity of visual elements in an image and serves as an important indicator of the richness of street spatial vision. The calculation formula is:
H x = i = 1 n P a i × l o g P a i
where a i represents the visual element in the image partition, and P a i denotes the probability of that element occurring in the region. Through this formulation, H x represents the overall visual complexity of the image.
CC is used to evaluate the distribution and diversity of colors in an image, capturing how street color composition influences residents’ perceptions. The calculation formula is:
C k = i = 1 m n i × log n i N
where C K denotes the color complexity of the image, n i is the number of pixels of color   i , N is the total number of pixels, and m is the number of distinct colors. This formula evaluates the distribution of color elements in the image, thereby reflecting visual diversity and complexity.

2.5.3. ERNIE 3.0-Based Method for Sentiment Index Calculation

This study developed a Chinese sentiment analysis framework based on the Baidu pre-trained language model ERNIE 3.0 to quantify residents’ sentiments expressed in Weibo texts. ERNIE 3.0 was pre-trained on large-scale Chinese corpora of knowledge graphs, integrating both autoregressive and autoencoding mechanisms. This enables it to effectively capture contextual dependencies, making it particularly suitable for sentiment recognition in unstructured texts such as Weibo posts [41]. The experiments used two corpora, Weibo_Senti_100k and ChnSentiCorp, with data split into training, validation, and test sets in a 7:2:1 ratio. The model was optimized using the AdamW optimizer and cross-entropy loss function, with a maximum sequence length of 128, a learning rate of 2 × 10−5, and 60 training epochs. The final accuracy reached 96.78%. Based on this setup, the model was applied to Weibo check-in data collected during the July–August 2024 heatwave. Sentiment recognition was conducted on 4233 cleaned valid texts, producing sentiment index scores ranging from 0 to 1, where higher values indicated more positive sentiments. This index served as the dependent variable, providing essential support for analyzing the nonlinear relationships between streetscapes and residents’ sentiments under heatwave conditions.

2.5.4. Global Moran’s I

Global Moran’s I is a commonly used statistical method for measuring spatial autocorrelation within a study area. It is applied to measure the degree to which neighboring values are similar or dissimilar in geographic space, revealing spatial autocorrelation. This helps to understand whether a given indicator exhibits gradual spatial change, such as clustering or dispersion, across the study area [42]. In this study, this method was employed to evaluate the spatial distribution of the sentiment index, streetscape features, and environmental indicators across the Shanghai metropolitan area. By analyzing the similarity of values between adjacent spatial units, Moran’s I determines whether sentiments and landscape features exhibit spatial autocorrelation. The calculation formula is as follows:
I = n i = 1 n j = 1 n w i j x i x ¯ x j x ¯ i = 1 n j = 1 n w i j i = 1 n x i x ¯ 2
Here, n represents the total number of spatial units, x i and x j are the observed values of the i and j spatial units, x ¯ is the overall mean, and w i j is an element of the spatial weight matrix, reflecting the adjacency relationship between spatial units i and j . The value of Moran’s I ranges from 1 , 1 . When I > 0 , it indicates positive spatial autocorrelation, meaning spatial units with similar values tend to cluster together. When I < 0 , it indicates negative spatial autocorrelation, meaning high and low values alternate spatially. When I = 0 , it suggests that the variable is randomly distributed in space with no apparent spatial dependence.

2.5.5. Interpretability Analysis of the XGBoost Model Using SHAP

To systematically compare the applicability of different machine learning methods in modeling the relationship between streetscapes and residents’ sentiments, this study evaluated the performance of three commonly used models: XGBoost, CatBoost, and LightGBM (Table 2). The data was split into training and testing sets, with 80% of the data used for training and 20% for testing. The results showed that XGBoost achieved the best fitting accuracy, with an RMSE of 0.0434, an MAE of 0.0232, and an R2 of 0.9316, which were significantly better than CatBoost (R2 = 0.5910) and LightGBM (R2 = 0.3285). Therefore, XGBoost was selected as the core modeling tool in this study. XGBoost is built on a gradient boosting framework and is capable of handling high-dimensional, nonlinear, and complex interaction data [43]. It is well suited for studies such as this one, where the number of variables is large, their scales vary widely, and relationships are complex. To enhance model interpretability, the SHAP method was introduced [44]. SHAP is based on the Shapley value principle from cooperative game theory. By calculating the marginal contribution of each variable to the prediction, it quantifies the importance and direction of different landscape elements in predicting the sentiment index, while also identifying potential nonlinear effects and interactions. Its general form is given as:
g z = ϕ 0 + j = 1 M ϕ j z j
where g z   is the model’s prediction, ϕ 0 is the baseline output, ϕ j represents the SHAP value of the j - th built environment variable, z j indicates the presence or absence of the feature, and M is the total number of features. In addition, to visualize the SHAP values and gain insights into the feature contributions, we employed various SHAP plots, including feature importance, summary plots, heatmaps, waterfall plots, and partial dependence plots. Each SHAP dependence plot was fitted using a second-order polynomial regression curve to capture potential nonlinear relationships between feature values and their SHAP contributions. These visualizations provided a deeper understanding of how different features interact and their impact on the model’s predictions.

2.5.6. GeoSHAPLEY-Based Interpretability Analysis

To further reveal the spatial effects between streetscape features and residents’ sentiments, this study incorporated the GeoSHAPLEY method into the XGBoost model [45]. Traditional SHAP treats spatial variables (e.g., geographic coordinates X and Y) as independent features, which makes it difficult to capture their overall spatial influence. GeoSHAPLEY integrates coordinate features into a unified geospatial variable and quantifies their interactions with other non-spatial factors, thereby providing a more comprehensive interpretation of spatial effects. The calculation formula is as follows:
ϕ i = S F \ i | S | ! ( | F | | S | 1 ) | F | ! [ f ( S { i } ) f ( S ) ]
where ϕ i denotes the GeoSHapley value of feature i ; S is a subset of features excluding i ; F is the full set of features; | S | is the size of subset S ;   F is the size of the full feature set F ; f ( S ) is the model prediction using only subset S ; and f ( S { i } ) is the prediction after including feature i .

3. Results

3.1. Spatial Distribution of Landscape Environment and Sentiment Index

Based on the sentiment analysis of 4233 Weibo check-in texts using ERNIE 3.0, the mean sentiment index was 0.583. A binary classification approach was used with a threshold of 0.5, where sentiment scores greater than or equal to 0.5 were classified as positive and those below 0.5 were classified as negative. As a result, 1772 texts (41.9%) were classified as negative and 2461 texts (58.1%) as positive, indicating an overall positive tendency. Sentiment scores were concentrated at the extremes of 0–0.1 and 0.9–1.0, showing a marked polarization (Figure 3a). In Figure 3b, the blank areas correspond to the river estuaries and water bodies around Chongming Island, Baoshan District, and the Pudong New Area, where no street-level imagery or sentiment data were collected because these regions are not urbanized or habitable. Spatially, the central urban area displayed an interweaving of high and low values, with low-value patches in dense neighborhoods, while adjacent blocks showed clusters of positive sentiments. In suburban, peripheral, and waterfront areas, positive sentiments were more prominent, with indices often exceeding 0.68. This suggests that waterfront openness, higher greenness, and shading may help mitigate negative sentiments during heatwaves. A small number of blocks exhibited extremely low values (<0.26), indicating sentimental vulnerability, which may be related to poor local landscape quality or adverse thermal environments (Figure 3b). The histogram showed a distinct peak in the sentiment index between 0.60 and 0.67, while samples at both extremes (>0.81 and <0.26) were sparse, reflecting a pattern of concentration at medium-to-high values with dispersion at the margins. These findings indicate that residents’ sentiments in Shanghai during heatwaves exhibited pronounced spatial heterogeneity: the central urban area showed mixed high and low values, while suburban and waterfront areas were more prone to positive clustering. Building on this, subsequent analysis will link GR, OP, EN, AR, PD, and NDVI to systematically examine their associations with the sentiment index.

3.2. Spatial Patterns of Landscape Environmental Factors

Figure 4 illustrates the spatial distribution patterns of streetscape and environmental factors at the 500 m grid scale in Shanghai, providing a spatial foundation for examining the nonlinear mechanisms that link residents’ sentiments with landscape environments during heatwaves. (a) AR is mainly concentrated along the Huangpu River, Suzhou Creek, and near-coastal zones, while values are generally low within the urban core. (b) OP is higher in suburban and waterfront open areas, whereas it is significantly reduced in central districts due to dense high-rise buildings. (c) EN is more pronounced in the area between the inner and middle rings and in the core of Pudong, reflecting highly concentrated street-space forms. (d) GR forms continuous high-value zones in peripheral new towns, large green spaces, and riparian green corridors, while remaining lower in central business districts and high-density residential areas. (e) PD is higher along arterial roads and in core commercial areas, but lower in residential side streets and neighborhoods adjacent to green spaces. (f) NDVI shows a spatial pattern consistent with GR, with high-value zones in Chongming Island and peripheral areas, and a patchwork of low values in the urban core. (g) FAR is elevated in central districts and the core of Pudong, decreasing gradually toward peripheral areas. (h) BCR is higher in older high-density neighborhoods and industrial or commercial areas, and lower in low-density suburban residential zones. (i) RND forms a core high-value area in the central districts and exhibits belt-shaped patterns along radial arterials and ring roads. (j) LUM is more pronounced in key functional areas such as Lujiazui, Xujiahui, Hongqiao, and Wujiaochang. (k) VE reaches higher values in street spaces with high functional diversity and complex interfaces, while being lower in waterfront open areas and large green spaces. (l) CC is higher in commercial corridors and mixed-use street blocks, but lower in areas dominated by green space, water bodies, or single-use industrial land. Overall, the central urban area is characterized by high EN, FAR, and RND, along with low OP and GR, suggesting that residents’ sentiments may be more vulnerable to negative impacts. In contrast, peripheral and waterfront areas, with greater OP and GR, show stronger potential to alleviate negative sentiments under heatwaves, providing an important reference for subsequent exploration of nonlinear relationships between streetscapes and sentiments.

3.3. Results of Global Moran’s I, Z-Score, and p-Value

Using Global Moran’s I analysis in ArcGIS, this study examined the spatial autocorrelation of the sentiment index and various streetscape and environmental indicators (Table 3). The results show that all indicators had p-values less than 0.001 and Z-scores far exceeding the significance threshold, indicating that both residents’ sentiments and environmental features exhibited significant spatial clustering rather than random distribution. Overall, most Moran’s I values ranged from 0.34 to 0.89, reflecting generally strong spatial correlations. At the sentimental level, the sentiment index reached a Moran’s I value of 0.888, with a Z-score exceeding 297, indicating highly clustered sentiments across Shanghai during heatwaves, with significant spatial heterogeneity. Among landscape and environmental factors, NDVI (0.798), FAR (0.651), and BCR (0.686) exhibited strong clustering patterns, revealing sharp contrasts in vegetation cover and built environment structures between central and peripheral areas. Meanwhile, GR (0.448) and AR (0.341) showed relatively weaker spatial autocorrelation but still demonstrated significant clustering, suggesting that natural streetscape elements were locally concentrated in certain areas. Regarding visual quality, VE (0.591) and CC (0.578) also exhibited notable spatial correlation, reflecting uneven patterns of visual perception across different streetscapes. Both residents’ sentiments and streetscape elements showed significant spatial clustering, with the sentiment index and NDVI displaying the strongest association.

3.4. SHAP Feature Importance Analysis

This section employs SHAP global feature importance and beeswarm plots to analyze the interactions between streetscapes and the sentiment index during heatwaves. As shown in the left panel of Figure 5, NDVI (0.024), VE (0.022), FAR (0.021), RND (0.020), and AR (0.020) ranked highest in contribution. BCR (0.016) and LUM (0.016) followed as secondary factors. PD (0.013) showed stable but relatively weak effects, while CC (0.009), OP (0.008), EN (0.007), and GR (0.007) were overall weaker contributors.
The right panel of Figure 5 (beeswarm plot) reveals directional and contextual differences. NDVI generally showed positive contributions but with dispersed distributions, indicating unstable positive effects and heterogeneity in vegetation quality across different street segments. FAR was primarily associated with negative contributions at high values, whereas RND showed the opposite pattern, with high values clustering on the positive side. Together, they form a contrasting relationship between density and accessibility dimensions. High BCR values shifted distinctly to the right, reflecting a stable positive effect. LUM exhibited increasingly negative contributions as values rose, suggesting that excessive land use mixing may be associated with adverse sentiments. VE showed unstable contributions but tended to become more positive as values increased, suggesting that within a certain range, richer visual information may help improve sentiments. CC displayed unstable directions, with most effects scattered around both sides of zero. In contrast, OP, EN, and GR had point clouds closer to the zero axis, suggesting weaker independent effects and a greater likelihood of influencing the sentiment index through coupling with density, road networks, NDVI, and AR. Overall, the results suggest that quality-oriented natural indicators and waterfront features are more likely to exert positive effects, whereas high-density and hardened morphological variables tend to have negative impacts. Enhancing accessibility and moderately improving visual organization may provide potential buffering effects.

3.5. SHAP Heatmap and Waterfall Analysis

The SHAP heatmap in Figure 6a reveals clustered patterns of explanatory modes, showing both synergistic and antagonistic relationships among variables across different street segments. In this visualization, red indicates positive contributions that increase the predicted sentiment index, while blue represents negative contributions that decrease it. Overall, the left part of the heatmap tends to display blue regions, whereas the right part is generally dominated by red tones, indicating that the contribution of most variables shifts from negative to positive along the sample order. NDVI was predominantly red but interspersed with blue segments, reflecting unstable positive contributions that weakened when combined with high-density or hardened environments. FAR and LUM exhibit predominantly red regions around samples 50–90 and 270–300, where f(x) lies above the zero axis, indicating stronger positive contributions to the predicted sentiment. RND was mostly red, suggesting a positive influence; and high BCR values shifted distinctly to red, reflecting stable positive contributions. VE fluctuated in direction but tended to be more positive at higher values, whereas CC showed unstable contributions. OP, EN, and GR remained close to the zero axis, suggesting weaker independent effects and a greater likelihood of influencing sentiments indirectly through coupling with NDVI, density, road networks, and AR.
The waterfall plot in Figure 6b illustrates the local effects for a representative sample, where the baseline E[f(X)] ≈ 0.623 increased to about 0.63. NDVI (+0.03) and VE (+0.02) were the main positive factors, while FAR and GR contributed modest gains of about +0.01 each. PD (−0.02) and CC (−0.02) were the main negative factors, OP and AR each contributed about −0.01, and RND remained nearly neutral. Differences between local and global effects suggest that density and functional mix are context-dependent, while high-quality greenery or good visual organization can partially offset the adverse impacts of high density.

3.6. SHAP Partial Dependence Plots Analysis

Figure 7 presents the marginal effects of landscape and environmental factors on the sentiment index under heatwave conditions. The fitted curves reveal nonlinear threshold characteristics and contribution directions of different indicators. The results indicate that different factors exert distinct influences on sentiments and exhibit inflection effects within specific ranges.
(1)
NDVI exhibited an unstable positive effect, improving sentiments significantly at low-to-medium values, but showing greater fluctuations at higher levels, suggesting diminishing marginal benefits of greenery beyond a threshold. AR had limited effects at low levels but began contributing positively at around 0.08–0.10. However, very high values were rare, making the effect more uncertain. OP showed a gentle slope overall and became increasingly positive beyond 0.32, suggesting that greater openness supports more positive sentimental experiences during heatwaves. However, this effect likely reflects a balance between visual preference and thermal stress, as higher openness improves spatial perception but also increases solar exposure. GR showed strengthening negative effects after 0.20, indicating that excessive greenery may lead to shading or stuffiness, thereby weakening its positive influence on sentimental well-being. This is likely due to the discomfort caused by dense vegetation, reducing airflow and contributing to an oppressive environment.
(2)
FAR displayed an almost monotonic negative effect, with high FAR strongly associated with negative sentiments. BCR had limited effects at low levels but turned positive beyond 0.07, suggesting that moderately continuous street interfaces benefit sentiments. RND exhibited a clear threshold effect, being strongly associated with positive sentiments between 3.13 and 29.64, but shifting rapidly toward negative contributions beyond this range. PD showed markedly stronger negative effects beyond about 0.31, indicating that increased impervious surfaces are detrimental to residents’ sentiments during heatwaves. LUM became increasingly negative with higher values.
(3)
VE exhibited a typical U-shaped relationship: slightly negative at low values, lowest at mid-range, and turning positive beyond about 4–5. Contributions became more pronounced after 7.05, suggesting that moderate interface complexity helps improve sentiments. CC showed a similar U-shaped relationship to VE, with limited effects at low values and increasingly positive contributions at higher values, though with greater volatility. EN had generally weak effects, slightly leaning positive, and was more coupled with other spatial form factors.
Overall, the results demonstrate clear threshold effects between residents’ sentiments and streetscape characteristics. Moderate levels of openness, road network density, and visual diversity help alleviate negative sentiments, whereas excessive FAR, PD, and GR may generate adverse impacts. However, these analyses only reflect nonlinear effects at the aggregate level and do not capture spatial variation. Therefore, the next section introduces the GeoSHAPLEY method to further explore geographic heterogeneity and location-based contributions.

3.7. GeoSHAPLEY Based Spatial Contributions and Location Dependence

Figure 8 shows the spatialized SHAP values from the XGBoost model. Colors represent contribution direction, with red indicating positive, blue indicating negative, and intensity reflecting effect strength. The decomposition of location effects using GeoSHAPLEY reveals pronounced spatial heterogeneity in the sentiment index across Shanghai during heatwaves.
The results show that AR was positive in Chongming, southeastern Pudong, and along the Huangpu and Suzhou Rivers, but negative in the urban area core, suggesting that waterfront continuity and accessibility provide buffering effects. OP was predominantly negative in core districts such as Huangpu, Jing’an, Xuhui, and Hongkou, but formed belt-shaped positive zones in Jiading, Songjiang, Fengxian, Jinshan, and urban–rural fringes, indicating that openness above the threshold more effectively improves sentiments in peripheral areas. EN and GR alternated between red and blue, with positive contributions in both central and some outer districts. PD was broadly positive in suburban areas but negative in the core. NDVI and GR formed continuous high-contribution belts in Qingpu, Songjiang, and Jinshan, indicating stable gains from high-quality greenery in the southwestern corridor. FAR was strongly negative in the urban area but positive in outer areas, highlighting the central concentration of negative sentiments under high floor area ratios. BCR remained consistently positive in the Lujiazui core functional zone but negative in Pudong’s periphery and Chongming. RND showed patchy positive effects in central–fringe areas but turned negative at overly dense nodes such as Wujiaochang and Xujiahui when exceeding the threshold. LUM was mostly negative in core areas but gradually positive in outer suburbs, reflecting the disadvantages of excessive functional mixing versus the potential benefits of complementary uses in peripheries. VE was positive in areas such as People’s Square, Lujiazui, and Xujiahui but tended to be negative in the outer suburbs, while CC showed unstable positive patches around the urban core. Overall, the findings highlight synergistic benefits of water–green resources, moderate openness, continuous interfaces, and medium accessibility. In contrast, high FAR, intensive paving in the core, and excessive functional mixing were more closely coupled with negative sentiments.

4. Discussion

4.1. New Insights into Sentimental Responses to Streetscape Environments During Heatwaves

From a combined perspective of geographic analysis and interpretable machine learning, this study further examined the mechanisms by which streetscape perceptions are associated with residents’ sentiments during heatwaves. First, intensity- and form-related streetscape elements showed significant spatial clustering across the city, suggesting that high-intensity development and corridor-style expansion in central districts jointly create composite conditions of heat exposure and crowding, thereby amplifying spatial heterogeneity in sentimental responses. This finding is consistent with Liu et al. [46]. Mechanistically, high FAR was strongly associated with reduced sentiments, likely due to cumulative radiative loads and weakened ventilation caused by volumetric concentration and restricted sky view. RND exhibited an optimal mid-range effect: within reasonable thresholds, it reduced travel uncertainty and alleviated crowding, while excessive density increased psychological costs of walking and staying due to intersection conflicts and traffic disturbances. A moderate road network also facilitated ventilation corridors and mitigated heat islands, aligning with Li’s comparative study on summer ventilation corridors [47]. LUM in core areas showed marginally adverse effects: continuous delivery and travel activities increased noise and thermal stress, while frequent business turnover and crowd flows weakened attentional restoration. By contrast, BCR showed consistently positive effects in high-activity corridors. Continuous street walls and clear boundary orders enhanced visual orderliness and path predictability, thereby mitigating heat-induced anxiety and fatigue. We further speculate that morphologically continuous interfaces provide sustained benefits in summer through all-day shading and altered short- and long-wave radiation balance, whereas mechanical cooling spillover only produces short-term, localized effects near storefronts. This is consistent with field observations [48], such as: “On hot summer days, walking through an air-conditioned mall is undoubtedly the best way to spend a scorching summer afternoon in Shanghai’s North Bund.” Such qualitative experiences underscore the benefits of well-designed streetscapes that offer continuous shading, reducing the intensity of heat exposure. PD also showed a strong negative correlation with sentiments. Extensive impervious surfaces, due to high albedo and heat storage, enhanced near-surface long-wave radiation and thermal stress, making individuals more prone to avoidance and irritability. This aligns with Anand and Sailor [49]. Overall, maintaining moderate road network accessibility, enhancing interface continuity, and controlling surface hardening provide actionable pathways to simultaneously achieve thermal comfort, behavioral efficiency, and positive sentiments under high-temperature conditions.
Additionally, conflicts may arise among landscape conservation, water resource management, social interests, and policy planning within streetscapes [50,51]. Our findings further indicate that NDVI, as a quality-oriented indicator, is generally associated with positive sentiments but becomes unstable at higher levels [52]. This suggests that abundant vegetation alone may not be sufficient to ensure lasting sentimental benefits, which still depend on whether canopy ventilation and shading patterns create effective microclimate buffering [53]. In addition, socioeconomic inequalities—such as differences in access to indoor or vehicular climatization—may also mediate residents’ thermal and emotional responses, further influencing the extent to which outdoor greenery contributes to overall well-being. By contrast, GR, as a proportion-based exposure indicator, shifted from positive to negative effects at high levels [54]. This pattern may be explained by the dominance of grass fields in areas with very high GR values, which, although green, provide limited shading and weak cooling through evapotranspiration. During heatwaves, such open grassy areas can increase surface temperatures and radiant exposure, leading to thermal discomfort rather than relief. In other cases, dense canopies with insufficient airflow may also cause localized stuffiness, suggesting that the marginal benefits of greenery depend on an appropriate balance between shading and ventilation. These effects are jointly constrained by canopy density, pedestrian corridor scale, and sky view, consistent with the findings of Shu et al. [55]. AR made stable positive contributions in belt-shaped waterfront spaces with good continuity and accessibility, suggesting that the coupling of evaporative cooling and wind corridors can significantly relieve thermal stress during heatwaves. However, when water accessibility is poor or disrupted by hard boundaries, cooling and sentimental benefits are greatly diminished, consistent with Zhou et al. [56]. Additionally, priority should be given to the synergy of ventilation, shading, and evapotranspiration. Strategies include controlling vegetation density to avoid overly dense canopies, creating ventilation corridors and continuous shading along walking paths and resting areas, and enhancing accessibility and continuity in waterfront spaces while reducing high-albedo paving. These measures facilitate effective matching between environmental “dosage” and situational context. This aligns with local comments such as: “Waiting for the bus, I snapped this picture of a street shaded by trees with a gentle breeze; it didn’t feel hot at all.” Such observations support the need for urban spaces to incorporate elements that provide both shading and ventilation, ensuring that public spaces are comfortable and resilient to heat.
Moreover, by leveraging GeoSHAP’s decomposition of location effects, this study revealed pronounced spatial heterogeneity in the relationships between sentiments and streetscapes during heatwaves. The aquatic rate in waterfront corridors and Chongming generally showed positive associations, while continuous high-contribution belts of NDVI and greenery emerged in Qingpu, Songjiang, and Jinshan corridors. For example: “Although the summer heat was unbearable, I didn’t have to worry about the scorching sun at the Jinshan Chinese Farmer’s Painting Village. The walkways were all shaded by trees, and I could enjoy fresh local food, pick seasonal fruits, and experience village life up close, all while staying cool.” Such experiences highlight the positive effects of waterfront spaces and areas with abundant greenery, which, as the study suggests, provide cooling benefits that alleviate heat stress and contribute to positive emotional responses. By contrast, the urban area exhibited negative clusters characterized by high FAR and high PD, whereas interface continuity along some vibrant corridors maintained persistent positive associations. This pattern indicates that sentimental buffering does not follow a single universal formula. Its effects depend on contextual factors such as local morphology, ventilation pathways, functional intensity, and hydrophilic connectivity, with the same indicator potentially showing opposite directions across different districts. Therefore, governance approaches should shift from indicator balancing to scenario-specific matching [45]. In the urban area, priority should be given to controlling intensity and surface hardening while restoring micro-ventilation. In waterfronts and the southwestern corridor, efforts should focus on enhancing water accessibility and high-quality greenery. In urban–rural interfaces, appropriate control of road network density and optimization of interface continuity are needed to balance thermal comfort and behavioral efficiency. In addition, the location-specific results suggest that evaluation frameworks should be based on zonal baselines rather than a uniform threshold across the entire region [57]. Building on these findings, the following section proposes sustainable optimization strategies for streetscapes under high-temperature conditions. It also discusses how to leverage landscape potential to strengthen residents’ sentimental resilience, thereby providing planners and practitioners with actionable insights and methods.

4.2. Sustainable Strategies for Streetscape Environments

4.2.1. Improving Streetscape Connectivity

Based on the experimental results, this study proposes a network-oriented approach to integrate fragmented blue–green elements and create a cooling–sentiment buffering system that ensures accessibility, visibility, and maintainability. First, continuous pedestrian shading systems should be prioritized in the urban area and key corridors (Figure 9). A combination of tree arrays, permeable paving, and low planting beds can form stable shading chains and drainage systems. At intersections and bus bays, expanded tree pits and integrated waiting facilities can be installed to reduce radiative load and alleviate thermal discomfort while waiting. Second, hierarchical connections between waterfronts and inland waterways should be strengthened. Along the Huangpu River and Suzhou Creek, waterfront accessibility should be improved by removing hard barriers such as fences and high embankments [58]. In inland streets and alleys, shallow channels, rain gardens, and sunken green spaces should be introduced so that evaporative cooling penetrates residential areas and campuses along daily routes. Low-energy misting facilities can also be placed at bridges, corners, and small plazas to relieve microscale heat stress [59]. At the same time, a sequential system of pocket parks should be established. Within a 300–500 m service radius, pocket parks can be created in vacant lots, plot gaps, and building setbacks [60], equipped with tree clusters, movable seating, and drinking fountains. Small-scale cooling points should also be set up at community entrances, markets, and transit stations, offering shade, seating, and signage, while being networked with public toilets and water points [61]. Furthermore, school playgrounds, institutional courtyards, and open roadside green spaces can serve as temporally open supporting nodes, which can be linked in the evenings on weekdays and on weekends to form cross-district looped walking networks. At the interface level, visual organization and path predictability should be improved by enhancing street-wall continuity, strengthening wayfinding clarity, and managing façade reflectance, thereby reducing sentimental burdens caused by crowding and uncertainty [62]. To ensure effectiveness, a connectivity checklist is recommended, with regular inspections of four core indicators: canopy connectivity, shading continuity, ventilation corridors, and waterfront accessibility. During non-heat seasons, supplementary planting, canopy optimization, permeable pavement maintenance, and node renewal should be carried out. A community co-governance mechanism should be promoted to encourage street-front businesses to participate in the maintenance of greenery and shading structures.
Furthermore, in addition to heatwave-oriented design, it is essential to consider dual-season adaptability given Shanghai’s cold winters. Future street and landscape interventions should integrate flexible elements that support both summer and winter comfort. For example, shaded and ventilated seating areas can be designed to allow seasonal adjustments, with retractable awnings or deciduous vegetation that provide cooling in summer while permitting sunlight penetration in winter. Likewise, integrating wind-sheltered yet sunlit resting spots can enhance usability during cold periods. These measures align with bioclimatic design principles emphasizing all-season outdoor comfort [63]. To achieve thermally comfortable outdoor environments, climate-adaptive design should include trees to maximize shading surfaces, while maintaining grass-covered but tree-free wind corridors to minimize heat storage and preserve ventilation. Therefore, the quantity and spatial arrangement of trees, as well as the extent and positioning of grassed areas, can serve as critical indicators for designing climate-responsive public spaces [64].
Beyond outdoor interventions, the integration of indoor thermal adaptation strategies should also be encouraged, such as optimizing building envelope insulation, improving indoor ventilation and shading coordination, and promoting energy-efficient climatization systems in public buildings and transport vehicles [65]. Together, these cross-seasonal and cross-spatial measures can foster resilient urban environments that protect both physical and emotional well-being throughout varying climate extremes. Moreover, the findings of this study offer important implications for advancing health and education policy planning under intensifying heatwave conditions. By revealing how residents’ emotional and perceptual responses vary under extreme thermal conditions, this research provides a psychological perspective that can complement traditional temperature-based risk assessments. Such spatially explicit evidence can inform data-driven public health strategies, including the strategic allocation of cooling infrastructure, mobile medical resources, and early intervention programs aimed at vulnerable populations such as the elderly, outdoor laborers, and socioeconomically disadvantaged communities. In the educational domain, recognizing how heat exposure shapes emotional and perceptual responses can guide the development of climate-adaptive learning environments and institutional management frameworks, encompassing optimized school calendars, enhanced indoor thermal regulation, and climate literacy initiatives. Embedding these insights into urban governance and policy design can promote a more integrated approach to climate resilience—one that aligns environmental adaptation with public health protection, educational equity, and the broader pursuit of urban well-being.

4.2.2. Real-Time Environmental Assessment and Adaptive Strategies

Under heatwave conditions, the impact of street environments on residents’ sentiments is highly dynamic, and static planning is insufficient to respond to rapid changes in microclimates and pedestrian flows. This study finds that relying solely on averaged indicators risks overlooking localized imbalances caused by heat stress peaks and congestion hotspots, thereby weakening the overall buffering effect. Therefore, establishing real-time evaluation and dynamic regulation mechanisms is essential for enhancing street resilience and sentimental well-being. A monitoring system based on the Internet of Things (IoT) and artificial intelligence (AI) is recommended, integrating microclimate parameters (temperature, humidity, wind speed, and radiation), pedestrian density, and sentimental signals derived from social media or mobile devices into an urban sensing platform [66]. Using fixed and mobile micro-stations, mobile phone signaling, anonymous video counting, and remote sensing data combined with edge computing, minute-level diagnostics and risk warnings can be achieved at the street-segment scale [67]. Furthermore, by integrating SHAP and GeoSHAP model outputs, an “sentimental risk score” can be dynamically updated for minute-level warnings and diversion, hourly evaluations and adjustments, and daily hotspot identification and threshold revision, thereby establishing a multi-scale, spatiotemporal governance system. At the strategic level, machine learning predictions and digital twin models can be employed for feedforward interventions [68]. When road network density or green space functionality approaches critical thresholds, temporary green areas can be activated as substitute buffer zones. Additionally, responsibility checklists and assessment mechanisms should be established at the block level, covering factors such as sensor uptime, threshold accuracy, response timeliness, and the rebound amplitude of the sentiment index. Real-time alerts for the “thermal comfort index” and “congestion risk level” can enhance residents’ risk perception and proactive avoidance capacity, while fostering rapid collaborative responses from communities and businesses. Overall, real-time monitoring and dynamic governance can transform model-based evidence into operational protocols, creating a closed loop of sensing, feedback, and intervention that allows streets to adaptively regulate under extreme heat conditions (Figure 10).

4.2.3. Bottom-Up Street Planning Centered on Residents’ Perceptions

Under heatwave conditions, residents’ immediate sentimental responses are shaped more by direct eye-level experiences than by macro-level average indicators. Therefore, planning should adopt a bottom-up approach that incorporates perceivable spatial cues into the decision-making process. Building on this study’s findings on visual entropy, color complexity, and interface continuity, it is recommended to develop “perception maps” at the street-segment scale. These maps can be constructed using pedestrian-perspective imagery, immersive assessments, and community-based image collection to continuously document shading continuity, ventilation accessibility, signage clarity, and congestion hotspots, which can then guide priorities for micro-scale interventions [69]. At the interface level, street-wall rhythm and color layering should be enhanced, while signage density and façade reflectance should be controlled to maintain path legibility and reduce glare burden [70]. At the management level, curbside parking and loading zones should be optimized to prevent vehicles from encroaching on pedestrian space and exacerbating congestion and a sense of oppression. These measures can transform residents’ eye-level perceptual feedback into actionable renewal checklists, which can be cross-validated with macro indicators such as NDVI, BCR, and RND. In doing so, they establish a “ground-up” fine-grained governance framework that continuously enhances thermal comfort and sentimental resilience of streets during heatwaves.

4.3. Research Contributions

This study integrates multi-source data with interpretable machine learning to systematically reveal the nonlinear mechanisms through which street-level environments are associated with residents’ sentiments during heatwaves, providing new theoretical and practical insights for climate-adaptive urban planning and the enhancement of sentimental resilience.
(1)
The study examines how street environments are linked with residents’ perceptions and sentimental responses under extreme heat, and provides micro-scale analyses of how sentiments correlate with specific landscape elements. The findings demonstrate significant shifts in residents’ perceptions of landscape indicators and visual quality during heatwaves, overcoming the limitations of previous studies that largely focused on macro-level climate effects while neglecting the micro-scale coupling between space and sentiments.
(2)
By adopting a multimodal analytical approach, the study integrates user-generated content, meteorological data, advanced machine learning models (ERNIE, Mask2Former, XGBoost), and geospatial methods to propose a novel quantitative framework for evaluating streetscape perception. By incorporating SHAP and GeoSHAPLEY, the analysis reveals the contributions and interactions of different indicators, as well as nonlinear effects across spatial contexts. Unlike traditional studies relying on surveys or linear models, this framework captures both spatiotemporal heterogeneity and variable interactions, significantly improving the precision and interpretability of research on the coupling between micro-scale urban landscapes and residents’ sentiments.
(3)
The findings provide practical guidance for heat-adaptive street design and sustainable urban governance. By identifying sentimentally vulnerable areas and key landscape elements, the study proposes optimization strategies centered on connectivity, real-time monitoring, and resident perception. These strategies—ranging from enhancing greenery and improving waterfront accessibility to controlling paving intensity and deploying micro-scale interventions—help improve comfort and sentimental experiences during heatwaves. They also offer empirical support for building dynamic regulatory and fine-grained governance systems, and can be extended to monitor the impacts of climate change on mental health, informing sustainable urban transitions and adaptive landscape planning.

4.4. Research Limitations and Further Directions

Using a high-density Chinese city as a case study, this research reveals the coupling mechanisms between streetscapes and residents’ sentiments under heatwave conditions. However, the generalizability of the findings remains constrained by local contexts. Future work should extend localized and comparative studies across cities with different climatic zones, developmental stages, and social structures to test both the universality and context sensitivity of the conclusions. At the data level, random sampling and spatial gaps in UGC may result in incomplete coverage, reducing the comprehensiveness of the findings. Future studies can mitigate this by incorporating multi-source objective observations and longitudinal tracking data. Additionally, the interpretation of the NDVI in urban settings presents certain challenges. Built-up areas with complex surface materials, shading from buildings, and the presence of water bodies can interfere with NDVI readings and reduce the accuracy of vegetation estimates. These factors should be considered when interpreting the results and may be addressed in future work through the use of alternative or complementary indicators that better capture urban greenery under diverse environmental conditions.
In addition, the use of social network data provides a large-scale and dynamic perspective but also limits access to several factors that are typically examined in interview-based studies. These include socioeconomic and health conditions, access to indoor artificial climatization, gender, ethnicity or race, resident versus tourist status, clothing styles, and individual or collective adaptation strategies. Although geotagging ensures location accuracy, there remains a possibility that users may post their sentiments after relocating to more comfortable areas, which could introduce a bias in sentiment data. Future studies should consider integrating these dimensions through surveys, demographic linkages, or participatory sensing approaches to develop a more comprehensive understanding of human–environment interactions during heatwaves.
Due to privacy concerns and platform constraints, this study could not fully capture heterogeneous responses across gender, age, ethnicity, and cultural groups. Moreover, human sentiments are shaped by multisensory and social contexts, creating potential discrepancies between text- and image-based inferences and lived experiences. Although Weibo provides a large dataset, usage heterogeneity and marketing-driven content may introduce structural biases. Another potential limitation lies in the slight temporal mismatch between the street-view imagery and the social media data, which may introduce minor uncertainty in reflecting real-time environmental conditions. Future research could enhance dataset consistency by aligning data collection periods or supplementing with temporally adjusted or multi-seasonal datasets to improve model robustness.
In addition, this study employed binary sentiment classification for comparability with prior research, but this simplification may overlook neutral and composite sentiments. Future research could adopt multi-class or continuous-scale models, integrate multimodal signals such as auditory, olfactory, and behavioral trajectories, and analyze within a multi-scale framework spanning street segments, neighborhoods, and the entire city. Additionally, quasi-experimental street interventions and longitudinal comparisons could further validate the associative robustness of threshold effects and spatial heterogeneity. The temporal information embedded in social media posts also provides opportunities for dynamic analysis. Future studies could examine diurnal variations in emotional responses by comparing sentiment changes between afternoon heat peaks and cooler evening periods to better understand temporal adaptation behaviors. Similarly, applying the same analytical framework to non-heat seasons could reveal how the effects of environmental variables differ under contrasting thermal conditions.
Moreover, it is important to acknowledge the challenges inherent in using landscape aesthetics methods to analyze sentiments during heatwaves. While this study offers valuable insights, distinguishing between the emotional effects of heatwaves, landscape aesthetics, and other factors are complex. Heatwaves may alter how people perceive landscapes, with thermal comfort and aesthetic appreciation interacting dynamically rather than independently. Furthermore, certain features, such as shaded areas, may serve as shelters during heatwaves, even if they are typically perceived as unattractive. These challenges should be recognized in future studies to provide a more comprehensive understanding of the relationship between streetscapes, heatwaves, and emotional well-being. Additionally, many urban areas feature spaces that connect indoor and outdoor environments, such as covered walkways or commercial corridors, which may blur the boundaries between the two settings. This overlap could affect the accuracy of linking emotional responses to outdoor heat exposure. Future research could focus on isolating posts that clearly pertain to outdoor experiences or explore the specific interactions between indoor and outdoor spaces in shaping residents’ emotional responses to heat. Lastly, future research should focus on designing climate shelters and adaptive green infrastructure that mitigate heatwave impacts and enhance emotional well-being, while promoting year-round comfort through climate-responsive strategies that balance shading and ventilation in summer with solar access and wind protection in winter, and extend these principles to indoor climatization and policy planning for greater urban resilience.

5. Conclusions

Taking Shanghai as a case study, this research examined the nonlinear coupling between residents’ sentiments and streetscape environments under heatwave conditions. By integrating Weibo check-in texts, street-view imagery, and remote sensing data with ERNIE 3.0, Mask2Former, XGBoost, and SHAP/GeoSHAPLEY, the study developed a multi-source and interpretable machine learning framework. This framework systematically revealed the spatial patterns of residents’ sentiments during heatwaves and identified their key drivers. The main conclusions are as follows:
(1)
During heatwaves, the average sentiment index was 0.583, with 58% positive and 42% negative texts, indicating an overall positive tendency but pronounced spatial heterogeneity. Moran’s I revealed a strong clustering effect (I = 0.888, p < 0.001). The central city exhibited a patchwork of high and low values, with negative clusters in dense urban cores, while waterfronts and green-rich areas tended to concentrate positive sentiments, underscoring the association of streetscapes against heatwave-induced negative perceptions. These findings highlight the importance of landscape and environmental quality in shaping sentimental responses during extreme heat.
(2)
Global SHAP analysis identified NDVI (0.024), visual entropy (0.022), FAR (0.021), RND (0.020), and AR (0.020) as the most influential factors. Partial dependence results revealed clear threshold effects: NDVI improved sentiment in low-to-medium ranges but showed diminishing returns at higher values; AR became positive at approximately 0.08–0.10; OP values above 0.32 enhanced positive experiences, whereas GR above 0.20 tended to have negative effects due to shading and stuffiness. RND was optimal within medium ranges but negative when excessive; FAR and PD were generally associated with negative sentiments. Both VE and CC followed U-shaped patterns, with moderate complexity in interface information improving sentimental experiences. This suggests that carefully balancing greenness, openness, and built environment features is crucial for enhancing sentimental well-being.
(3)
GeoSHAPLEY analysis revealed pronounced spatial dependence. Waterfront areas (e.g., Chongming, southeastern Pudong, and the banks of the Huangpu and Suzhou Rivers) showed stable positive contributions, indicating the association of continuous water–green resources. In contrast, the urban area displayed negative effects due to high FAR and extensive paved surfaces. Peripheral zones benefited from moderate openness, continuous interfaces, and high-quality greenery, with particularly strong effects in the southwestern corridor. Conversely, excessive LUM, overly dense RND, and hardened surfaces in core areas were closely associated with negative sentiments. These findings suggest that spatial variation in sentimental responses to streetscapes requires tailored urban planning strategies: prioritizing density reduction and surface de-hardening in the urban area, enhancing quality and greenery in waterfront and peripheral areas, and improving positive experiences in urban–rural interfaces through road network and interface optimization.
Overall, this study contributes to a deeper understanding of the complex relationship between urban streetscapes and residents’ sentiments under heatwave conditions. The insights gained provide empirical support for climate-adaptive street design and spatial governance, offering valuable guidance for enhancing the sentimental resilience of urban populations facing extreme heat. The findings also emphasize the importance of considering both environmental features and their spatial context when developing urban policies to mitigate the negative impacts of heatwaves.

Author Contributions

Conceptualization, Z.L.; methodology, Z.L., Y.L. and Y.C.; software, Z.L.; validation, Z.L., Y.L. and Y.C.; formal analysis, Z.L. and Y.L.; investigation, Z.L.; resources, Z.L.; data curation, Z.L., Y.L. and Y.C.; writing—original draft preparation, Z.L.; writing—review and editing, Z.L., Y.L., Y.C. and S.C.; visualization, Z.L.; supervision, Z.L.; project administration, Z.L. and Y.L.; funding acquisition, S.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the General Project of Humanities and Social Sciences Research, Ministry of Education of China (Grant No. 23YJA760016); Fuzhou Philosophy and Social Sciences Planning Project: Experience Design Research on the Blue Maritime Silk Road Cultural Tourism Belt Based on Mindu Culture (Project Number: 2025FZY268); Fujian Provincial Social Science Foundation Project: Research on the Experience Service Design of Marine Cultural Tourism in Fujian Province (Project Number: FJ2023C066).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Acknowledgments

We would like to thank all anonymous reviewers for their constructive comments on the earlier version of the manuscript, which helped improve the quality of the work. We are also grateful to all organizations that shared data.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Klingelhöfer, D.; Braun, M.; Brüggmann, D.; Groneberg, D.A. Heatwaves: Does Global Research Reflect the Growing Threat in the Light of Climate Change? Glob. Health 2023, 19, 56. [Google Scholar] [CrossRef]
  2. Jay, O.; Capon, A.; Berry, P.; Broderick, C.; de Dear, R.; Havenith, G.; Honda, Y.; Kovats, R.S.; Ma, W.; Malik, A.; et al. Reducing the Health Effects of Hot Weather and Heat Extremes: From Personal Cooling Strategies to Green Cities. Lancet 2021, 398, 709–724. [Google Scholar] [CrossRef]
  3. Gasparrini, A.; Guo, Y.; Hashizume, M.; Lavigne, E.; Zanobetti, A.; Schwartz, J.; Tobias, A.; Tong, S.; Rocklöv, J.; Forsberg, B.; et al. Mortality Risk Attributable to High and Low Ambient Temperature: A Multicountry Observational Study. Lancet 2015, 386, 369–375. [Google Scholar] [CrossRef]
  4. Li, Z.; Fan, Y.; Su, H.; Xu, Z.; Ho, H.C.; Zheng, H.; Tao, J.; Zhang, Y.; Hu, K.; Hossain, M.Z.; et al. The 2022 Summer Record-Breaking Heatwave and Health Information-Seeking Behaviours: An Infodemiology Study in Mainland China. BMJ Glob. Health 2023, 8, e013231. [Google Scholar] [CrossRef]
  5. Zhang, D.; Huang, Y.; Zhou, B.; Wang, H.; Sun, B. Who Is the Major Player for 2022 China Extreme Heat Wave? Western Pacific Subtropical High or South Asian High? Weather Clim. Extrem. 2024, 43, 100640. [Google Scholar] [CrossRef]
  6. He, H.; Sun, R. Sentiment Variations Affected by Urban Temperature and Landscape across China. Cities 2024, 149, 104933. [Google Scholar] [CrossRef]
  7. Zhang, T.; Wang, L.; Zhang, Y.; Hu, Y.; Zhang, W. Assessing the Nonlinear Impact of Green Space Exposure on Psychological Stress Perception Using Machine Learning and Street View Images. Front. Public Health 2024, 12, 1402536. [Google Scholar] [CrossRef]
  8. Lachapelle, J.A.; Scott Krayenhoff, E.; Middel, A.; Coseo, P.; Warland, J. Maximizing the Pedestrian Radiative Cooling Benefit per Street Tree. Landsc. Urban Plan. 2023, 230, 104608. [Google Scholar] [CrossRef]
  9. Nik, V.M.; Perera, A.T.D.; Chen, D. Towards Climate Resilient Urban Energy Systems: A Review. Natl. Sci. Rev. 2021, 8, nwaa134. [Google Scholar] [CrossRef] [PubMed]
  10. Wang, J.; Guetta-Jeanrenaud, N.; Palacios, J.; Fan, Y.; Kakkar, D.; Obradovich, N.; Zheng, S. Unequal Impacts of Rising Temperatures on Global Human Sentiment. One Earth 2025, 8, 101422. [Google Scholar] [CrossRef]
  11. Wang, J.; Obradovich, N.; Zheng, S. A 43-Million-Person Investigation into Weather and Expressed Sentiment in a Changing Climate. One Earth 2020, 2, 568–577. [Google Scholar] [CrossRef]
  12. Baylis, P.; Obradovich, N.; Kryvasheyeu, Y.; Chen, H.; Coviello, L.; Moro, E.; Cebrian, M.; Fowler, J.H. Weather Impacts Expressed Sentiment. PLoS ONE 2018, 13, e0195750. [Google Scholar] [CrossRef] [PubMed]
  13. Noelke, C.; McGovern, M.; Corsi, D.J.; Jimenez, M.P.; Stern, A.; Wing, I.S.; Berkman, L. Increasing Ambient Temperature Reduces Emotional Well-Being. Environ. Res. 2016, 151, 124–129. [Google Scholar] [CrossRef]
  14. Chen, H.; Zhao, L.; Dong, W.; Cheng, L.; Cai, W.; Yang, J.; Bao, J.; Liang, X.-Z.; Hajat, S.; Gong, P.; et al. Spatiotemporal Variation of Mortality Burden Attributable to Heatwaves in China, 1979–2020. Sci. Bull. 2022, 67, 1340–1344. [Google Scholar] [CrossRef]
  15. Guo, R.; Guo, F.; Dong, J.; Wang, Z.; Zheng, R.; Zhang, H. Finer-Scale Urban Health Risk Assessment Based on the Interaction Perspective of Thermal Radiation, Human, Activity, and Space. Front. Archit. Res. 2024, 13, 682–697. [Google Scholar] [CrossRef]
  16. Hass, A.L.; Runkle, J.D.; Sugg, M.M. The Driving Influences of Human Perception to Extreme Heat: A Scoping Review. Environ. Res. 2021, 197, 111173. [Google Scholar] [CrossRef]
  17. Zhan, Z.; Jia, L.; Wang, P.; Huang, L. Impact of Building Morphology on Outdoor Thermal Comfort in Summer Afternoons: A Case Study in Nanjing, China. Urban Clim. 2024, 56, 102064. [Google Scholar] [CrossRef]
  18. Rui, J.; Xu, Y.; Cai, C.; Li, X. Leveraging Large Language Models for Tourism Research Based on 5D Framework: A Collaborative Analysis of Tourist Sentiments and Spatial Features. Tour. Manag. 2025, 108, 105115. [Google Scholar] [CrossRef]
  19. Zhu, J.; Wang, S.; Ma, H.; Shan, T.; Xu, D.; Sun, F. Nonlinear Effect of Urban Visual Environment on Residents’ Psychological Perception—An Analysis Based on XGBoost and SHAP Interpretation Model. City Environ. Interact. 2025, 27, 100202. [Google Scholar] [CrossRef]
  20. Reichstein, M.; Camps-Valls, G.; Stevens, B.; Jung, M.; Denzler, J.; Carvalhais, N. Prabhat Deep Learning and Process Understanding for Data-Driven Earth System Science. Nature 2019, 566, 195–204. [Google Scholar] [CrossRef]
  21. Hu, Y.; Dai, Z.; Guldmann, J.-M. Modeling the Impact of 2D/3D Urban Indicators on the Urban Heat Island over Different Seasons: A Boosted Regression Tree Approach. J. Environ. Manag. 2020, 266, 110424. [Google Scholar] [CrossRef]
  22. Hong, T.; Yim, S.H.L.; Heo, Y. Interpreting Complex Relationships between Urban and Meteorological Factors and Street-Level Urban Heat Islands: Application of Random Forest and SHAP Method. Sustain. Cities Soc. 2025, 126, 106353. [Google Scholar] [CrossRef]
  23. Li, Z. Extracting Spatial Effects from Machine Learning Model Using Local Interpretation Method: An Example of SHAP and XGBoost. Comput. Environ. Urban Syst. 2022, 96, 101845. [Google Scholar] [CrossRef]
  24. Jung, J.; Uejio, C.K. Social Media Responses to Heat Waves. Int. J. Biometeorol. 2017, 61, 1247–1260. [Google Scholar] [CrossRef] [PubMed]
  25. Wang, J.; Meng, B.; Pei, T.; Du, Y.; Zhang, J.; Chen, S.; Tian, B.; Zhi, G. Mapping the Exposure and Sensitivity to Heat Wave Events in China’s Megacities. Sci. Total Environ. 2021, 755, 142734. [Google Scholar] [CrossRef] [PubMed]
  26. Zander, K.K.; Rieskamp, J.; Mirbabaie, M.; Alazab, M.; Nguyen, D. Responses to Heat Waves: What Can Twitter Data Tell Us? Nat. Hazards 2023, 116, 3547–3564. [Google Scholar] [CrossRef]
  27. Zhou, W.; Zhou, F.; Zhuang, G. Megacity Pathways in China under the Dual Carbon Goal: The Case of Shanghai. Chin. J. Popul. Resour. Environ. 2024, 22, 241–249. [Google Scholar] [CrossRef]
  28. Zeng, P.; Zong, C.; Duan, Z.; Wei, X. Exploring the Spatial Interplay between Built-up Environments and Surface Urban Heat Island Phenomena in the Main Urban Area of Shanghai. Energy Build. 2023, 301, 113739. [Google Scholar] [CrossRef]
  29. Guo, Y.; Shen, X.; Qin, Y.; Che, S.; Wei, M.; Wang, L. Mitigating and Adapting to Extreme Climate: Developing a Novel Assessment Model for Unexplained Hot-Humid Exposure in Metropolitan Areas. Sustain. Cities Soc. 2025, 127, 106432. [Google Scholar] [CrossRef]
  30. Zhang, J.; Jin, G.; Liu, Y.; Xue, X. Attention and Sentiment of Chinese Public toward Rural Landscape Based on Sina Weibo. Sci. Rep. 2024, 14, 13724. [Google Scholar] [CrossRef]
  31. Rui, J. Exploring the Association between the Settlement Environment and Residents’ Positive Sentiments in Urban Villages and Formal Settlements in Shenzhen. Sustain. Cities Soc. 2023, 98, 104851. [Google Scholar] [CrossRef]
  32. Yi, L.; Hart, J.E.; Roscoe, C.; Mehta, U.V.; Pescador Jimenez, M.; Lin, P.-I.D.; Suel, E.; Hystad, P.; Hankey, S.; Zhang, W.; et al. Greenspace and Depression Incidence in the US-Based Nationwide Nurses’ Health Study II: A Deep Learning Analysis of Street-View Imagery. Environ. Int. 2025, 198, 109429. [Google Scholar] [CrossRef] [PubMed]
  33. Zhang, Y.; Balzter, H.; Li, Y. Influence of Impervious Surface Area and Fractional Vegetation Cover on Seasonal Urban Surface Heating/Cooling Rates. Remote Sens. 2021, 13, 1263. [Google Scholar] [CrossRef]
  34. Zhang, Y.; Wu, T.; Yu, H.; Fu, J.; Xu, J.; Liu, L.; Tang, C.; Li, Z. Green Spaces Exposure and the Risk of Common Psychiatric Disorders: A Meta-Analysis. SSM-Popul. Health 2024, 25, 101630. [Google Scholar] [CrossRef]
  35. Song, J.; Chen, W.; Zhang, J.; Huang, K.; Hou, B.; Prishchepov, A.V. Effects of Building Density on Land Surface Temperature in China: Spatial Patterns and Determinants. Landsc. Urban Plan. 2020, 198, 103794. [Google Scholar] [CrossRef]
  36. Rui, J.; Li, X. Decoding Vibrant Neighborhoods: Disparities between Formal Neighborhoods and Urban Villages in Eye-Level Perceptions and Physical Environment. Sustain. Cities Soc. 2024, 101, 105122. [Google Scholar] [CrossRef]
  37. Chen, Z.; Ye, C.; Yang, H.; Ye, P.; Xie, Y.; Ding, Z. Exploring the Impact of Seasonal Forest Landscapes on Tourist Emotions Using Machine Learning. Ecol. Indic. 2024, 163, 112115. [Google Scholar] [CrossRef]
  38. Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable DETR: Deformable Transformers for End-to-End Object Detection. In Proceedings of the International Conference on Learning Representations 2021, Vienna, Austria, 4 May 2021. [Google Scholar]
  39. Sánchez, I.A.V.; Labib, S.M. Accessing Eye-Level Greenness Visibility from Open-Source Street View Images: A Methodological Development and Implementation in Multi-City and Multi-Country Contexts. Sustain. Cities Soc. 2024, 103, 105262. [Google Scholar] [CrossRef]
  40. Cheng, B.; Misra, I.; Schwing, A.G.; Kirillov, A.; Girdhar, R. Masked-Attention Mask Transformer for Universal Image Segmentation. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; IEEE: Piscataway, NJ, USA; pp. 1280–1289. [Google Scholar]
  41. Sun, Y.; Wang, S.; Feng, S.; Ding, S.; Pang, C.; Shang, J.; Liu, J.; Chen, X.; Zhao, Y.; Lu, Y.; et al. ERNIE 3.0: Large-Scale Knowledge Enhanced Pre-Training for Language Understanding and Generation. arXiv 2021, arXiv:2107.02137. [Google Scholar]
  42. Moran, P.A.P. Notes on Continuous Stochastic Phenomena. Biometrika 1950, 37, 17–23. [Google Scholar] [CrossRef]
  43. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; Association for Computing Machinery: New York, NY, USA, 2016; pp. 785–794. [Google Scholar]
  44. Lundberg, S.M.; Lee, S.-I. A Unified Approach to Interpreting Model Predictions. In Advances in Neural Information Processing Systems, Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; Curran Associates, Inc.: Red Hook, NY, USA, 2017; Volume 30. [Google Scholar]
  45. Li, Z. GeoShapley: A Game Theory Approach to Measuring Spatial Effects in Machine Learning Models. Ann. Am. Assoc. Geogr. 2024, 114, 1365–1385. [Google Scholar] [CrossRef]
  46. Liu, W.; Li, D.; Meng, Y.; Guo, C. The Relationship between Emotional Perception and High-Density Built Environment Based on Social Media Data: Evidence from Spatial Analyses in Wuhan. Land 2024, 13, 294. [Google Scholar] [CrossRef]
  47. Li, X.; Lin, K.; Shu, Y.; Lin, X. Comparison of the Influences of Different Ventilation Corridor Forms on the Thermal Environment in Wuhan City in Summer. Sci. Rep. 2023, 13, 13416. [Google Scholar] [CrossRef] [PubMed]
  48. Asawa, T.; Kugimachi, Y. Characteristics of Cold-Air Release from Air-Conditioned and Open-Entrance Shops to Outside Street Spaces in Summer. In Proceedings of the ASim Conference 2014: 2nd Asia conference of IBPSA-China, Japan, Korea, Nagoya, Japan, 28–29 November 2014. [Google Scholar]
  49. Anand, J.; Sailor, D.J. Role of Pavement Radiative and Thermal Properties in Reducing Excess Heat in Cities. Sol. Energy 2022, 242, 413–423. [Google Scholar] [CrossRef]
  50. Geng, L.; Xue, M.; Li, J.; Ma, J. Historic District Conservation: A Critical Review of Global Trends, Development in the 21st Century, and Challenges Through CiteSpace Analysis. Buildings 2025, 15, 1232. [Google Scholar] [CrossRef]
  51. Khalaji, F.; Zhang, J.; Sharma, A.K. Social and Economic Impacts of Water Sensitive Urban Design: A Review. Water 2025, 17, 16. [Google Scholar] [CrossRef]
  52. Huang, S.; Zhu, J.; Zhai, K.; Wang, Y.; Wei, H.; Xu, Z.; Gu, X. Do Emotional Perceptions of Visible Greeneries Rely on the Largeness of Green Space? A Verification in Nanchang, China. Forests 2022, 13, 1192. [Google Scholar] [CrossRef]
  53. Yin, Y.; Li, S.; Xing, X.; Zhou, X.; Kang, Y.; Hu, Q.; Li, Y. Cooling Benefits of Urban Tree Canopy: A Systematic Review. Sustainability 2024, 16, 4955. [Google Scholar] [CrossRef]
  54. Chen, C.; Wang, J.; Li, D.; Sun, X.; Zhang, J.; Yang, C.; Zhang, B. Unraveling Nonlinear Effects of Environment Features on Green View Index Using Multiple Data Sources and Explainable Machine Learning. Sci. Rep. 2024, 14, 30189. [Google Scholar] [CrossRef]
  55. Shu, B.; Chang, H.-T.; Chen, Y.-X. Influence of the Thermal Environment of Urban Sidewalks under Green Shading from a Human Scale. All Earth 2024, 36, 1–17. [Google Scholar] [CrossRef]
  56. Zhou, Y.; Lu, Y.; Zhou, X.; An, J.; Yan, D. Numerical Study on the Coupling Effect of River Attributes and Riverside Building Forms on the Urban Microclimate: A Case Study in Nanjing, China. Sustain. Cities Soc. 2024, 107, 105459. [Google Scholar] [CrossRef]
  57. Roussel, C.; Böhm, K. Geospatial XAI: A Review. ISPRS Int. J. Geo-Inf. 2023, 12, 355. [Google Scholar] [CrossRef]
  58. Zhu, Y.; Li, Z. ‘Sharing’ as a Critical Framework for Waterfront Heritage Regeneration: A Case Study of Suzhou Creek, Shanghai. Land 2024, 13, 1280. [Google Scholar] [CrossRef]
  59. Ulpiani, G. Water Mist Spray for Outdoor Cooling: A Systematic Review of Technologies, Methods and Impacts. Appl. Energy 2019, 254, 113647. [Google Scholar] [CrossRef]
  60. Regional Office for Europe, World Health Organization. Urban Green Spaces and Health; WHO: Geneva, Switzerland, 2016. [Google Scholar]
  61. Geng, H.; Zhang, Y.; Chi, J.; He, K.; Feng, S.; Wang, B. What Affect the Satisfaction, Preferences, and Visitation of Pocket Parks? Evidence from Shanghai. J. Outdoor Recreat. Tour. 2024, 46, 100764. [Google Scholar] [CrossRef]
  62. Harvey, C.; Aultman-Hall, L.; Hurley, S.E.; Troy, A. Effects of Skeletal Streetscape Design on Perceived Safety. Landsc. Urban Plan. 2015, 142, 18–28. [Google Scholar] [CrossRef]
  63. Chen, L.; Ng, E. Outdoor Thermal Comfort and Outdoor Activities: A Review of Research in the Past Decade. Cities 2012, 29, 118–125. [Google Scholar] [CrossRef]
  64. Zölch, T.; Rahman, M.A.; Pfleiderer, E.; Wagner, G.; Pauleit, S. Designing Public Squares with Green Infrastructure to Optimize Human Thermal Comfort. Build. Environ. 2019, 149, 640–654. [Google Scholar] [CrossRef]
  65. Lenzholzer, S. Research and Design for Thermal Comfort in Dutch Urban Squares. Resour. Conserv. Recycl. 2012, 64, 39–48. [Google Scholar] [CrossRef]
  66. Trigka, M.; Dritsas, E. Edge and Cloud Computing in Smart Cities. Future Internet 2025, 17, 118. [Google Scholar] [CrossRef]
  67. Kousis, I.; Manni, M.; Pisello, A.L. Environmental Mobile Monitoring of Urban Microclimates: A Review. Renew. Sustain. Energy Rev. 2022, 169, 112847. [Google Scholar] [CrossRef]
  68. Pan, X.; Mavrokapnidis, D.; Ly, H.T.; Mohammadi, N.; Taylor, J.E. Assessing and Forecasting Collective Urban Heat Exposure with Smart City Digital Twins. Sci. Rep. 2024, 14, 9653. [Google Scholar] [CrossRef]
  69. Biljecki, F.; Ito, K. Street View Imagery in Urban Analytics and GIS: A Review. Landsc. Urban Plan. 2021, 215, 104217. [Google Scholar] [CrossRef]
  70. Kavee, K.; Flanigan, K.A. Encoding Experience: Quantifying Multisensory Perception of Urban Form through a Systematic Review. Comput. Environ. Urban Syst. 2025, 122, 102349. [Google Scholar] [CrossRef]
Figure 1. Study area.
Figure 1. Study area.
Sustainability 17 10281 g001
Figure 2. Technical route.
Figure 2. Technical route.
Sustainability 17 10281 g002
Figure 3. Statistical and Spatial Distribution of Sentiment Index.
Figure 3. Statistical and Spatial Distribution of Sentiment Index.
Sustainability 17 10281 g003
Figure 4. Spatial Distribution of Landscape Environmental Factors.
Figure 4. Spatial Distribution of Landscape Environmental Factors.
Sustainability 17 10281 g004
Figure 5. SHAP feature importance.
Figure 5. SHAP feature importance.
Sustainability 17 10281 g005
Figure 6. SHAP heatmap and waterfall analysis.
Figure 6. SHAP heatmap and waterfall analysis.
Sustainability 17 10281 g006
Figure 7. SHAP Partial Dependence Plots analysis.
Figure 7. SHAP Partial Dependence Plots analysis.
Sustainability 17 10281 g007
Figure 8. GeoSHAPLEY analysis.
Figure 8. GeoSHAPLEY analysis.
Sustainability 17 10281 g008
Figure 9. Pedestrian System and Green Space Optimization (Rendering Example Reference).
Figure 9. Pedestrian System and Green Space Optimization (Rendering Example Reference).
Sustainability 17 10281 g009
Figure 10. Real-time Monitoring and Adaptive Strategy Framework.
Figure 10. Real-time Monitoring and Adaptive Strategy Framework.
Sustainability 17 10281 g010
Table 1. Semantic segmentation recognition explanation.
Table 1. Semantic segmentation recognition explanation.
Indicator CategoryResearch IndicatorsDefinitions and FormulasQuantification Method
Resident sentimentSentiment indexSentiment score corresponding to microblog postsERNIE 3.0
Landscape PerceptionAquatic rate (AR)The proportion of water bodies in the image
A = P a q u a t i c P t o t a l × 100 %
Mask2Former
Openness (OP)The proportion of sky in the image
O = P s k y P t o t a l × 100 %
where P s k y is the total number of sky-related pixels (e.g., blue or white sky) identified through semantic segmentation in the image, and P t o t a l is the total number of recognized pixels in the image.
Mask2Former
Enclosure (EN)The proportion of architectural enclosure in the image
E = i = 1 2 ( B i + T i + W i + F i ) i = 1 2 ( 1 S P i )
In the formula, B i , T i , W i , and F i respectively indicate the proportions of pixels belonging to buildings, trees, walls, and fences.
Mask2Former
Greenness (GR)The proportion of green plants in the image
G = P g r e e n P t o t a l × 100 %
where P g r e e n refers to the total number of pixels classified as vegetation, including grass, shrubs, and trees, based on semantic segmentation; P t o t a l represents the total pixel count of the recognized image area.
Mask2Former
Paving degree (PD)The proportion of floor covering in the image
P = i = 1 2 ( R i + S i + C i + P i + S L i + C W i + L M i ) i = 1 2 ( 1 S P i )
In the formula, R i , S i , C i , P i , S L i , C W i , and L M i respectively denote the proportions of pixels corresponding to road, sidewalk, curb, parking, service lane, crosswalk, and lane marking, while S P i refers to the proportion of sky pixels.
Mask2Former
NDVIStandardized Difference Vegetation Index/grid areaArcMap 10.8.1
Environmental FactorsFloor area ratio (FAR)The proportion between the cumulative floor area of all structures and the overall grid area
F A R = F A
where F indicates the total gross floor area of all buildings within the spatial unit (km2), and A denotes the total area of the grid (km2).
ArcMap 10.8.1
Building coverage ratio (BCR)The proportion of the total building footprint area to the overall grid area.
B C R = B A
where B represents the total footprint area of all buildings within the unit (km2), and A refers to the total land area of the corresponding spatial unit (km2).
ArcMap 10.8.1
Road network density
(RND)
Total length of roads within the research unitArcMap 10.8.1
Land use mix (LUM)An indicator assessing the spatial and functional integration of different land use types.
L U M = ( P i l o g P i )
where P i represents the proportion of the i-th land use type within the total area of the spatial unit.
ArcMap 10.8.1
Visual QualityVisual Entropy (VE)Entropy value of imagesMatlab R2023b
Color complexity (CC)Color complexity of imageMatlab R2023b
Table 2. Comparison of Model Parameters.
Table 2. Comparison of Model Parameters.
MetricXGBoostCatBoostLightGBM
RMSE0.04340.10620.1361
MAE0.02320.07400.0998
R20.93160.59100.3285
Table 3. Results of Global Moran’s I, Z-score, and p-value.
Table 3. Results of Global Moran’s I, Z-score, and p-value.
Research IndicatorsMoran’s IZ-Scorep-Value
Sentiment index0.888297.166<0.001
LUM0.509170.413<0.001
Visual Entropy0.591197.541<0.001
Color complexity0.578193.485<0.001
RND0.577193.378<0.001
FAR0.651217.694<0.001
BCR0.686229.587<0.001
Paving degree0.578193.378<0.001
Openness0.512171.304<0.001
NDVI0.798267.178<0.001
Greenness0.448150.067<0.001
Enclosure0.553185.153<0.001
Aquatic rate0.341114.012<0.001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lu, Z.; Lu, Y.; Chen, Y.; Chen, S. Effects of Streetscapes on Residents’ Sentiments During Heatwaves in Shanghai: Evidence from Multi-Source Data and Interpretable Machine Learning for Urban Sustainability. Sustainability 2025, 17, 10281. https://doi.org/10.3390/su172210281

AMA Style

Lu Z, Lu Y, Chen Y, Chen S. Effects of Streetscapes on Residents’ Sentiments During Heatwaves in Shanghai: Evidence from Multi-Source Data and Interpretable Machine Learning for Urban Sustainability. Sustainability. 2025; 17(22):10281. https://doi.org/10.3390/su172210281

Chicago/Turabian Style

Lu, Zekun, Yichen Lu, Yaona Chen, and Shunhe Chen. 2025. "Effects of Streetscapes on Residents’ Sentiments During Heatwaves in Shanghai: Evidence from Multi-Source Data and Interpretable Machine Learning for Urban Sustainability" Sustainability 17, no. 22: 10281. https://doi.org/10.3390/su172210281

APA Style

Lu, Z., Lu, Y., Chen, Y., & Chen, S. (2025). Effects of Streetscapes on Residents’ Sentiments During Heatwaves in Shanghai: Evidence from Multi-Source Data and Interpretable Machine Learning for Urban Sustainability. Sustainability, 17(22), 10281. https://doi.org/10.3390/su172210281

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop