Temporal and Spatial Evolution and Inﬂuencing Factors of Public Sentiment in Natural Disasters—A Case Study of Typhoon Haiyan

: The public’s attitudes, emotions, and opinions reﬂect the state of society to a certain extent. Understanding the state and trends of public sentiment and effectively guiding the direction of sentiment are essential for maintaining social stability during disasters. Social media data have become the most effective resource for studying public sentiment. The TextBlob tool is used to calculate the sentiment value of tweets, and this research analyzed the public’s sentiment state during Typhoon Haiyan, used the biterm topic model (BTM) to classify topics, explored the changing process of public discussion topics at different stages during the disaster, and analyzed the differences in people’s discussion content under different sentiments. We also analyzed the spatial pattern of sentiment and quantitatively explored the inﬂuencing factors of the sentiment spatial differences. The results showed that the overall public sentiment during Typhoon Haiyan tended to be positive, that compared with positive tweets, negative tweets contained more serious disaster information and more urgent demand information, and that the number of tweets, population, and the proportion of the young and middle-aged populations were the dominant factors in the sentiment spatial differences.


Introduction
When a natural disaster suddenly occurs, panic emotions will quickly spread among the crowd, which will affect not only the stability of society, but also the emergency management of disasters. The public's attitudes, emotions, and opinions reflect the state of society to a certain extent [1,2]. Understanding the state, trend, and abnormal changes in public sentiment will help rescue agencies make corresponding rescue decisions and coordinate disaster emergency management [3].
The widespread use of social media provides a new way to obtain disaster information, and the comments released by affected people become the first-hand information of the disaster [4][5][6][7]. People in the affected areas use social media to keep in touch with the outside world, discuss the disaster, request assistance, and receive notifications from relevant organizations during the disaster [8,9]. Scholars have conducted extensive research on disasters based on social media [10], such as disaster situation awareness and early warnings [11][12][13], disaster loss assessment [14][15][16], and information mining [17][18][19]. Social media information contains public attitudes, emotions, and opinions, which makes it feasible to track public responses [17]. It is a challenge to mine disaster-related information from massive, unstructured social media data. Topic models are widely used in social media information mining. Imran et al. [20] developed an artificial intelligence disaster response platform (AIDR), which combined manual supervision and machine learning, and trained an automatic classifier for nine topics related to disasters. This was successfully tested during the Pakistan earthquake. Purohit et al. [21] convert tweets into semi-structured text, and then use supervised machine learning methods to classify the text, identify relevant texts for disaster relief needs, and match them with demand providers. In supply and demand matching, their method is 72% higher than matching only using text similarity. Wan et al. [22] used latent dirichlet allocation (LDA) and support vector machine (SVM) to classify related Sina Weibo during the "July 21" heavy rain in Beijing, and obtained 6 topics. He identified and located the emergency information in the real-time text stream, and put forward the principles for the distribution of emergency supplies. Zhang et al. [23] used BTM to classify tweets during Typhoon Haiyan, identify demand-related tweets, and analysis the demand of relief supplies, which is conducive to making timely decisions in the event of a disaster. Ligutom et al. [24] used BTM to qualitatively analyze typhoon-related tweets, used open coding especially to evaluate the results, and found differences in the behavior of Filipinos during the typhoon.
Sentiment analysis is used to identify positive and negative opinions, emotions, and evaluations expressed in natural language [25]. It is very important to analyze the sentiment of social media information to understand the views expressed by the public [26]. In recent years, many scholars have used sentiment analysis for disaster research. Neppalli et al. [27] performed a sentiment analysis of tweets posted on Twitter during the disastrous Hurricane Sandy and visualized online users' sentiment on a geographical map to indicate that people's sentiment changes according to the user's location and the distance from the hurricane center. Nagy and Stamberger [28] combined sentiment dictionaries and emojis to perform sentiment detection on tweets during the 2010 natural gas explosion and fire in San Bruno, California. The results show that the accuracy of this method is 27% higher than that of Bayesian network alone. Schulz et al. [29] proposed a fine-grained sentiment analysis method to analyze Hurricane Sandy-related microblogs by dividing people's emotions into the six categories of "anger, disgust, fear, happiness, sadness, and surprise". Most disaster-related sentiment analysis studies are more concerned with the description of sentiment states and lack an exploration of the causes and the influencing factors of sentiment. Our research focuses on four questions as follows.
(1) How do the temporal and spatial patterns of public sentiment evolve after the disaster?
(2) How does the content of the public discussion change at different stages of the disaster?
(3) What are the differences in public discussion topics under different sentiments? (4) What factors influence the spatial differences in public sentiment? To address these four questions, we first use sentiment analysis methods to characterize public sentiment from the perspective of time and space. Second, we explore the topics of public discussion under different sentiments through topic classification. Finally, we use geographic detectors to quantitatively analyze the influencing factors of public sentiment according to spatial differences.

Typhoon Haiyan
This research chose Typhoon Haiyan (or Yolanda locally) as case study. On the one hand, it is the strongest typhoon ever recorded in the northwest Pacific Ocean. At 4:40 a.m. on 8 November 2013, Typhoon Haiyan landed in Samar Province and hit the provinces and cities in the central Philippines. It caused considerable economic losses and casualties and resulted in 6300 deaths, 28,688 injuries, more than 3 million families being affected, and economic losses exceeding 1.9 billion US dollars [30]. On the other hand, The Philippines has one of the largest shares of Twitter users in the world. During Typhoon Haiyan, people published many comments about it on Twitter, providing sufficient data for research. Figure 1 shows the path and the public storm warning signal of Haiyan. ISPRS Int. J. Geo-Inf. 2021, 10, 299 3 of 20 affected, and economic losses exceeding 1.9 billion US dollars [30]. On the other hand, The Philippines has one of the largest shares of Twitter users in the world. During Typhoon Haiyan, people published many comments about it on Twitter, providing sufficient data for research. Figure 1 shows the path and the public storm warning signal of Haiyan.

Method
The research process of the temporal and spatial analysis of public sentiment and its influencing factors is provided in Figure 2. First, we collect tweets related to disasters and preprocess them. Then, we calculate the sentiment value of the tweets and divide the sentiment polarity of the tweets based on the TextbBlob. Finally, a temporal and spatial analysis of public sentiment was conducted. Topic classification is used to explore the evolution of public topics and analyze the reasons for the temporal changes in public sentiment based on the evolution of topics. Moreover, we use a geographic detector to explore the factors that affect the spatial distribution of public sentiment.

Method
The research process of the temporal and spatial analysis of public sentiment and its influencing factors is provided in Figure 2. First, we collect tweets related to disasters and preprocess them. Then, we calculate the sentiment value of the tweets and divide the sentiment polarity of the tweets based on the TextbBlob. Finally, a temporal and spatial analysis of public sentiment was conducted. Topic classification is used to explore the evolution of public topics and analyze the reasons for the temporal changes in public sentiment based on the evolution of topics. Moreover, we use a geographic detector to explore the factors that affect the spatial distribution of public sentiment.

Data Collection and Twitter Data Preprocessing
Historical tweets from October to December 2013 were downloaded from the 1% tweets in the Internet archive database (https://archive.org/, accessed on 20 May 2018). Using the hashtag filtering method proposed by Nikita and Cheng [31], through five layers of filters (time screening, spatial screening, frequency screening, expert screening, and an Support Vector Machines), 21 hashtags related to Typhoon Haiyan were obtained (Table A1). Based on the resultant hashtags, a web crawler program retrieved relevant social media datasets by screening hashtags within the disaster. Finally, 67,355 original tweets (excluding retweets) from 2 November 2013 to 30 November 2013 were obtained.
To clean and normalize the data, the preprocessing steps for the texts include: (1) Remove repeated texts.
(3) Remove nonalphabetic characters, stop words, low-frequency words (which appear only once), high-frequency nonrelated words (which appear more frequently than 1% of the total number of words), and hashtags.
(4) Remove low-quality texts (texts with only 0 or 1 word left after step 3). In addition to the Twitter data, the socio-economic data of the Philippines and the disaster data of Typhoon Haiyan were also collected to analyze the factors that affect public sentiment during disasters. The detailed data and sources are shown in Table 1.

Data Collection and Twitter Data Preprocessing
Historical tweets from October to December 2013 were downloaded from the 1% tweets in the Internet archive database (https://archive.org/, accessed on 20 May 2018). Using the hashtag filtering method proposed by Nikita and Cheng [31], through five layers of filters (time screening, spatial screening, frequency screening, expert screening, and an Support Vector Machines), 21 hashtags related to Typhoon Haiyan were obtained (Table A1). Based on the resultant hashtags, a web crawler program retrieved relevant social media datasets by screening hashtags within the disaster. Finally, 67,355 original tweets (excluding retweets) from 2 November 2013 to 30 November 2013 were obtained.
To clean and normalize the data, the preprocessing steps for the texts include: (1) Remove repeated texts.
(3) Remove nonalphabetic characters, stop words, low-frequency words (which appear only once), high-frequency nonrelated words (which appear more frequently than 1% of the total number of words), and hashtags.
(4) Remove low-quality texts (texts with only 0 or 1 word left after step 3).
In addition to the Twitter data, the socio-economic data of the Philippines and the disaster data of Typhoon Haiyan were also collected to analyze the factors that affect public sentiment during disasters. The detailed data and sources are shown in Table 1.

Tweet Sentiment Analysis
Sentiment analysis is the process of identifying the user's subjective emotions, opinions and attitudes from the text [32]. The most important tasks of sentiment analysis are sentiment extraction, sentiment classification, sentiment retrieval, and reporting to decision makers. Sentiment analysis includes calculating the sentiment value of the tweets and the polarity division. Currently, many methods [33][34][35][36][37] can perform sentiment analysis. We use TextBlob [38] to calculate the sentiment value of a tweet. TextBlob is used in many sentiment analysis studies [39][40][41]. It is a Python library for processing textual data and provides an API for performing common natural language processing tasks such as part-of-speech tagging, sentiment analysis, classification, and more.
The sentiment value calculation of TextBlob is actually a dictionary-based sentiment analysis. Part of speech, negative words, adverbs of degree, punctuation marks and emoticons are comprehensively considered when calculating the sentiment value. For each tweet, the 'sentiment' property returns a named tuple of the form 'Sentiment (polarity, subjectivity)'. The polarity score represents the sentiment value of the tweet, reflecting the positive or negative degree of the tweet.
where K represents the number of sentiment words in a tweet, S i represents the sentiment value of current sentiment word, S i_ad represents the sentiment value of sentiment word with adverbs of degree, n is the number of negative words related to the sentiment word, S punc is the sentiment value of punctuation mark, and em is the sentiment value of emoticons. MAX means to keep the maximum value, MI N means to keep the minimum value It varies within the range [-1.0, 1.0], where −1.0 is very negative, and 1.0 is very positive. The subjectivity varies within the range [0.0, 1.0], where 0.0 is very objective, and 1.0 is very subjective. Sentiment analysis is a type of subjectivity analysis [42]. Therefore, in our research, we only analyzed the tweets with a subjectivity not equal to 0.

Tweet Topic Classification
The biterm topic model (BTM) is used to extract the topic of the tweet. It was proposed by Yan et al. [43] to overcome the shortcomings caused by short texts. The BTM directly models the word co-occurrence patterns from an unordered word-pair co-occurrence in a short context. The BTM solves document sparseness by learning topics from the aggregate pattern of the entire corpus.
Since the BTM is an unsupervised method, the number of topics is determined by the perplexity curve before modeling. We use the perplexity curve to infer the number of topics. When the perplexity is smaller, the model is better. A previous study [44] introduced the process of BTM model construction and the calculation of perplexity in detail.
Since there are tweets in different languages, language inconsistency will increase the difficulty of classification and understanding. Therefore, the non-English texts were translated into English text before classification. After running the BTM, the topic-word probability distribution matrix is obtained. This matrix represents the probability of different words in a topic. In each topic, select the top 20 most frequent words, and then describe the specific meanings of each topic. Some topics may have similar meanings, so they can be manually grouped together.

Geographical Detector
The geographical detector, i.e., geodetector, is a spatial analysis model that detects the spatial differentiation of a phenomenon and its driving mechanism [45]. In disasters, the overall sentiment of a region is affected by many factors. We explored the driving factors of sentiment differences in different regions from the four aspects of society, economy, culture and current disaster situations, and selected 7 specific indicators (which are shown in Table 2) to represent these four aspects. The indicators in each factor are independent of each other and are representative. The factor detector and interactive detector in Geodetector are used for analysis.

Factor Detector
Geodetector is a statistical tool to measure Stratified Heterogeneity (SH) and to explore the determinants of SH. The factor detector is used to measure and find SH among sentiment data, and to test the coupling between two variables Y and X, according to their SHs. Here, the q-statistic measures the degree of SH of a variable Y, and the determinant power of an explanatory variable X of Y, and is calculated as follows: where h = 1, . . . , L is the strata of attribute Y, N h and N are the number of units in layer h and the entire area, respectively, and σ 2 h and σ 2 are the variance of Y for layer h and the entire area, respectively. The range of q is [0, 1], and when the value of q is larger, the ability of X to explain Y is stronger.

Interactive Detector
The interaction detector reveals whether the risk factors X 1 and X 2 have an interactive influence on a response variable Y, that is, to evaluate whether factors X 1 and X 2 will increase or decrease the determinant power on Y when acting together or whether these factors are independent. Specific methods are as follows: (1) Calculate the q values of two factors X 1 and X 2 to obtain q(X 1 ) and q(X 2 ).
(2) Superimpose the two layers X 1 and X 2 to get a new layer X 1 ∩ X 2 .

Results
Calculate the sentiment value of tweets in the Philippines during Typhoon Haiyan, and conduct a temporal and spatial analysis of public sentiment, which can be used to reflect the trend of sentiment changes and the spatial distribution of sentiment among the Filipino public. For the trend of public sentiment changes, BTM is used to classify tweets to analyze the reasons for sentiment changes, and to analyze the topic differences between positive and negative tweets. For the difference in the distribution of public sentiment, the geographic detector is used to measure its influence factors.

The Temporal Evolution of Public Sentiment
We use TextBlob to calculate the sentiment value of each tweet from 7 November 2013 to 15 November 2013 and draw a time series graph, as shown in Figure 3. During Typhoon Haiyan, people's daily average value of sentiment on Twitter is greater than 0, that is, it is positive. November 7 is the highest point of sentiment (0.30). Before November 7 is the pre-disaster preparation stage. Various regions in the Philippines issued typhoon warning signals, and people had extensive discussions on Twitter regarding the defense and preparations for Typhoon Haiyan. On November 8, Typhoon Haiyan made landfall. After that, people were affected by Typhoon Haiyan, and their sentiment values began to decline until they reached their lowest point (0.11) on November 10. At 10:00 a.m. on this day, the National Development and Reform Commission held a technical management team meeting and a press conference. Disaster relief was in full swing and people's sentiments began to elevate. positive and negative tweets. For the difference in the distribution of public sentiment, the geographic detector is used to measure its influence factors.

The Temporal Evolution of Public Sentiment
We use TextBlob to calculate the sentiment value of each tweet from 7 November 2013 to 15 November 2013 and draw a time series graph, as shown in Figure 3. During Typhoon Haiyan, people's daily average value of sentiment on Twitter is greater than 0, that is, it is positive. November 7 is the highest point of sentiment (0.30). Before November 7 is the pre-disaster preparation stage. Various regions in the Philippines issued typhoon warning signals, and people had extensive discussions on Twitter regarding the defense and preparations for Typhoon Haiyan. On November 8, Typhoon Haiyan made landfall. After that, people were affected by Typhoon Haiyan, and their sentiment values began to decline until they reached their lowest point (0.11) on November 10. At 10:00 a.m. on this day, the National Development and Reform Commission held a technical management team meeting and a press conference. Disaster relief was in full swing and people's sentiments began to elevate.

The Spatial Distribution of Public Sentiment
Tweets have the user's latitude and longitude information. According to the user's location information, the sentiment value is located to count the average value of the sentiment of each province, and the spatial visualization is performed, as shown in Figure  4. During Typhoon Haiyan, the overall public sentiment in the Philippines was low in the south, high in the north, low in the east, and high in the west. Typhoon Haiyan made landfall on Leyte, a coastal island in the central part of the Philippines. The maximum wind force was 75 m/s when it landed, and it then moved northwest while the wind gradually weakened. The sentiment was low near the typhoon landing point Leyte, which is 0.102. Similarly, the public sentiment in areas close to the typhoon path was relatively low.

The Evolution of Public Topics
Through BTM, we obtained 12 topics and the top 20 words with the highest probability of occurrence in each topic. These words can describe the general content of this topic. Since some themes describe similar content, we manually merge these themes and finally obtain the five categories of disaster situation, reconstruction, praying, demand and other, as shown in Table A2. timent of each province, and the spatial visualization is performed, as shown in Figure 4. During Typhoon Haiyan, the overall public sentiment in the Philippines was low in the south, high in the north, low in the east, and high in the west. Typhoon Haiyan made landfall on Leyte, a coastal island in the central part of the Philippines. The maximum wind force was 75 m/s when it landed, and it then moved northwest while the wind gradually weakened. The sentiment was low near the typhoon landing point Leyte, which is 0.102. Similarly, the public sentiment in areas close to the typhoon path was relatively low.  By counting the number of tweets on different topics in the units of days, the daily changes in public topics from November 5 to November 15 are obtained, as shown in Figure 5. According to Figure 5, the impact of Typhoon Haiyan can be roughly divided into four stages. November 5 to November 7 is the "early warning stage", where typhoon warning signals were issued in various regions, and information about the disaster was disseminated. At the same time, people began to pray for safety and prepare corresponding disaster response measures. In Figure 3, public sentiment gradually rose at this stage. The typhoon landed on November 8, and the number of tweets reached its peak. Afterwards, the typhoon began to affect the Philippines, which represents the "impact stage." At this stage, the number of tweets for "Disaster situation" and "Praying" declined but still accounted for the largest proportion, and information about "Rescue" gradually increased. Similarly, at this stage, people were affected by the typhoon, and public sentiment dropped significantly. November 11 to November 13 is the "emergency stage", where disaster relief was in full swing, and the "Rescue" tweets rose rapidly and remained at a high level.
Public sentiment also began to increase. After November 13, that is, approximately a week after the disaster, the number of tweets related to "Reconstruction" remained at a certain number, the "disaster recovery stage" started, tweets on other topics gradually declined, and attention decreased.
The typhoon landed on November 8, and the number of tweets reached its peak. Afterwards, the typhoon began to affect the Philippines, which represents the "impact stage." At this stage, the number of tweets for "Disaster situation" and "Praying" declined but still accounted for the largest proportion, and information about "Rescue" gradually increased. Similarly, at this stage, people were affected by the typhoon, and public sentiment dropped significantly. November 11 to November 13 is the "emergency stage", where disaster relief was in full swing, and the "Rescue" tweets rose rapidly and remained at a high level. Public sentiment also began to increase. After November 13, that is, approximately a week after the disaster, the number of tweets related to "Reconstruction" remained at a certain number, the "disaster recovery stage" started, tweets on other topics gradually declined, and attention decreased.

Public Topics under Different Sentiments
With sentiment value = 0 as the boundary, tweets are divided into two categories: positive and negative. We separately classify positive tweets and negative tweets to observe the differences in the public discussion content under different sentiments.
Use BTM to classify positive sentiment tweets and negative sentiment tweets separately. The topics of positive tweets are divided into 5 categories, specifically, "Infor-

Public Topics under Different Sentiments
With sentiment value = 0 as the boundary, tweets are divided into two categories: positive and negative. We separately classify positive tweets and negative tweets to observe the differences in the public discussion content under different sentiments.
Among the positive tweets, the sentiment value of Supplies Preparation is the highest (0.42), which indicates that people were actively responding to disasters and preparing materials; the second highest sentiment value was Praying (0.38), where people prayed for the safety of themselves or others. The sentiment value of Information Interaction is 0.35. Before and during Typhoon Haiyan, the government, institutions, and the public used Twitter to exchange information and release news such as rescue hotlines, fundraising websites, and rescue addresses, which were very active. Among the negative tweets, the lowest sentiment value is Praying (-0.37), followed by Disaster Situation (-0.24), which shows that people were very worried about the damage caused by Typhoon Haiyan. materials; the second highest sentiment value was Praying (0.38), where people prayed for the safety of themselves or others. The sentiment value of Information Interaction is 0.35. Before and during Typhoon Haiyan, the government, institutions, and the public used Twitter to exchange information and release news such as rescue hotlines, fundraising websites, and rescue addresses, which were very active. Among the negative tweets, the lowest sentiment value is Praying (-0.37), followed by Disaster Situation (-0.24), which shows that people were very worried about the damage caused by Typhoon Haiyan.

The influencing Factors of Sentiment Value
During a disaster, there are various factors that affect public emotions. We discuss the influencing factors from the four aspects of disaster, economy, society and culture. As shown in Table 3, we selected seven specific indicators to represent these four aspects. The spatial pattern of these indicators is shown in Figure 7.

The influencing Factors of Sentiment Value
During a disaster, there are various factors that affect public emotions. We discuss the influencing factors from the four aspects of disaster, economy, society and culture. As shown in Table 3, we selected seven specific indicators to represent these four aspects. The spatial pattern of these indicators is shown in Figure 7.

Results of Factor Detection
The factor detection results show the interpretive ability of the candidate factors for the overall sentiment value. As show in Figure 8, TN (Number of tweets, q = 0.32) has the highest q value and the strongest determinant power, which indicates that TN is the dominant factor. The number of tweets represents people's desire to express. When there are more tweets, the desire to express is stronger, and the emotions are richer. POP (Population, q = 0.18) and YMR (Young and middle-aged population ratio, q = 0.17) follow TN. The demographic structure of society has two influences on sentiment. First, the young and middle-aged population is the main user of social media, and most of the tweets on Twitter are posted by them. Second, the young and middle-aged population are the backbone of disaster emergency management, and they are the most active in responding to government calls and responding to disasters. AF (Number of people affected, q = 0.16)

Results of Factor Detection
The factor detection results show the interpretive ability of the candidate factors for the overall sentiment value. As show in Figure 8, TN (Number of tweets, q = 0.32) has the highest q value and the strongest determinant power, which indicates that TN is the dominant factor. The number of tweets represents people's desire to express. When there are more tweets, the desire to express is stronger, and the emotions are richer. POP (Population, q = 0.18) and YMR (Young and middle-aged population ratio, q = 0.17) follow TN. The demographic structure of society has two influences on sentiment. First, the young and middle-aged population is the main user of social media, and most of the tweets on Twitter are posted by them. Second, the young and middle-aged population are the backbone of disaster emergency management, and they are the most active in responding to government calls and responding to disasters. AF (Number of people affected, q = 0.16) reflects the impact of disasters. The disaster situation of the population affects peoples emotions. In addition, GDP (Gross domestic product, q = 0.08), DIS (Distance to typhoon center, q = 0.07), and LR (Literacy rate, q = 0.07) also affect public sentiment, but the impact is relatively small. reflects the impact of disasters. The disaster situation of the population affects peoples emotions. In addition, GDP (Gross domestic product, q = 0.08), DIS (Distance to typhoon center, q = 0.07), and LR (Literacy rate, q = 0.07) also affect public sentiment, but the impact is relatively small.

Results of Interactive Detection
Interaction detection evaluates whether the combined effect of two factors affects the interpretation of overall sentiment. Figure 9 shows the results of the interaction detection. The results show that, except for the interactions among DIS-LR, GDP-YMR, GDP-AF, YMR-AF, and LR-AF, which are independent, the interactions among the other factors increase the determinant power on sentiment. The interaction of TN-POP has the strongest ability to explain sentiment, followed by TN-YMR, which are 0.51 and 0.47, respectively. Under the joint action of disaster factors and social factors, the spatial difference in sentiment will be more obvious. TN-AF, TN-GDP, TN-LR, AF-POP, and DIS-TN also have relatively high interpretive capabilities for sentiment. This shows that disaster factors significantly enhance their interpretive capabilities when interacting with other factors, while the interaction among society, economy, and culture is not as obvious.

Results of Interactive Detection
Interaction detection evaluates whether the combined effect of two factors affects the interpretation of overall sentiment. Figure 9 shows the results of the interaction detection. The results show that, except for the interactions among DIS-LR, GDP-YMR, GDP-AF, YMR-AF, and LR-AF, which are independent, the interactions among the other factors increase the determinant power on sentiment. The interaction of TN-POP has the strongest ability to explain sentiment, followed by TN-YMR, which are 0.51 and 0.47, respectively. Under the joint action of disaster factors and social factors, the spatial difference in sentiment will be more obvious. TN-AF, TN-GDP, TN-LR, AF-POP, and DIS-TN also have relatively high interpretive capabilities for sentiment. This shows that disaster factors significantly enhance their interpretive capabilities when interacting with other factors, while the interaction among society, economy, and culture is not as obvious.

Discussion
In this study, we analyzed the temporal and spatial patterns of public sentiment during Typhoon Haiyan and explored the differences in content under different sentiments Figure 9. Results of interactive detection. Blue represents the q value of a single factor, and red represents the q value of the interaction of two factors.

Discussion
In this study, we analyzed the temporal and spatial patterns of public sentiment during Typhoon Haiyan and explored the differences in content under different sentiments and sentiment driving factors.
As stated by Anwar Hridoy et al. [46], social media data are one of the most effective and accurate indicators for studying public sentiment. After the disaster, Twitter was full of people's opinions and comments, and we analyzed public sentiment based on these data.
TextBlob is used to calculate specific sentiment values, and the quantified data can better reflect the trend of sentiment changes. Through topic classification and drawing the daily variation curve, we found that the topics discussed by the public after the disaster are mainly divided into the four categories of "demand", "disaster situation", "praying", and "reconstruction". The changing characteristics of these topics reflect the different stages of the disaster, which is basically in line with the five main stages of the disaster cycle as defined by Debarati and Michel [47], namely the early warning stage, impact stage, emergency stage, recovery stage, and reconstruction stage. The evolution of public topics corresponds to changes in sentiment and can be explained by one another.
Similarly, we classified the positive and negative tweets separately to explore the differences in the content that people pay attention to in different sentiment states. Among the positive and negative emotions, people are most concerned about the "disaster situation". After a disaster occurs, people have a wide range of discussions about the disaster situation. These discussions can be used for disaster monitoring and disaster assessment [19,39].
Many scholars use Twitter to study Typhoon Haiyan. Takahashi et al. [48] obtained Twitter information through three hashtags, analyzed the topics of tweets before, during and after Typhoon Haiyan, and found that reporting second-hand information, commemorating and coordinating disaster relief work were the main topics. David et al. [49] revealed the time evolution of the discussion about Typhoon Haiyan on Twitter, and found that tweets about typhoon and disaster relief were dominant. However, these two studies use manual coding to identify the subject of tweets, which is not efficient. Our research uses BTM and TextBlob to mine topics and sentiment. After manual inspection (Tables A3 and A4), it proves that BTM can effectively identify the topic of tweets, and Textblob can quickly identify the sentiment of tweets.
Unexpectedly, under positive and negative sentiments, some topics of the tweets are similar, including "disaster situation", "praying" and "rescue". Table 3 lists the positive and negative tweets of these three types of topics.
(1) Disaster situation: In negative tweets, people describe the information and impact of Typhoon Haiyan, usually with negative emotions. In positive tweets, people usually use non-emotional sentences to state the disaster situation and describe their current situation as optimistic, for example, "As of 8 am, rainfall moderate but the winds are pretty fierce We still have electricity Hope every 1 Else is safe". This type of tweet usually has a positive sentiment.
(2) Praying: In positive tweets, people mostly express blessings directly, for example, "Hope we'll be all safe" and "I believe that our house is strong". In negative tweets, people first describe the disaster as bad and terrible and then express blessings, such as "Here comes the devastating Typhoon Pray for the Visayas", "The things that are happening in the Philippines is just so devastating Hold on & let's keep on praying". This type of tweet not only is related to praying but also contains disaster information, which leads to negative emotions in the tweet.
(3) Rescue: In positive tweets, most of the rescue is the distribution of relief supplies, evacuation, etc., while in negative tweets, people describe the disaster and the current situation and then request rescue, such as "Alert MACUPA LEYTE, is in URGENT NEED of food and water No rescue & people are getting sick Need response ASAP".
In disaster emergency management, understanding the topics that people are concerned about, guiding negative topics, solving related problems, and understanding peoples sentiment states and trends are very important for maintaining social order in disasters.
After further analysis of the content of the tweets, we found that compared to positive tweets, tweets with negative emotions can better reflect people's situation and should be given more attention in disaster emergency management. For example, in negative tweets, the demand for relief supplies mentioned by people is usually unresolved and urgent, and the disaster impacts described by people are often more severe than those in positive tweets. Therefore, in disaster rescue, relief supplies distribution, and post-disaster recovery, it is necessary to pay more attention to negative tweets, to dig out the relevant information in the tweets, and to pay more attention to the areas where negative tweets are concentrated. Bai and Yu [3] developed a framework based on crowd negative emotions prediction, which can discover incident events in a post-disaster situation.
Previous studies have shown that the spatial characteristics of public emotions are correlated with factors such as geographic location and disaster intensity, and there is an aggregation pattern of positive and negative emotions [27,50,51]. Wang and Taylor [52] conducted a linear regression analysis on sentiment and earthquake intensity and revealed a negative correlation between the collective emotional level and earthquake intensity, but they did not explore the relationship between the sentiment level and other factors. Lin [53] identified communities with relatively stable sentiment characteristics and analyzed the correlation between their sentiment and community demographic characteristics. Different from previous studies, the use of Geodetecor to analyse the sentiment has three advantages: (1) Our research uses the four aspects of society, economy, culture, and disasters and seven specific indicators to explore the influencing factors of sentiment. (2) Geodetecor can detect both numerical data and qualitative data, which helps us take social data into account.
(3) The public's sentiment is usually the result of a variety of factors. Therefore, using Geodetector can help us analyze the interaction between two factors.
The results of the sentiment analysis were related to the Twitter data. Although the Twitter API does not obtain all the Twitter data, the Twitter API is indeed suitable for research [54]. Twitter allows users to quickly share information and interact with other users using specific hashtags. These hashtags can be used to search for specific topics. Keyword-based acquisition of data is not entirely appropriate because it does not assess the relevance of the content of the tweet to a specific situation [55]. Whether keywords can represent events, whether they are specific, and comprehensive will directly affect the effectiveness of data acquisition. Generally, researchers choose keywords based on experience or expert opinions, and manual keyword selection is the main cause of content bias [56]. In this study, hashtags related to Typhoon Haiyan were selected based on the hashtag screening method. On the one hand, tweets can be obtained as comprehensively as possible, reducing content deviation caused by manual selection. On the other hand, during disasters, social media is not all about disasters. Through hashtag screening, only data related to target cases can be obtained. The analysis of such tweets can more truly reflect people's sentiment about disasters.
This study has certain limitations in sentiment analysis and influencing factor detection. At present, we only divide the polarity of tweets, without a fine-grained division of sentiments, which may result in insufficient sentiment description. In the selection of influencing factors, seven specific factors were selected to represent the four aspects of society, economy, culture, and disasters. In future research, more factors can be considered. In addition, since the official languages of the Philippines are Filipino and English, there are multiple languages in tweets. To facilitate processing and understanding, Filipino tweets are first translated into English during data preprocessing. However, perhaps due to writing errors or some unique usages, the meaning of some tweets (1.4% of the total tweets) cannot be accurately understood, so they have not been translated, which may affect the effects of sentiment analysis and topic classification. In future research, the analysis of different kinds of languages can be considered.

Conclusions
This study analyzes the sentiment state of the public during Typhoon Haiyan, explores the changing process of public discussion topics at different stages after the disaster, and analyzes the differences in people's discussion content under different sentiments. During Typhoon Haiyan, the public's overall sentiment was positive, and the evolution of sentiments and topics reflected the different stages of the disaster. Compared with positive tweets, negative tweets contain more serious disaster information and more urgent demand information and are more worthy of attention in disaster emergency management. In addition, we visualized public sentiment in space, analyzed its spatial pattern, explored the influencing factors of the spatial differences, and quantitatively described the explanatory ability of these factors. The results show that the number of tweets, population, and the proportion of the young and middle-aged population are the dominant factors in the sentiment spatial differences. At the same time, the interaction between disaster factors and society, economy, and culture is the most obvious, and the ability to explain sentiment during the interaction is significantly increased.
Our research provides quantifiable sentiment data that will help to better evaluate the public's sentiment state. The analysis of topics can quickly explain the public content and development status, which will help the government to effectively respond to public sentiment, guide topics, and control the spread of negative emotions. The analysis of influencing factors can be used to reveal the driving mechanism of sentiment differences. In the future, we hope to analyze more cases in disasters, public safety, and epidemics, and to consider more influencing factors to achieve more general conclusions.