Resumen: Community detection theory is vital for the structural analysis of many types of complex networks, especially for human-like collaboration networks. In this work, we present a new community detection algorithm, the Targeted Community Merging algorithm, based on the well-known Girvan–Newman algorithm, which allows obtaining community partitions with high values of modularity and a small number of communities. We then perform an analysis and comparison between the departmental and community structure of scientific collaboration networks within the University of Zaragoza. Thus, we draw valuable conclusions from the inter- and intra-departmental collaboration structure that could be useful to take decisions on an eventual departmental restructuring. Idioma: Inglés DOI: 10.1093/comnet/cnad012 Año: 2023 Publicado en: JOURNAL OF COMPLEX NETWORKS 11, 2 (2023), cnad012 [17 pp.] ISSN: 2051-1310 Factor impacto JCR: 2.2 (2023) Categ. JCR: MATHEMATICS, INTERDISCIPLINARY APPLICATIONS rank: 39 / 135 = 0.289 (2023) - Q2 - T1 Factor impacto CITESCORE: 4.2 - Applied Mathematics (Q1) - Computational Mathematics (Q1) - Control and Optimization (Q1) - Computer Networks and Communications (Q2) - Management Science and Operations Research (Q2)