# A GIS-Based Hot and Cold Spots Detection Method by Extracting Emotions from Social Streams
## 4 Test and Results  
FESC was tested on a study area given by the 18 municipalities of the northeastern area of the province of Naples (Italy). The study area is a peripheral urban area characterized by the presence of a high population and building density. The phenomenon that has been analyzed concerns the discomfort of citizens caused by heat waves that occurred in the study area in the summer seasons between 2020 and 2022. The choice of this study area is dictated by the fact that it is a densely populated suburban area with recent popular building development, which can aggravate the discomfort of citizens during the presence of heat wave phenomena. The map in Figure 5 shows the study area. To carry out the tests, tweets posted by users residing in the municipalities of the study area were extracted during the summer seasons of the time period analyzed. Each municipality constitutes a subzone, and the time period has been divided into three-time frames corresponding to the years 2020, 2021, and 2022. The posts were extracted by selecting tweets with hashtags and keywords given at least one of the following words: heat, sulfurness, heatwave, warm, scorching heat, and torrid heat. The Python TWitter INTelligence library (TWINT) was used to extract the selected Twitter posts. The FESC framework was implemented on a GIS platform built on the ESRI ArcGIS pro suite. The number of tweets is about 622,100; on average, 2900 monthly tweets for each municipality. The Python Geocoder library was used to match the tweets to the corresponding municipality. The tests were executed using an Intel Core i7 Pentium having a 2.90 GHz clock frequency. The CPU time to execute the FESC algorithm on this dataset and to detect the final hot and cold spots was about 10.5 min. After deleting noisy posts, posts referring to the same municipality and time frame have been merged into one document. To construct the Dictionary of EC words was considered the set of 16 emotional categories, divided into eight pleasant and eight unpleasant, used in [12]; these emotional categories are given by the basic and secondary emotional categories in [PERSON]'s wheel of emotions [39], listed in Table 1.  
By assigning to each emotional category, all the phrases that were semantically related to it but had been reduced to their stemmed form, the dictionary of emotional words was generated in accordance with [12]. Following the Corpus Documents' processing, as outlined in the Term Filtering phase, terms were associated with the dictionary category when they were discovered there. For each document, fuzzified pleasant and unpleasant relevance indices where a document corresponds to a specific province and time frame were calculated. Figure 6 shows the thematic maps of the pleasant (Figure 6a) and unpleasant (Figure 6b) emotion categories' relevance measured in 2020. Figure 5: The study area—the 18 municipalities of the northeastern area of the province of Naples (Italy). The pleasant emotion relevance thematic map shows that in 2020 the municipalities of Brusciano, Castello di Cisterna, and Frattaminore were those in which pleasant emotional feelings prevailed, with the relevance of the pleasant emotion being Medium-high. The unpleasant emotion relevance thematic map highlights that in 2020 the municipalities in which unpleasant emotions prevail are Caivano, Afragola, and Casoria, with High relevance, and Casandrino, Melito di Napoli and Casavatore, with Medium high relevance. Table 2 shows in detail the membership degrees of each municipality to all pleasant emotion relevance fuzzy sets of the ECR fuzzy partition measured in 2020. The last column shows the relevance assigned to each municipality, given by the label of the fuzzy set with the greatest degree of membership. In the municipalities of Brusciano, Castello di Cisterna, and Frattaminore, the pleasant relevance class with the highest membership degree (0.7, 0.7, and 0.5, respectively, highlighted in black) is Medium high.