# Investigating the Key Aspects of a Smart City through Topic Modeling and Thematic Analysis
## 3 Results
### Scientific Publication Abstracts  
The initial step in refining the topics of the scientific publication abstracts is to examine the intertopic distance map (Figure 5) and the hierarchical clustering (HC) dendrogram (Figure 6). These visualizations offer a panoramic perspective of the topics whilst enabling a thorough examination of the terms most strongly associated with each individual topic. To ensure a more comprehensive analysis, interactive visualizations are available in Supplementary Materials section. The intertopic distance map depicts each topic as a circle in the two-dimensional plane, with their centers positioned based on the calculated intertopic distances. The positioning is achieved through multidimensional scaling, which projects the intertopic distances into two dimensions. The visualization in the two dimensions is facilitated by employing Python's Plotly module ([[https://plotly.com/](https://plotly.com/)]([https://plotly.com/](https://plotly.com/)) accessed on 30 July 2023), enabling the creation of an interactive display [(43)]. The HC dendrogram portrays topic similarity at the document level. This visualization supports the comprehension of the intellectual structure of topics within the domain of smart cities.  
Figure 5: Intertopic distance map for scientific publication abstracts.  
Figure 6: Dendrogram for scientific publication abstracts.  
The analytical procedure we employed facilitates the discernment of topics characterized by their concrete validity whilst enabling the identification of topics that need to be refined, merged, or excluded. For these achievements, when our choices were not trivial and needed more examination, we thoroughly read the more representative abstracts and, where available, even delved into complete textual content.  
After our analysis, we proceeded to merge the topics, as shown in the following list: {[0, 141], [1, 17, 36, 79, 86, 105], {6, 22, 75, 95, 109}, {7, 81}, {8, 101, 134}, {9, 108, 121}, {11, 24}, {13, 19, 65}, {14, 63, 112, 127}, {15, 34, 104}, {16, 98, 114}, {18, 68}, {21, 56}, {23, 60, 106}, {26, 89}, {28, 88, 91, 124}, {29, 67, 78, 104}, {30, 31}, {33, 143}, {37, 73, 80, 140}, {38, 125}, {40, 93}, {45, 129, 133}, {48, 83}, {50, 113, 122}, {52, 138}, {53, 87, 119}, {54, 144}, {55, 130, 131}, {57, 139}, {61, 62, 92, 96}, {74, 77, 111, 116}, {76, 135}, {82, 126}, {84, 100}, {85, 107}]. Topics 35, 41, 43, 49, 64, 99, 102, 120, 132, and 137 were considered as outliers. The outliers are identified in the topics related to specific places (countries or cities), such as China or Brno, and some others that do not seem to include words with a coherent meaning. Subsequently, we examined the refined model and labeled the resultant topics.  
Figure 7 illustrates the labeled topics along with the c-TF-IDF scores of the most frequently occurring terms within each. Figure 8 represents the hierarchical structure of the refined topic model. Figure 9 portrays the hierarchical structure of the documents within each corresponding topic, supplied with embeddings. In the interactive visualization, the user can discern each document in the dataset associated with the relevant topic by simply hovering the mouse over it.  
Figure 8: Dendrogram for the refined model of scientific publication abstracts.  
Figure 9: Hierarchical document structure of corresponding topics for scientific publication abstracts.  
With the production of topic embeddings using both c-TF-IDF and embedding techniques, it becomes feasible to create a similarity matrix by directly employing cosine similarities on these topic embeddings. The outcome yields a matrix that signifies the degree of similarity between specific topics, illustrated in Figure 10 as a heatmap.