Sociology
Shifting sentiments: analyzing public reaction to COVID-19 containment policies in Wuhan and Shanghai through Weibo data
Z. Liu, J. Wu, et al.
Discover the intricate relationship between China's COVID-19 containment policies and public sentiment in this compelling study. By analyzing Weibo data, researchers Zhihang Liu, Jinlin Wu, Connor Y. H. Wu, and Xinming Xia uncover how public sentiment shifted from initial support to rising dissatisfaction amid lockdowns in Wuhan and Shanghai. This research sheds light on pandemic fatigue and its socio-economic implications, offering crucial insights for policymakers.
~3 min • Beginner • English
Introduction
The study investigates how public sentiment co-evolved with COVID-19 containment policies in China, comparing Wuhan’s early 2020 lockdown with Shanghai’s 2022 lockdown of similar duration. The research questions include: how sentiment shifted over time with policy stages, why identical policies produced different reactions at different times/places, what topics the public focused on across phases, and how socio-economic and demographic factors moderated spatial sentiment differences. The context is China’s dynamic zero-COVID strategy, initially supported during Wuhan’s outbreak but later facing growing dissatisfaction and pandemic fatigue around Shanghai’s lockdown. Understanding these dynamics is crucial for effective policy design, communication, and compliance during health crises.
Literature Review
Prior work shows containment policies reduced cases and protected health systems, and early Wuhan lockdowns bolstered public support. Social media analyses (often Twitter) track pandemic-related sentiment and topics, informing public health communication. Studies highlight the linkage among public sentiment, specific events, and governmental policies, framed by life cycle and crisis communication theories, and rational choice perspectives emphasizing information needs during crises. Pandemic fatigue research indicates prolonged stringent measures erode perceived control, increase uncertainty, and drive dissatisfaction, sometimes redirected toward political elites and intrusive measures. Gaps remain in tracking the interaction of policy cycles with sentiment over time, explaining heterogeneous outcomes of similar policies across locales and times, and accounting for moderating effects of individual socio-economic and demographic attributes. This study addresses these gaps using geotagged Weibo data, causal inference around policy cutoffs, topic modeling across phases, and spatial modeling with socio-economic covariates.
Methodology
Data: Geolocated Weibo posts were collected for Wuhan (38,231 posts; Dec 2, 2019–May 4, 2020) and Shanghai (62,028 posts; Feb 28, 2022–May 23, 2022) using targeted keywords, timestamps, and locations. Policy indicators (containment, healthcare, economic) were from OxCGRT; epidemiological data from Sina Pandemic Data Platform; socio-economic indicators (e.g., CPI) from the National Bureau of Statistics of China. For spatial modeling, street-level aggregations of sentiment were paired with street-level demographics (population and age distributions), numbers of hospitals and testing sites, grid-level GDP (Chen et al., 2022), and neighborhood housing price and building year derived from tweet locations and city data portals.
Sentiment analysis: Chinese text preprocessing included traditional-to-simplified conversion, word segmentation, stop-word removal, deduplication, and half-width conversion. A lexicon-based method using the Dalian University of Technology Information Retrieval Lab sentiment ontology assigned word scores; the net sentiment per post was computed as sum(positive) − sum(negative). Daily average sentiment was computed for each city over the lockdown period.
Models: (1) Multiple Linear Regression (MLR) modeled daily sentiment as a function of policy intensity (containment, healthcare, economic), socio-economic indicators (e.g., CPI), and pandemic indicators (newly cured, confirmed, deaths). (2) Regression Discontinuity Design (RDD) used time cutoffs at key policy phase changes to estimate local average treatment effects on sentiment in a sharp design, controlling for local trends f(T) and covariates. Wuhan cutoffs included 2020/1/23 (lockdown), 2020/2/16–17 (tightened measures), 2020/3/24 (transport resumption); Shanghai cutoffs included 2022/3/28 (lockdown), 2022/4/22 (aggressive zero-COVID announcement), 2022/5/16 (phased reopening/testing). (3) Topic modeling with LDA identified evolving themes across phases; topic number selection used perplexity. (4) Multiscale Geographically Weighted Regression (MGWR) modeled spatially varying relationships between street-level total sentiment (positive minus negative) and predictors (population, age groups, hospitals, testing sites, GDP, housing price, building age), allowing variable-specific bandwidths to capture multi-scale effects.
Key Findings
Overall sentiment and temporal patterns:
- Wuhan: 64.9% positive vs 35.1% negative posts; sentiment showed positive spikes around Lantern Festival (Feb 8–10, 2020), National Day of Mourning (Apr 4, 2020), and lockdown end (Apr 8, 2020); negative spikes Jan 30–Feb 3, 2020 (Wuhan Red Cross controversy).
- Shanghai: 67.9% positive vs 32.1% negative posts; initial positivity later declined; negative spikes around policy discussions, e.g., university closures (May 20–23, 2022); peak positive Mar 17, 2022; lowest May 7, 2022.
MLR (Wuhan, Table 1):
- Models explain 30–42% of variance (R²=0.303–0.424; n=120 days).
- Increased cured cases positively associated with sentiment (significant in Models 1–5, 8).
- Containment policies (e.g., school closures, stay-at-home, public transport closure) associated with more positive sentiment (significant positive coefficients for several C1–C6 indicators in models 2–6).
- Economic support policies correlated with enhanced positive sentiment (Model 7).
- Healthcare policies (mask mandates H6; protections for older people H8) significantly bolstered positive sentiment (Models 8–9).
MLR (Shanghai, Table 2; n=86 days; R²=0.125–0.192):
- New confirmed cases associated with more negative sentiment (significant negative coefficients across Models 1–4).
- Stay-at-home (C6) negatively affected sentiment (Model 3: β≈−0.254, p<0.05).
- Economic policies showed a negative association with sentiment (interpretation: focus on manufacturing resumption, limited aid to services/finance).
- Mask mandate showed adverse reactions (Model 4 negative; contrasts with Wuhan’s positive response to H6).
RDD discontinuities (Table 3):
- Wuhan: 2020/1/23 +1.406* (SE 0.667); 2020/2/16 +0.582* (0.277); 2020/3/24 −0.437 (0.227). Early stringent controls increased sentiment; easing mobility reduced it.
- Shanghai: 2022/3/28 −0.356** (0.123); 2022/4/22 −0.716* (0.359); 2022/5/16 −0.420** (0.143). Lockdown, aggressive zero-COVID announcement, and phased reopening/testing each decreased sentiment.
Topic modeling (Fig. 5; Table 4):
- Wuhan dominant themes: Stay home with family/hope for recovery (35.7%); lockdown news and case/death counts (25.8%); support for healthcare/frontline workers (18.4%); containment/closure policies (14.5%); living goods (6%). Trends shifted from prevention and family protection to confidence in policies and gratitude to medical staff.
- Shanghai dominant themes: Lockdown News & Mental Health (40.6%); containment/closure policies (39.3%); living goods (14.9%); counts of cases/deaths (5.3%). Post-lockdown, concerns centered on supplies, mental health, school closures, and testing; reduced sensitivity to case/death statistics (perceived lower virulence of Omicron).
Spatial analysis (MGWR):
- Excellent spatial fit (R²=0.979 Wuhan; 0.606 Shanghai). City centers with higher population density exhibited more negative sentiment.
- Medical resources’ influence weaker in Shanghai (coefficients roughly −0.2 to 0.6 for hospitals; −0.04 to 0.02 for testing sites) than in Wuhan (hospitals −1 to 2.5; testing −0.5 to 1.5), suggesting later-stage sentiment driven more by containment burden than medical capacity.
- Economic variables: higher local GDP associated with more negative sentiment (lockdown disrupts tertiary, face-to-face services common in central areas); higher neighborhood housing prices and newer building stock associated with more positive sentiment (greater resilience/resources).
- Age groups: In Shanghai, adolescents (10–19), youths (20–34), and older adults (60+) showed negative impacts on sentiment under closures and isolation; in early-stage Wuhan, age groups (especially 35–59) tended to positively influence sentiment. Patterns reflect the shift from early support to later fatigue-driven dissatisfaction among groups affected by education, careers, and health.
Synthesis: Compared to Wuhan’s early outbreak, Shanghai’s later outbreak (Omicron period) saw stronger negative responses to stringent measures, consistent with pandemic fatigue intensifying over time and with stricter interventions.
Discussion
Findings demonstrate that public sentiment toward COVID-19 policies is phase- and context-dependent. Early in Wuhan, strict measures, rising cures, and credible communications increased confidence and optimism, aligning with crisis communication and rational choice theories that emphasize the role of trusted information and effective control in reducing uncertainty. In contrast, in Shanghai’s later wave, extended restrictions, frequent testing, and evolving strategies (from zero-COVID toward relaxation) coincided with mounting dissatisfaction—consistent with pandemic fatigue research, where prolonged, intrusive measures erode perceived control and support. Topic evolution corroborated these dynamics: Wuhan discourse moved from infection control to hope and gratitude; Shanghai discourse emphasized supply shortages, mental health strain, and policy burdens. Spatial heterogeneity shows that central, service-oriented areas and specific demographic groups bore higher sentiment burdens, while better-resourced neighborhoods fared better. Together, results explain why identical policies yielded divergent reactions across time and place and highlight the need for context-aware, flexible policies and communications that consider socio-economic and demographic moderators.
Conclusion
The study captures the transition in urban residents’ sentiment from initial support to growing dissatisfaction toward containment policies by analyzing geotagged Weibo posts from Wuhan (2020) and Shanghai (2022). Using lexicon-based sentiment scoring, MLR, RDD, LDA, and MGWR, it shows early positive reactions in Wuhan to stringent measures and healthcare actions, versus later negative reactions in Shanghai to lockdowns, masks, and testing—consistent with pandemic fatigue and shifting public priorities. Spatial analyses reveal pronounced heterogeneity tied to population density, medical resources, local economies, neighborhood affluence, building stock, and age structure. Policymakers should leverage real-time social media monitoring for timely policy adjustments, tailor communications to evolving concerns (e.g., necessities, mental health), target support to vulnerable regions and groups, and design flexible, phase-appropriate interventions. Future work should integrate broader data sources and track long-term sentiment and behavioral outcomes to guide resilient responses in future health emergencies.
Limitations
- Social media bias: Weibo users may not represent less active or vulnerable populations (e.g., older adults, people with disabilities), leading to sampling bias and uneven internet penetration effects.
- Measurement limits: Lexicon-based sentiment may miss nuance, sarcasm, and context; topic modeling may simplify complex discourse.
- Observational constraints: Despite RDD and controls, unobserved time-varying confounders near cutoffs may remain; policy and event timing can be endogenous.
- Generalizability: Findings from two Chinese cities and specific periods (Wuhan 2019–2020; Shanghai 2022) may not transfer to other locales or variants.
- Data scope: Limited integration of offline behavioral or mental health measures; future work should add surveys, administrative data, and longitudinal tracking across phases and populations.
Related Publications
Explore these studies to deepen your understanding of the subject.

