Background:
Urban green spaces (UGS) are widely recognized as environmental elements closely associated with emotional health. However, most existing studies rely on static or annual average indicators to examine associations between green spaces and mental health, while paying insufficient attention to seasonal dynamics, multidimensional UGS characteristics (including quantity, quality, and landscape patterns), and nonlinear and spatially heterogeneous associations with negative emotions. Clarifying these seasonally varying associations can provide a more practical basis for urban green space planning.
Methods:
Using geotagged Weibo data from Wuhan in 2022, we identified negative emotional expressions with a fine-tuned BERT model and constructed a population-standardized indicator of negative emotions. Based on remote sensing imagery, street view images, and POI data, we developed a multidimensional evaluation framework of UGS characteristics. To account for the particular social context of 2022, lockdown intensity was incorporated as a control variable in all models. We applied geographically weighted random forest (GWRF) and SHAP-based interpretation to examine seasonal associations between UGS characteristics and negative emotions, focusing on variable importance, nonlinear threshold patterns, and spatial heterogeneity across four seasons.
Results:
After population standardization of the negative emotion indicator and adjustment for lockdown intensity, negative emotions still showed clear seasonal fluctuations and significant spatial clustering. NDVI, green space accessibility, and green space openness were identified as key correlates of negative emotions. Among them, green space accessibility showed association with lower negative emotions in spring than in other seasons. Several major factors exhibited consistent nonlinear turning points across seasons, although the magnitudes and directions of their associations varied seasonally, with more pronounced changes in spring and milder changes in winter. In addition, associations between UGS characteristics and negative emotions displayed substantial spatial heterogeneity, while the broad spatial pattern remained similar across seasons.
Conclusion:
Associations between UGS characteristics and negative emotions are seasonally dynamic rather than constant throughout the year. In particular, spring may represent a priority period during which green space accessibility and usability are more strongly associated with lower negative emotions. These findings highlight the importance of incorporating seasonal dynamics into UGS research and provide evidence for more adaptive, context-sensitive green space planning.
1 IntroductionMental health and emotional well-being have become major public health concerns worldwide and are increasingly recognized as essential components of sustainable urban development. Negative emotions, as an important manifestation of mental health-related states, can affect individuals’ quality of life and are closely linked to broader social and environmental conditions (1, 57). Among various intervention strategies, UGS have received growing attention because of their potential associations with mental health and emotional well-being (2, 3). UGS can influence mental health through both direct and indirect pathways. Firstly, exposure to green spaces offers multiple direct benefits, including alleviating negative emotions, extending the duration of sustained attention, providing restorative experiences, and relieving stress (4–6). Secondly, UGS can also affect mental health through indirect mechanisms, such as facilitating physical activity and promoting social interactions (7, 8).
However, UGS systems encompass diverse types, and their associations with mental health may depend on multiple dimensions, including green space quantity, accessibility, and landscape characteristics, which may operate through different pathways (3, 9). Previous research has predominantly assessed the mental health implications of UGS from an overhead perspective, mainly through quantity-related indicators (10). Such metrics, typically derived from remote sensing data, mainly include the NDVI, green space area, and vegetation coverage (11). However, such indicators focus primarily on the overall coverage of green spaces, and are insufficient in reflecting residents’ actual perception and experience of green spaces. Consequently, they cannot fully explain the variations in individual subjective feelings (56). To overcome these limitations, recent studies have adopted an eye-level perspective to quantify visible greenness from the pedestrian viewpoint. These measures are commonly derived from street view imagery and characterize green visibility from a pedestrian viewpoint; among them, the green view index (GVI) is one of the most widely applied indicators (12, 13). GVI primarily focuses on green space visibility and provides limited systematic assessment of green space quality, such as accessibility and openness. A growing body of evidence suggests that green space quality is a key factor modulating the effects of UGS on mental health. For example, Nguyen et al. (14)‘s systematic review pointed out that green space quality has stable associations with multiple types of health outcomes. Wood et al. (15) found that higher green space quality was associated with better positive mental health, while Lee et al. (16) further demonstrated that green space accessibility could significantly mitigate the occurrence of psychological problems. Therefore, it is necessary to integrate multiple UGS indicators, covering different dimensions from an aerial perspective to eye level, and from quantity to quality. A more detailed and comprehensive evaluation framework for UGS should be constructed to further clarify the relationship between UGS and mental health (17, 18).
Traditionally, mental health has been measured primarily using individual questionnaire surveys, which are often constrained by limited sample sizes and restricted spatiotemporal coverage. In recent years, the widespread application of social media data has provided a novel perspective for investigating the relationship between multidimensional urban green space characteristics and mental health. Compared with traditional questionnaire survey data, social media posts can provide continuous observations of psychological states over broader geographic scales and longer time spans (19). Based on this, existing studies have utilized social media data to conduct various mental health analyses, including assessments of public sentiment (20), perceived tranquility (21), and spatial patterns of well-being across geographic spaces (22–24). These emotions and subjective feelings are widely recognized as important indicators of mental health.
However, most of these studies overlook the temporal dynamics of mental health status, particularly the pronounced seasonal variations (25, 26). Most existing evidence relies on annual averages or long-term consolidated data to analyze the association between UGS and emotional well-being, implicitly assuming that these associations remain stable throughout the year (3). This assumption, however, may oversimplify the complex interplay between environmental conditions and human behaviors. Seasonal shifts influence vegetation phenology, climatic comfort, and residents’ outdoor activity patterns, thereby altering the levels of multidimensional urban green space characteristics and their corresponding emotional effects (26, 27). For instance, in seasons with favorable climates and lush vegetation, residents engage more frequently with green spaces. Conversely, extreme temperatures or inclement weather reduce outdoor activities, thereby diminishing the benefits derived from green space accessibility (28). Therefore, it is necessary to further examine how the associations between emotional well-being and multidimensional UGS characteristics vary across seasons.
In addition to temporal dynamics, the relationship between urban green spaces and mental health may also exhibit nonlinear effects and spatial heterogeneity. Conventional attribution analysis typically relies on linear regression assumptions (29). However, recent studies have shown that the association between UGS and emotional well-being is often nonlinear and spatially heterogeneous (30), likely reflecting differences in urban form, population structure, and environmental context (31). Based on this, machine learning (ML) methods have attracted attention due to their proficiency in handling nonlinearities in large-scale data; yet they are usually implemented as global models with insufficient spatial interpretability (32). To address this limitation, geographically weighted ML techniques have gradually emerged. Among them, geographically weighted random forests (GWRF) construct an independent local random forest regression model at each spatial location and enhance interpretability through feature importance (33). By conducting nonlinear modeling while fully considering spatial heterogeneity, these methods can deepen our understanding of the complex associations within the model and have been applied in fields such as urban planning (34), medicine (33), and transportation analysis (30). This makes GWRF particularly suitable for this study, which aims to examine seasonally varying UGS–emotion associations that may differ across communities in magnitude (35, 36).
Overall, three key gaps remain in the existing studies. First, many studies focus on limited UGS indicators and do not jointly consider quantity, visibility, quality, and landscape-related characteristics. Second, seasonal dynamics are often overlooked, despite the fact that both green space conditions and residents’ emotional experiences may vary substantially across the year. Third, insufficient attention has been paid to the nonlinear and spatially heterogeneous nature of these associations. Addressing these gaps is essential for developing a more comprehensive understanding of how UGS relate to negative emotions.
This study aims to examine the seasonal associations between multidimensional UGS characteristics and negative emotions, and to identify the relative importance of different indicators across seasons. To this end, we leverage social media data to quantify seasonal patterns of negative emotions across different time periods. Additionally, we introduce the GWRF method to reveal the nonlinear relationships and spatial heterogeneity in the associations between UGS indicators and negative emotions across seasons.
2 Study area and data2.1 Study areaWuhan was selected as the study area for this research. Located in central China, it is a major metropolis in the middle reaches of the Yangtze River, with a total jurisdictional area of 8,569.19 km2 and a permanent resident population of approximately 13.81 million. Wuhan has a subtropical monsoon climate, where both climatic conditions and green space landscape characteristics exhibit distinct seasonal variations. Meanwhile, the city contains numerous lakes, including East Lake, and is therefore hailed as the “City of a Hundred Lakes” (37). Its abundant natural resources and pronounced seasonal environmental variation provide a suitable research setting for exploring the relationship between UGS and mental health-related emotional outcomes. Over the past few decades, Wuhan has undergone rapid industrialization and urbanization, with a continuous increase in urban construction intensity. Consequently, optimizing green space allocation and maximizing its health benefits have become an important requirement for improving the level of urban public health (30). Taking Wuhan as a representative case city, this study examines the seasonal associations between multidimensional UGS characteristics and negative emotions, thereby providing a reference for healthy city construction and green space planning. We selected 2022 as the observation period for two reasons. First, it provided a complete annual window for comparing the associations between UGS and negative emotions across four seasons. Second, 2022 represented a late-pandemic context in which daily activities were gradually resuming, while epidemic-control measures still varied across time and space in Wuhan. Such contextual variation could affect residents’ opportunities for outdoor activities and green space use, as well as their negative emotional expressions on social media. To reduce this potential source of confounding, we further constructed a lockdown intensity variable and included it as a control variable in all subsequent analyses (Figure 1).

Location of the study area.
2.2 Influencing factorsThis study explores the associations between multidimensional UGS characteristics and community-level negative emotions from three dimensions: green space quantity, green space quality, and landscape pattern. Based on a systematic review of relevant literature and considerations of data availability, we ultimately selected a set of common influencing factors in mental health research (Table 1).
CategoriesFactorsDescriptionSourceGreen space quantityNDVINormalized difference vegetation index for each unit.RESDC (https://www.resdc.cn/)GVIGreen view index for each unit.Baidu map (https://map.baidu.com/)Green space qualityOutdoor public space accessibilityWalkability index for accessibility from community to outdoor public spaces.Baidu map (https://map.baidu.com/)Green space accessibilityWalkability index from the community to the green space.Baidu map (https://map.baidu.com/)Green space opennessOpenness index of green spaces.Baidu map (https://map.baidu.com/)WalkabilityWalkability index for community streetscapes.Baidu map (https://map.baidu.com/)Landscape patternLargest patch index (LPI)This index measures the proportion of the largest patch in a landscape, indicating the dominance of a single patch within the landscape.FRAGSTATS v.4.2Patch densityDescription of influencing factors.
NDVI characterizes the quantity of greenery in a community, with higher NDVI values often associated with fewer negative emotions (38). GVI reflects the visibility of green spaces from a pedestrian perspective, and abundant visible green spaces contribute to promoting mental health (39). Outdoor public space accessibility and green space accessibility indicate the convenience for residents to walk to outdoor public spaces and green spaces, respectively (40). Green space openness influences the frequency of social participation and interactions, and it is recognized as a key factor in improving mental health (41). Walkability reflects the level of support provided by the street environment for walking, which can improve mental health by facilitating daily physical activity (42).
In terms of landscape patterns, a higher Largest Patch Index (LPI) can provide more stable and continuous restorative spaces, thereby alleviating negative emotions and promoting mental health (17, 43). Conversely, higher Patch Density (PD) and Edge Density (ED) reduce the sense of safety and willingness to use green spaces, which in turn decreases usage frequency, weakens the emotional restorative effect, and is detrimental to mental health (43). The Shannon’s Diversity Index (SHDI) further enhances mental health benefits by increasing the diversity of leisure and social scenarios (44).
Higher residential density is often associated with poorer mental health status (45). The female group is more active on social media, and spatial differences in their distribution may affect the mental health characteristics depicted using social media data (58, 59). Night light index is highly correlated with the level of economic activity, and residents’ mental health is usually closely linked to the level of regional economic development (38).
In addition, because epidemic-control measures in Wuhan still varied across communities and time periods in 2022, lockdown intensity was introduced as an additional control factor. This variable was used to account for the potential influence of mobility restrictions on both residents’ actual opportunities to access green spaces and their negative emotional expressions (16).
3 Methodology3.1 Research frameworkAs illustrated in Figure 2, this study consists of four steps. First, information was extracted from the Weibo dataset based on a fine-tuned BERT model to obtain the spatial distribution of negative emotions. Second, multidimensional UGS indicators and control variables spanning three dimensions were selected for subsequent attribution analysis. Third, the GWRF and SHAP models were introduced to conduct attribution analysis of negative emotions. Finally, the results were interpreted in terms of feature importance, nonlinear effects, and spatial heterogeneity.

Research framework.
3.2 Calculation of negative emotionsAs of September 2021, Sina Weibo had 511 million monthly active users, providing an abundant empirical basis for research on public emotions (10). Similar to Twitter (X), Sina Weibo allows users to voluntarily share location information when posting, thereby enabling geotag-based social perception research (46). Using the Sina Weibo Open Application Programming Interface (API), this study collected Weibo check-in data within the boundary of Wuhan City from January 1 to December 31, 2022. After deduplication processing, a total of 158,108 valid posts were obtained. Each post contains user ID, text content, posting time, posting location, and other relevant information.
To identify negative posts, the pretrained bert-base-chinese model was selected as the basic framework to build a sentiment classifier. Built on the Transformer architecture and trained via unsupervised pretraining, this model provides strong general-purpose representations for Chinese text (47). However, since the original pretrained model is not specifically optimized for sentiment classification tasks, we further fine-tuned it downstream to improve its task adaptability (48).
The fine-tuning process comprised three steps. First, we randomly sampled posts from the check-in dataset and manually labeled them into three classes (positive, neutral, and negative) with 1,000 posts per class. Second, we split the labeled data into training, validation, and test sets based on a 6:2:2 ratio. Third, we fine-tuned model parameters on the training set, selected optimal hyperparameters and model checkpoints using the validation set, and evaluated final performance on the test set. The model performance was assessed using Accuracy, Precision, Recall, and F1-score. The optimal model was then applied to the remaining unlabeled posts to perform sentiment classification. For subsequent analyses, we retained only posts classified as negative and used them to construct a community-level indicator of negative emotional expression. To reduce the potential bias introduced by differences in community population size, the resulting indicator was further standardized by the permanent resident population of each community before empirical modeling.
3.3 Kernel density estimationWeibo check-in posts provide geotagged observations as discrete point records, whereas negative emotions are more appropriately conceptualized as spatially continuous. We therefore apply kernel density estimation (KDE) to transform point observations into a smooth spatial intensity surface. KDE is a nonparametric technique that assigns each observation a kernel-based weight and aggregates these contributions across space, yielding a continuous density field. Areas with higher estimated densities are interpreted as locations where negative emotional expressions are more concentrated. KDE has been widely used in emotion and sentiment research and was used here to characterize the spatial distribution of negative emotional expression (49). The formula is expressed as follows:
In Equation 1, denotes the kernel density estimate at location ; is the number of negative emotion points; represents the bandwidth; is the kernel function; and denotes the distance between location and observation . We implemented KDE in ArcGIS Pro to estimate the spatial intensity surface of negative emotions in Wuhan for the full year. The KDE values were then normalized by the permanent resident population of each community to generate the final negative emotion indicator used in subsequent analyses.
3.4 Calculation of urban green space indicators3.4.1 Green space quantityNDVI was computed from multispectral imagery using surface reflectance in the near-infrared (NIR) and red bands as:
In Equation 2, NDVI ranges from -1 to 1. Negative values typically correspond to clouds, water, or snow, whereas values near zero generally indicate rock or bare soil. Positive values represent green vegetation, and higher NDVI indicates greater vegetation density, implying a higher likelihood that residents are exposed to green spaces (50). We calculated NDVI using GF-2 satellite imagery acquired in 2022.
Street-view images were obtained from the Baidu Maps Street View platform. Sampling points were placed at 100 m intervals along the public road network within the study area, and four images representing different viewing directions were collected at each point. We applied the FCN-8 s semantic segmentation model to classify street-view imagery, identify vegetation elements (eg., trees and grass), and compute GVI as the proportion of vegetation pixels to total pixels in each image (58). Community-level GVI was aggregated in two steps: (1) averaging GVI across the four directional images at each sampling point; and (2) averaging these point-level values across all sampling points within each community to obtain a community-level street-view greenness indicator (56).
3.4.2 Green space qualityUGS quality was operationalized across four dimensions: outdoor public space accessibility, green space accessibility, green space openness, and walkability. For outdoor public space accessibility and green space accessibility, we constructed a 1 km network-based walking catchment centered on each community, reflecting a plausible distance residents are willing to walk in daily life to access nearby resources. Within this catchment, we used Baidu Maps point-of-interest (POI) data with geographic coordinates to quantify outdoor public space accessibility and green space accessibility based on the availability of corresponding destinations within the network-based walking catchment, represented by the number of outdoor public spaces and green spaces, respectively (51).
For UGS openness and walkability, we deployed street-view sampling points along the road network and retrieved multi-directional street-view images at each point. We applied the FCN-8 s semantic segmentation model to identify key scene elements (eg., trees, grass, roads, sidewalks, and buildings). Using a set of manually scored samples, we trained regression models to predict green space openness and walkability for all sampling points. Predicted values were then averaged across viewing directions at each sampling location and subsequently aggregated to the community level by averaging across all sampling points, yielding community-level indicators of green space openness and walkability (10).
3.4.3 Landscape patternFollowing the FRAGSTATS User’s Guide and recent methodological syntheses, we selected four representative landscape metrics: LPI, ED, SHDI, and PD. These metrics were computed in FRAGSTATS 4.2 using land-use raster data.
3.4.4 Attribution analysis3.4.4.1 GWRF modelAs a hybrid method combining geographically weighted modeling and ensemble decision trees, GWRF can simultaneously account for spatial heterogeneity and complex nonlinear relationships between predictors and outcomes (52). Its core idea is as follows: for each sample point at a spatial location , a local random forest submodel is built within its neighborhood, and local calibration is achieved through spatial weights, thereby capturing the differentiated effects of the same factors across locations. The GWRF model is calculated as follows:
In Equation 3, where is the negative emotion of the -th community; denotes the random forest mapping relationship locally calibrated at location and is the residual term. For each observation, the GWRF model builds and runs the corresponding RF submodel within its neighborhood (or kernel function) range; the maximum distance between an observation and the sample points within its neighborhood is defined as the bandwidth. Two types of neighborhoods are commonly used: “adaptive” and “fixed.” The former defines the neighborhood using the ? nearest community points, whereas the latter uses a circular window with the bandwidth as the radius. Considering that community points are unevenly distributed in space and that community-level negative emotions exhibit significant spatial heterogeneity, this study adopts an adaptive neighborhood so that the window size can automatically adjust to local variability, thereby more effectively capturing spatial non-stationarity and improving predictive stability. Compared with conventional RF, GWRF is better suited to this study because it allows the relationships identified by the model to vary across space rather than assuming a single global pattern. Compared with traditional GWR, it is more flexible in capturing nonlinear associations (35, 36).
In addition, we introduced traditional random forest (RF) and geographically weighted regression (GWR) as benchmark models. All models were evaluated using , mean absolute error (MAE), and root mean square error (RMSE). The formulas are as follows:
In Equations 4–6, where is the observed emotion value for the -th community; is the predicted emotion value for the -th community; is the mean observed emotion value; and n is the number of communities.
3.4.4.2 SHAP modelMost ML models are often criticized for their limited interpretability, as their predictive mechanisms are not readily transparent. SHapley Additive exPlanations (SHAP) provides a unified framework for interpreting ML models by computing Shapley values for each factor, which quantify that factor’s marginal contribution to the model prediction. Based on this, we can identify the factors that contribute most to model predictions and distinguish relatively influential variables from those with comparatively smaller contributions. The Shapley value () is defined as:
In Equation 7, denotes the Shapley value for factors , quantifying its contribution (importance) to the model prediction. Let be the set of all factors with ∣N∣ = n. For any subset S ⊆ N∖, denotes the model output when only factors in are included, and denotes the model output after adding factors to .
4 Results4.1 Spatiotemporal distribution patterns of negative emotions4.1.1 Temporal distributionAccording to the meteorological division of seasons, spring covers March–May, summer June–August, autumn September–November, and winter December–February of the following year (53). Figure 3 illustrates the seasonal variations in the population-standardized negative emotion indicator. Specifically, the average negative emotion index was 0.1386 in spring, reached its lowest value of 0.1244 in summer, increased to 0.1436 in autumn, and peaked at 0.1508 in winter, showing an overall trend of first decreasing and then increasing.

Population-standardized negative emotion indicator across four seasons.
4.1.2 Overall spatial distributionFigure 4a illustrates the spatial distribution of community-level negative emotions. Negative emotions exhibit a pronounced core–periphery structure, with areas of higher negative emotions predominantly concentrated in the central region and along the southern periphery. In contrast, most other regions show generally lower levels of negative emotions. To further explore the spatial pattern, we examined the global spatial autocorrelation of community-level negative emotions using the Global Moran’s I. The Moran’s I value for the negative emotion indicator was 0.439 (p < 0.0001), indicating statistically significant positive spatial autocorrelation at the annual scale.

(a) Spatial distribution of negative emotion in the community; (b) Spatial clustering of negative emotion based on the local Moran’s I.
Figure 4b presents the Local Moran’s I (LISA) results for negative emotions. High–high (HH) clusters are primarily concentrated in the central and southern parts of Wuhan, while low–low (LL) clusters are focused in the eastern and western regions. High–low (HL) and low–high (LH) outliers, representing areas with relatively high or low negative emotions, are distributed in the transitional zones between these two types of clusters.
4.1.3 Seasonal spatial distributionFigure 5 illustrates the seasonal differences in the spatial distribution of negative emotions. Overall, the spatial patterns are broadly consistent across seasons, although the extent and intensity of high-value areas vary. High-value clusters of negative emotions are predominantly concentrated in the urban core and southern regions, while the urban periphery is mostly characterized by low values. Nevertheless, the extent and intensity of high-value clustering vary somewhat by season. In spring, negative emotions exhibit significant clustering in the southern and central regions (Figure 5a). In summer, the spatial extent of high-value areas contracts, with negative emotions concentrated mainly in the central region (Figure 5b). In autumn, negative emotions intensify again in the southern region (Figure 5c). In winter, pronounced high-value clustering emerges (Figure 5d). Season-specific spatial autocorrelation analysis further confirmed that positive spatial clustering remained statistically significant in all four seasons, although the magnitude and local clustering extent varied seasonally.

Spatial distribution of negative emotion across four seasons in the community.
4.2 Global results4.2.1 Model comparisonTable 2 summarizes the performance of different models. Across both the full-year and seasonal scenarios, the RF model exhibited relatively low goodness of fit and large prediction errors. The GWR model showed a significant improvement in R2 values after incorporating local spatial regression. Compared with the conventional models, the GWRF model performed superiorly in terms of goodness of fit, achieving higher R2 values as well as lower MAE and RMSE than the other models. When comparing the model fit across the four seasons, GWRF performed relatively better in autumn and winter, but slightly poorer in summer. Overall, the GWRF model consistently outperformed the other models across all seasonal scenarios, demonstrating better robustness and overall performance. These findings suggest that the GWRF model can more effectively explain the association between UGS characteristics and negative emotions.
SeasonsModelsR2MAERMSEAnnual negative emotionRF0.1690.1460.180GWR0.4200.1190.154GWRF0.7460.0710.102Spring negative emotion (Mar–May)RF0.1480.0570.082GWR0.3930.0640.091GWRF0.7490.0390.059Summer negative emotion (June–August)RF0.1510.0670.089GWR0.3510.0610.085GWRF0.7030.0380.058Autumn negative emotion (September–November)
Comments (0)