Unraveling uneven urbanites’ expressed happiness across Chinese cities using geotagged social media data: Key predictors and future climate–happiness associations

Y Yibiao Li H Hui Zhong Y Yufei Dong L Lei Lu

Abstract

Understanding inter-city disparities in urban expressed happiness (EH) and the key predictors for these differences is critical for advancing socially sustainable urban development. However, the key predictors for EH remain poorly understood, and existing studies have largely overlooked the potential association with future climate change. In this study, we analyzed 5,118,772 geotagged Weibo posts from 50 Chinese cities using SnowNLP for sentiment analysis, machine learning models, and LDA topic modeling to investigate the inter-city differences in EH, its underlying predictors, and the potential association with further climate change. Sentiment analysis revealed pronounced variations in EH across Chinese cities, with more positive emotions observed during weekends and holidays. Incorporating 17 potential predictors, we developed ten machine learning models. A random forest model achieved the best performance, with an R² that exceeded all other models by 1.05%–60.00% and an RMSE that was 7.41%–60.95% lower than the alternatives. SHAP analysis showed that landscape, socioeconomic, environmental, and geographic factors accounted for 24.58%–38.97%, 20.64%–40.12%, 11.96%–29.33%, and 11.47%–23.71% of the total feature importance in the EH prediction models, respectively. Among individual variables, the normalized difference vegetation index (NDVI) exhibited the highest feature importance, accounting for 18.56%–32.16% of the total importance, followed by per capita GDP, PM 2.5 concentration, AQI, and temperature. Scenario-based projections suggest an association between projected climate warming and potential changes in urbanites’ EH. Overall, this study identifies the key predictors associated with urbanites’ EH and highlights the potential association of future climate warming with EH, providing valuable evidence for urban planning and policy interventions.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 21, Issue 7
Published July 16, 2026
Pages e0353996
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (4)

Y

Yibiao Li

H

Hui Zhong

Y

Yufei Dong

L

Lei Lu