analysis: restore research timeline & compact-view clustering analysis
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
# Forschungstimeline-Analyse
|
||||
|
||||
Diese Analyse untersucht, welche OpenAlex-Daten sich eignen, um darzustellen, woran eine
|
||||
Person über die Jahre gearbeitet hat und ob sich ihr Themengebiet verschoben hat oder gleich
|
||||
geblieben ist. Das Ergebnis ist die Grundlage für die Forschungstimeline im
|
||||
Frontend (`/api/works/{author_id}/topics-by-time`).
|
||||
|
||||
## Vorgehen
|
||||
|
||||
- **Stichprobe:** vier manuell ausgewählte Personen mit unterschiedlich langer und breiter
|
||||
Publikationshistorie ([research_timeline_sample.csv](research_timeline_sample.csv)):
|
||||
Lucas Davi, Marcus Handte, Arman Arzani, Pedro José Marrón.
|
||||
- **Datenerhebung:** Für jede Person wurden alle Werke über die OpenAlex-API geladen
|
||||
([openalex_client.py](openalex_client.py)) und pro Werk die Felder `keywords`, `topics`
|
||||
und `primary_topic` extrahiert, nach Publikationsjahr gruppiert
|
||||
([timeline_manual_analysis.py](timeline_manual_analysis.py) →
|
||||
[per_person_details/](per_person_details/)).
|
||||
- **Auswertung:** Vergleich von Keywords und Topics hinsichtlich Menge, Wiederholung und
|
||||
inhaltlicher Präzision.
|
||||
|
||||
## Ergebnisse
|
||||
|
||||
### Keywords sind zu unspezifisch
|
||||
|
||||
Die häufigsten Keywords pro Person sind überwiegend generische Fachbereichs-Label statt
|
||||
konkreter Forschungsthemen. Bei Marcus Handte (110 Werke) ist das häufigste Keyword schlicht
|
||||
**"Computer science"** (94 von 110 Werken), gefolgt von "Engineering" (29),
|
||||
"Telecommunications" (23) und "World Wide Web" (22) — Begriffe, die auf praktisch jede
|
||||
Informatik-Publikation zutreffen und nichts über sein tatsächliches Forschungsgebiet
|
||||
aussagen. Bei Lucas Davi (138 Werke) dominieren ähnlich "Computer science" (126),
|
||||
"Computer security" (95) und "Operating system" (74).
|
||||
|
||||
Zusätzlich zeigen sich klare **Begriffs-Fehlzuordnungen**: Die automatische
|
||||
Keyword-Extraktion von OpenAlex ist nicht domänenspezifisch und ordnet englische
|
||||
Alltagswörter teils der falschen Bedeutung zu. Beispiele aus den Daten:
|
||||
|
||||
- Marcus Handte, _context-aware computing_: Keyword **"Context (archaeology)"**
|
||||
(19 Werke) — "Context" wurde der archäologischen statt der informatischen Bedeutung zugeordnet.
|
||||
- Lucas Davi: Keyword **"Code (set theory)"** (32 Werke) — "Code" wurde
|
||||
der mathematischen Mengenlehre statt Programmcode zugeordnet.
|
||||
- Marcus Handte, Keyword **"Key (lock)"** — "Key" wurde als
|
||||
physisches Türschloss statt als technischer Begriff interpretiert.
|
||||
|
||||
Diese drei Beispiele sind keine Einzelfälle, sondern stehen exemplarisch für ein
|
||||
systematisches Problem: Das Keyword-Feld eignet sich nicht als Grundlage für eine
|
||||
Forschungsthemen-Timeline.
|
||||
|
||||
### Topics sind spezifisch und decken sich mit dem bekannten Forschungsprofil
|
||||
|
||||
Die häufigsten Topics bilden dagegen erkennbar die tatsächlichen Forschungsschwerpunkte ab.
|
||||
Bei Marcus Handte: _"Context-Aware Activity Recognition Systems"_ (32), _"Indoor and Outdoor
|
||||
Localization Technologies"_ (17), _"IoT and Edge/Fog Computing"_ (14) — deckt sich mit seinem
|
||||
bekannten Profil in den Networked Embedded Systems. Bei Lucas Davi: _"Security and
|
||||
Verification in Computing"_ (105), _"Advanced Malware Detection Techniques"_ (91),
|
||||
_"Physical Unclonable Functions (PUFs) and Hardware Security"_ (16) — passt zu seiner
|
||||
Sicherheitsforschung.
|
||||
|
||||
Topics sind zusätzlich hierarchisch in Subfield/Field/Domain eingeordnet, was eine
|
||||
konsistente Farbcodierung und Gruppierung in der Timeline-Legende ermöglicht — bei den
|
||||
freien Keyword-Strings ist eine solche Einordnung nicht verfügbar.
|
||||
|
||||
**Einschränkung:** Auch Topics sind nicht fehlerfrei. Bei Lucas Davi erscheint z. B.
|
||||
_"Diamond and Carbon-based Materials Research"_ unter den Top-Topics (21 Werke) — fachfremd zu
|
||||
seiner Sicherheitsforschung und vermutlich auf eine Autor-Namensverwechslung in OpenAlex
|
||||
zurückzuführen. Solche Ausreißer sind in den Daten deutlich seltener als bei Keywords, aber
|
||||
nicht komplett ausgeschlossen.
|
||||
|
||||
### Quantitativer Überblick
|
||||
|
||||
| Person | Werke | Ø Keywords/Werk | Distinkte Keywords | Ø Topics/Werk | Distinkte Topics |
|
||||
| ----------------- | ----: | --------------: | -----------------: | ------------: | ---------------: |
|
||||
| Lucas Davi | 138 | 9,89 | 324 | 2,83 | 59 |
|
||||
| Marcus Handte | 110 | 9,35 | 309 | 2,79 | 109 |
|
||||
| Arman Arzani | 8 | 5,38 | 36 | 2,50 | 19 |
|
||||
| Pedro José Marrón | 286 | 10,02 | 590 | 2,76 | 183 |
|
||||
|
||||
Pro Werk stehen deutlich mehr Keywords als Topics zur Verfügung (Faktor ~3-4), was auf den
|
||||
ersten Blick nach mehr Information aussieht — die obigen Beispiele zeigen aber, dass ein
|
||||
Großteil davon zu generisch oder falsch zugeordnet ist, um für eine Timeline nutzbar zu sein.
|
||||
|
||||
### Beispiel: sichtbare Themenverschiebung über die Jahre (Marcus Handte, Primary Topics)
|
||||
|
||||
Die pro Jahr häufigsten Primary Topics zeigen genau die Art von Verschiebung, die die
|
||||
Timeline sichtbar machen soll — von Distributed Systems über mehrere Jahre stabiles
|
||||
Context-Aware Computing, dann Indoor-Lokalisierung, bis zu einer thematisch breiteren Phase
|
||||
in den letzten Jahren:
|
||||
|
||||
| Jahre | Dominantes Primary Topic |
|
||||
| --------------- | --------------------------------------------------------------------- |
|
||||
| 2004–2005 | Distributed systems and fault tolerance |
|
||||
| 2006–2012 | Context-Aware Activity Recognition Systems (durchgehend über 7 Jahre) |
|
||||
| 2013, 2016–2017 | Indoor and Outdoor Localization Technologies |
|
||||
| 2014, 2024 | Human Mobility and Location-Based Analysis |
|
||||
| 2022 | Privacy, Security, and Data Protection |
|
||||
| 2023 | Robotics and Sensor-Based Localization |
|
||||
|
||||
(vollständige Jahr-für-Jahr-Aufschlüsselung in
|
||||
[per_person_details/Marcus_Handte.json](per_person_details/Marcus_Handte.json))
|
||||
|
||||
## Fazit: finale Entscheidung im Projekt
|
||||
|
||||
Die Forschungstimeline im Backend basiert ausschließlich auf `topics` und `primary_topic`.
|
||||
Das`keywords`-Feld von OpenAlex wird für die Timeline nicht verwendet.
|
||||
@@ -0,0 +1,88 @@
|
||||
# Kompaktansicht: Gruppierung von Jahren
|
||||
|
||||
Nachdem die Entscheidung für `topics`/`primary_topic` als Datengrundlage gefallen war,
|
||||
haben wir uns die Daten der vier Personen noch einmal angesehen, um zu überlegen,
|
||||
wie sich das pro Jahr in der Timeline darstellen lässt. Bei Personen mit langer
|
||||
Publikationshistorie (z. B. Pedro José Marrón mit 28 Jahren) wird eine
|
||||
reine Jahresansicht schnell unübersichtlich. Deshalb ist zusätzlich eine Kompaktansicht
|
||||
geplant, die aufeinanderfolgende Jahre zu einer Phase zusammenfasst, wenn sie thematisch
|
||||
zusammengehören. Für die konkrete Gruppierungsregel haben wir zwei Ansätze gegeneinander
|
||||
getestet, bevor wir uns entschieden haben.
|
||||
|
||||
## Ansatz A: Primary-Topic-Regel
|
||||
|
||||
Zwei **aufeinanderfolgende** Jahre werden zu einer Phase zusammengefasst, wenn sie dasselbe
|
||||
dominante Primary Topic teilen — also das Topic mit der höchsten Werkanzahl in beiden Jahren
|
||||
(bei Gleichstand zählt jedes der gleichauf liegenden Topics als Treffer). Ein fehlendes Jahr
|
||||
oder ein Wechsel des dominanten Themas beendet die Phase sofort, auch wenn später wieder
|
||||
dasselbe Thema auftaucht.
|
||||
|
||||
Beispiel Marcus Handte, Jahre 2006–2012: Da in jedem dieser sieben Jahre "Context-Aware
|
||||
Activity Recognition Systems" das (gleichauf-)dominante Primary Topic ist, entsteht daraus
|
||||
eine einzige Phase "2006–2012". Sobald 2013 "Indoor and Outdoor Localization Technologies"
|
||||
dominiert, beginnt eine neue Phase.
|
||||
|
||||
## Ansatz B: Cosine-Similarity über das gesamte Themenprofil
|
||||
|
||||
Als Alternative haben wir einen Ansatz geprüft, der nicht nur das dominante Thema, sondern
|
||||
das gesamte Themenprofil eines Jahres berücksichtigt:
|
||||
|
||||
- Für jedes Jahr wird ein Vektor aus allen Topics gebildet: reguläre Topics zählen mit
|
||||
Gewicht 1, Primary Topics zusätzlich mit Gewicht 1,5 (jeweils multipliziert mit der Anzahl
|
||||
der Werke, die das Topic in diesem Jahr tragen).
|
||||
- Ein Jahr wird an eine bestehende (aufeinanderfolgende) Phase angehängt, wenn die
|
||||
Kosinus-Ähnlichkeit zwischen dem Phasen-Vektor (Summe aller bisherigen Jahre der Phase) und
|
||||
dem Jahres-Vektor mindestens 0,55 beträgt — unabhängig davon, ob das _dominante_ Thema
|
||||
übereinstimmt.
|
||||
- Das Label einer fertigen Phase ist danach das über alle enthaltenen Jahre am häufigsten
|
||||
vorkommende Primary Topic.
|
||||
|
||||
Beide Ansätze wurden als Prototyp implementiert und an denselben vier Personen ausgewertet.
|
||||
|
||||
## Vergleich
|
||||
|
||||
### 1. Cosine-Similarity verschluckt genau die Verschiebungen, die die Timeline zeigen soll
|
||||
|
||||
Bei **Lucas Davi** fasst die Primary-Topic-Regel 2013 korrekt als eigene, einjährige Phase
|
||||
("Advanced Malware Detection Techniques") zusammen, weil in diesem Jahr ein anderes Thema
|
||||
dominierte als davor und danach:
|
||||
|
||||
| Verfahren | Ergebnis 2009–2026 |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Primary-Topic-Regel | 2009–2012: Security and Verification in Computing · **2013: Advanced Malware Detection Techniques** · 2014–2026: Security and Verification in Computing |
|
||||
| Cosine-Similarity | **2009–2024: Security and Verification in Computing** (16 Jahre in einer Phase) · 2025: Blockchain Technology Applications and Security · 2026: Security and Verification in Computing |
|
||||
|
||||
Die Cosine-Similarity verschmilzt 16 Jahre zu einer einzigen Phase und lässt dabei den
|
||||
2013er-Ausreißer komplett verschwinden — obwohl genau solche vorübergehenden Themenwechsel
|
||||
für die Timeline interessant wären. Der Grund: Die im Hintergrund mitlaufenden Nebenthemen
|
||||
(z. B. allgemeine Sicherheitsthemen) überlappen Jahr für Jahr stark genug, dass die
|
||||
Ähnlichkeit trotz unterschiedlichem Schwerpunktthema über der Schwelle bleibt.
|
||||
|
||||
Bei **Pedro José Marrón** zeigt sich derselbe Effekt noch deutlicher: Die Primary-Topic-Regel
|
||||
löst 2005–2011, 2012, 2013 und 2014–2015 als vier unterschiedliche, informative Phasen auf;
|
||||
Cosine-Similarity verschmilzt 2004 bis 2016 — **13 Jahre** — zu einer einzigen Phase und
|
||||
verdeckt damit u. a. das 2012er-Jahr zu "Interactive and Immersive Displays" komplett.
|
||||
|
||||
### 2. Cosine-Similarity verhält sich auch gegenteilig unvorhersehbar
|
||||
|
||||
Bei **Arman Arzani** (kurze Historie, 4 Jahre) tritt der umgekehrte Fall auf: 2023 und 2024
|
||||
haben laut Primary-Topic-Regel _dasselbe_ dominante Thema ("Big Data and Business
|
||||
Intelligence") und werden zusammengefasst — Cosine-Similarity trennt die beiden Jahre
|
||||
trotzdem, weil die Nebenthemen zu wenig überlappen. Für Nutzende wäre das schwer
|
||||
nachvollziehbar: Zwei Jahre mit identisch angezeigtem Hauptthema erscheinen als getrennte
|
||||
Phasen, ohne dass ein sichtbarer Grund dafür erkennbar ist.
|
||||
|
||||
### 3. Nachvollziehbarkeit
|
||||
|
||||
Die Primary-Topic-Regel begründet eine Phase immer mit genau dem Label, das auch angezeigt
|
||||
wird ("diese Jahre teilen sich dasselbe Hauptthema"). Die Kosinus-Ähnlichkeit ist dagegen ein
|
||||
unsichtbarer Zahlenwert, der in der Oberfläche nirgends auftaucht — eine Zusammenfassung oder
|
||||
Trennung lässt sich für Nutzende nicht nachvollziehen, wie die Beispiele oben zeigen.
|
||||
|
||||
## Entscheidung
|
||||
|
||||
Auf Basis dieses Vergleichs verwendet die Kompaktansicht die Primary-Topic-Regel. Der
|
||||
Cosine-Similarity-Ansatz bleibt als geprüfte, aber verworfene Alternative dokumentiert: Er
|
||||
neigt auf echten Daten dazu, genau die Themenwechsel zu verschlucken, die die Timeline
|
||||
sichtbar machen soll, und seine Gruppierungsentscheidungen sind für Nutzende nicht
|
||||
nachvollziehbar.
|
||||
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"Arman Arzani": {
|
||||
"year_count": 4,
|
||||
"phases_primary_topic": [
|
||||
"2023-2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Advanced Software Engineering Methodologies"
|
||||
],
|
||||
"phases_cosine_similarity": [
|
||||
"2023: Big Data and Business Intelligence",
|
||||
"2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Advanced Software Engineering Methodologies"
|
||||
],
|
||||
"phase_count_primary_topic": 3,
|
||||
"phase_count_cosine_similarity": 4
|
||||
},
|
||||
"Lucas Davi": {
|
||||
"year_count": 18,
|
||||
"phases_primary_topic": [
|
||||
"2009-2012: Security and Verification in Computing",
|
||||
"2013: Advanced Malware Detection Techniques",
|
||||
"2014-2026: Security and Verification in Computing"
|
||||
],
|
||||
"phases_cosine_similarity": [
|
||||
"2009-2024: Security and Verification in Computing",
|
||||
"2025: Blockchain Technology Applications and Security",
|
||||
"2026: Security and Verification in Computing"
|
||||
],
|
||||
"phase_count_primary_topic": 3,
|
||||
"phase_count_cosine_similarity": 3
|
||||
},
|
||||
"Marcus Handte": {
|
||||
"year_count": 23,
|
||||
"phases_primary_topic": [
|
||||
"2004: Data Visualization and Analytics",
|
||||
"2005: Distributed systems and fault tolerance",
|
||||
"2006-2007: Context-Aware Activity Recognition Systems",
|
||||
"2008: Energy Efficient Wireless Sensor Networks",
|
||||
"2009-2012: Context-Aware Activity Recognition Systems",
|
||||
"2013: Indoor and Outdoor Localization Technologies",
|
||||
"2014: Human Mobility and Location-Based Analysis",
|
||||
"2015: Context-Aware Activity Recognition Systems",
|
||||
"2016-2017: Indoor and Outdoor Localization Technologies",
|
||||
"2018: Bluetooth and Wireless Communication Technologies",
|
||||
"2019: Distributed and Parallel Computing Systems",
|
||||
"2020: Advanced Vision and Imaging",
|
||||
"2021: Human Mobility and Location-Based Analysis",
|
||||
"2022: Privacy, Security, and Data Protection",
|
||||
"2023: Energy Harvesting in Wireless Networks",
|
||||
"2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Advanced Software Engineering Methodologies"
|
||||
],
|
||||
"phases_cosine_similarity": [
|
||||
"2004: Data Visualization and Analytics",
|
||||
"2005: Distributed systems and fault tolerance",
|
||||
"2006-2007: Context-Aware Activity Recognition Systems",
|
||||
"2008: Energy Efficient Wireless Sensor Networks",
|
||||
"2009-2012: Context-Aware Activity Recognition Systems",
|
||||
"2013: Indoor and Outdoor Localization Technologies",
|
||||
"2014: Human Mobility and Location-Based Analysis",
|
||||
"2015: Context-Aware Activity Recognition Systems",
|
||||
"2016-2018: Indoor and Outdoor Localization Technologies",
|
||||
"2019: Distributed and Parallel Computing Systems",
|
||||
"2020: Advanced Vision and Imaging",
|
||||
"2021: Human Mobility and Location-Based Analysis",
|
||||
"2022: Privacy, Security, and Data Protection",
|
||||
"2023: Energy Harvesting in Wireless Networks",
|
||||
"2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Advanced Software Engineering Methodologies"
|
||||
],
|
||||
"phase_count_primary_topic": 18,
|
||||
"phase_count_cosine_similarity": 17
|
||||
},
|
||||
"Pedro José Marrón": {
|
||||
"year_count": 28,
|
||||
"phases_primary_topic": [
|
||||
"1996: Mathematics, Computing, and Information Processing",
|
||||
"1999: Real-Time Systems Scheduling",
|
||||
"2001: Advanced Database Systems and Queries",
|
||||
"2002: Distributed systems and fault tolerance",
|
||||
"2003: Advanced Database Systems and Queries",
|
||||
"2004: Distributed systems and fault tolerance",
|
||||
"2005-2011: Energy Efficient Wireless Sensor Networks",
|
||||
"2012: Interactive and Immersive Displays",
|
||||
"2013: Indoor and Outdoor Localization Technologies",
|
||||
"2014-2015: Energy Efficient Wireless Sensor Networks",
|
||||
"2016-2017: Indoor and Outdoor Localization Technologies",
|
||||
"2018: Bluetooth and Wireless Communication Technologies",
|
||||
"2019: Indoor and Outdoor Localization Technologies",
|
||||
"2020-2021: Robotics and Sensor-Based Localization",
|
||||
"2022: Advanced Database Systems and Queries",
|
||||
"2023: Energy Harvesting in Wireless Networks",
|
||||
"2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Face recognition and analysis"
|
||||
],
|
||||
"phases_cosine_similarity": [
|
||||
"1996: Mathematics, Computing, and Information Processing",
|
||||
"1999: Real-Time Systems Scheduling",
|
||||
"2001: Advanced Database Systems and Queries",
|
||||
"2002: Distributed systems and fault tolerance",
|
||||
"2003: Advanced Database Systems and Queries",
|
||||
"2004-2016: Energy Efficient Wireless Sensor Networks",
|
||||
"2017: Indoor and Outdoor Localization Technologies",
|
||||
"2018: Bluetooth and Wireless Communication Technologies",
|
||||
"2019: Indoor and Outdoor Localization Technologies",
|
||||
"2020: Robotics and Sensor-Based Localization",
|
||||
"2021: Human Mobility and Location-Based Analysis",
|
||||
"2022: Advanced Database Systems and Queries",
|
||||
"2023: Energy Harvesting in Wireless Networks",
|
||||
"2024: Big Data and Business Intelligence",
|
||||
"2025: Data Mining Algorithms and Applications",
|
||||
"2026: Face recognition and analysis"
|
||||
],
|
||||
"phase_count_primary_topic": 19,
|
||||
"phase_count_cosine_similarity": 16
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
"""
|
||||
Reconstructs both compact-view clustering methods that were evaluated for the
|
||||
research timeline and runs them against the same four people used in the
|
||||
keyword-vs-topic analysis (../per_person_details/*.json).
|
||||
|
||||
Method A ("primary-topic"): the method actually shipped. Two contiguous years
|
||||
belong to the same phase if they share the same dominant (highest-count)
|
||||
primary topic. This mirrors `canExtendPhaseByPrimaryTopic` /
|
||||
`getDominantPrimaryTopicCandidates` in research-timeline.component.ts.
|
||||
|
||||
Method B ("cosine-similarity"): an alternative that was implemented and
|
||||
tested but not adopted (commit 65ab9d59, "Timeline: Add cosine similarity
|
||||
clustering"). Two contiguous years belong to the same phase if the cosine
|
||||
similarity between their weighted topic vectors is >= 0.55. Each year's
|
||||
vector is built from its `topics` (weight 1) and `primary_topics` (weight
|
||||
1.5), keyed by normalized topic name, weighted by how many works in that
|
||||
year carry the topic.
|
||||
"""
|
||||
|
||||
import json
|
||||
import math
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
DETAILS_DIR = BASE_DIR.parent / "per_person_details"
|
||||
OUTPUT_FILE = BASE_DIR / "clustering_comparison.json"
|
||||
|
||||
SIMILARITY_THRESHOLD = 0.55
|
||||
PRIMARY_TOPIC_WEIGHT = 1.5
|
||||
|
||||
|
||||
def normalize(name: str) -> str:
|
||||
return name.strip().lower()
|
||||
|
||||
|
||||
def build_year_aggregates(
|
||||
works_by_year: dict[str, list[dict[str, Any]]],
|
||||
) -> dict[int, dict[str, Any]]:
|
||||
"""
|
||||
Turns the per-work records for one person into the same shape the real
|
||||
backend produces per year: topic/primary-topic name -> number of works
|
||||
in that year carrying it.
|
||||
"""
|
||||
aggregates: dict[int, dict[str, Any]] = {}
|
||||
|
||||
for year_str, works in works_by_year.items():
|
||||
year = int(year_str)
|
||||
topic_counts: dict[str, int] = {}
|
||||
primary_counts: dict[str, int] = {}
|
||||
|
||||
for work in works:
|
||||
for topic_name in work.get("topics") or []:
|
||||
topic_counts[topic_name] = topic_counts.get(topic_name, 0) + 1
|
||||
|
||||
primary = work.get("primary_topic")
|
||||
if primary:
|
||||
primary_counts[primary] = primary_counts.get(primary, 0) + 1
|
||||
|
||||
aggregates[year] = {
|
||||
"topics": topic_counts,
|
||||
"primary_topics": primary_counts,
|
||||
}
|
||||
|
||||
return dict(sorted(aggregates.items()))
|
||||
|
||||
|
||||
def dominant_primary_topic_candidates(year_data: dict[str, Any]) -> list[str]:
|
||||
primary_topics = year_data["primary_topics"]
|
||||
if not primary_topics:
|
||||
return []
|
||||
max_count = max(primary_topics.values())
|
||||
return [name for name, count in primary_topics.items() if count == max_count]
|
||||
|
||||
|
||||
def main_topic_name(year_data: dict[str, Any]) -> str:
|
||||
"""
|
||||
Mirrors getMainTopicItem: highest-count primary topic, falling back to
|
||||
the highest-count regular topic if there is no primary topic at all.
|
||||
"""
|
||||
candidates = dominant_primary_topic_candidates(year_data)
|
||||
if candidates:
|
||||
return sorted(candidates)[0]
|
||||
|
||||
topics = year_data["topics"]
|
||||
if not topics:
|
||||
return "Keine Topics"
|
||||
|
||||
max_count = max(topics.values())
|
||||
top = sorted(name for name, count in topics.items() if count == max_count)
|
||||
return top[0]
|
||||
|
||||
|
||||
def build_phases_primary_topic(
|
||||
years: list[tuple[int, dict[str, Any]]],
|
||||
) -> list[dict[str, Any]]:
|
||||
phases: list[dict[str, Any]] = []
|
||||
current: dict[str, Any] | None = None
|
||||
|
||||
for year, data in years:
|
||||
if current is None:
|
||||
current = {"start": year, "end": year, "topic": main_topic_name(data)}
|
||||
continue
|
||||
|
||||
candidates = dominant_primary_topic_candidates(data)
|
||||
matches = any(
|
||||
normalize(c) == normalize(current["topic"]) for c in candidates
|
||||
)
|
||||
contiguous = year == current["end"] + 1
|
||||
|
||||
if contiguous and matches:
|
||||
current["end"] = year
|
||||
continue
|
||||
|
||||
phases.append(current)
|
||||
current = {"start": year, "end": year, "topic": main_topic_name(data)}
|
||||
|
||||
if current is not None:
|
||||
phases.append(current)
|
||||
|
||||
return phases
|
||||
|
||||
|
||||
def make_vector(year_data: dict[str, Any]) -> dict[str, float]:
|
||||
vector: dict[str, float] = {}
|
||||
for name, count in year_data["topics"].items():
|
||||
key = normalize(name)
|
||||
vector[key] = vector.get(key, 0.0) + count
|
||||
for name, count in year_data["primary_topics"].items():
|
||||
key = normalize(name)
|
||||
vector[key] = vector.get(key, 0.0) + count * PRIMARY_TOPIC_WEIGHT
|
||||
return vector
|
||||
|
||||
|
||||
def add_vector(target: dict[str, float], addition: dict[str, float]) -> None:
|
||||
for key, value in addition.items():
|
||||
target[key] = target.get(key, 0.0) + value
|
||||
|
||||
|
||||
def cosine_similarity(left: dict[str, float], right: dict[str, float]) -> float:
|
||||
left_norm = math.sqrt(sum(v * v for v in left.values()))
|
||||
right_norm = math.sqrt(sum(v * v for v in right.values()))
|
||||
if left_norm == 0 or right_norm == 0:
|
||||
return 0.0
|
||||
|
||||
smaller, larger = (left, right) if len(left) < len(right) else (right, left)
|
||||
dot_product = sum(value * larger.get(key, 0.0) for key, value in smaller.items())
|
||||
|
||||
return dot_product / (left_norm * right_norm)
|
||||
|
||||
|
||||
def build_phases_cosine_similarity(
|
||||
years: list[tuple[int, dict[str, Any]]],
|
||||
) -> list[dict[str, Any]]:
|
||||
phases: list[dict[str, Any]] = []
|
||||
current: dict[str, Any] | None = None
|
||||
current_vector: dict[str, float] = {}
|
||||
current_years: list[tuple[int, dict[str, Any]]] = []
|
||||
|
||||
def close_phase() -> None:
|
||||
# Final label = most frequent primary topic across the whole phase,
|
||||
# matching aggregateDominantPhasePrimaryTopic in the original commit.
|
||||
primary_totals: dict[str, int] = {}
|
||||
for _, data in current_years:
|
||||
for name, count in data["primary_topics"].items():
|
||||
primary_totals[name] = primary_totals.get(name, 0) + count
|
||||
if primary_totals:
|
||||
max_count = max(primary_totals.values())
|
||||
label = sorted(
|
||||
name for name, count in primary_totals.items() if count == max_count
|
||||
)[0]
|
||||
else:
|
||||
label = main_topic_name(current_years[0][1])
|
||||
phases.append({"start": current["start"], "end": current["end"], "topic": label})
|
||||
|
||||
for year, data in years:
|
||||
item_vector = make_vector(data)
|
||||
|
||||
if current is None:
|
||||
current = {"start": year, "end": year}
|
||||
current_vector = dict(item_vector)
|
||||
current_years = [(year, data)]
|
||||
continue
|
||||
|
||||
contiguous = year == current["end"] + 1
|
||||
similarity = cosine_similarity(current_vector, item_vector) if contiguous else 0.0
|
||||
|
||||
if contiguous and similarity >= SIMILARITY_THRESHOLD:
|
||||
current["end"] = year
|
||||
add_vector(current_vector, item_vector)
|
||||
current_years.append((year, data))
|
||||
continue
|
||||
|
||||
close_phase()
|
||||
current = {"start": year, "end": year}
|
||||
current_vector = dict(item_vector)
|
||||
current_years = [(year, data)]
|
||||
|
||||
if current is not None:
|
||||
close_phase()
|
||||
|
||||
return phases
|
||||
|
||||
|
||||
def format_phases(phases: list[dict[str, Any]]) -> list[str]:
|
||||
formatted = []
|
||||
for phase in phases:
|
||||
span = (
|
||||
f"{phase['start']}"
|
||||
if phase["start"] == phase["end"]
|
||||
else f"{phase['start']}-{phase['end']}"
|
||||
)
|
||||
formatted.append(f"{span}: {phase['topic']}")
|
||||
return formatted
|
||||
|
||||
|
||||
def run() -> None:
|
||||
results: dict[str, Any] = {}
|
||||
|
||||
for details_file in sorted(DETAILS_DIR.glob("*.json")):
|
||||
name = details_file.stem.replace("_", " ")
|
||||
|
||||
with details_file.open(encoding="utf-8") as file:
|
||||
works_by_year = json.load(file)
|
||||
|
||||
# per_person_details stores lists of work records per year; reduce
|
||||
# each work to just its topic names for the aggregation step.
|
||||
simplified: dict[str, list[dict[str, Any]]] = {}
|
||||
for year, works in works_by_year.items():
|
||||
simplified[year] = [
|
||||
{"topics": w.get("topics"), "primary_topic": w.get("primary_topic")}
|
||||
for w in works
|
||||
]
|
||||
|
||||
year_aggregates = build_year_aggregates(simplified)
|
||||
years_list = list(year_aggregates.items())
|
||||
|
||||
phases_simple = build_phases_primary_topic(years_list)
|
||||
phases_cosine = build_phases_cosine_similarity(years_list)
|
||||
|
||||
results[name] = {
|
||||
"year_count": len(years_list),
|
||||
"phases_primary_topic": format_phases(phases_simple),
|
||||
"phases_cosine_similarity": format_phases(phases_cosine),
|
||||
"phase_count_primary_topic": len(phases_simple),
|
||||
"phase_count_cosine_similarity": len(phases_cosine),
|
||||
}
|
||||
|
||||
print(f"\n=== {name} ({len(years_list)} Jahre) ===")
|
||||
print(f"Primary-Topic-Regel: {len(phases_simple)} Phasen")
|
||||
for line in format_phases(phases_simple):
|
||||
print(f" {line}")
|
||||
print(f"Cosine-Similarity: {len(phases_cosine)} Phasen")
|
||||
for line in format_phases(phases_cosine):
|
||||
print(f" {line}")
|
||||
|
||||
with OUTPUT_FILE.open(mode="w", encoding="utf-8") as output_file:
|
||||
json.dump(results, output_file, indent=2, ensure_ascii=False)
|
||||
|
||||
print(f"\nErgebnisse geschrieben nach {OUTPUT_FILE}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
@@ -0,0 +1,5 @@
|
||||
name,openalex_author_id,work_count,years_covered,avg_keywords_per_work,distinct_keywords,keyword_distinct_ratio,avg_topics_per_work,distinct_topics,topic_distinct_ratio
|
||||
Lucas Davi,A5089242868,138,18,9.89,324,0.237,2.83,59,0.151
|
||||
Marcus Handte,A5007170803,110,23,9.35,309,0.301,2.79,109,0.355
|
||||
Arman Arzani,A5093075883,8,4,5.38,36,0.837,2.5,19,0.95
|
||||
Pedro José Marrón,A5047117780,286,28,10.02,590,0.206,2.76,183,0.232
|
||||
|
@@ -0,0 +1,104 @@
|
||||
import json
|
||||
from typing import Any
|
||||
from urllib.error import HTTPError, URLError
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
OPENALEX_WORKS_URL = "https://api.openalex.org/works"
|
||||
REQUEST_TIMEOUT_SECONDS = 30
|
||||
PER_PAGE = 200
|
||||
|
||||
|
||||
def normalize_author_id(author_id: str) -> str:
|
||||
"""
|
||||
Normalizes OpenAlex author IDs.
|
||||
|
||||
Supported inputs:
|
||||
- A123456789
|
||||
- https://openalex.org/A123456789
|
||||
- https://api.openalex.org/authors/A123456789
|
||||
"""
|
||||
cleaned_author_id = author_id.strip()
|
||||
|
||||
if cleaned_author_id.startswith("https://api.openalex.org/authors/"):
|
||||
return cleaned_author_id.replace(
|
||||
"https://api.openalex.org/authors/",
|
||||
"https://openalex.org/",
|
||||
)
|
||||
|
||||
if cleaned_author_id.startswith("https://openalex.org/"):
|
||||
return cleaned_author_id
|
||||
|
||||
if cleaned_author_id.startswith("A"):
|
||||
return f"https://openalex.org/{cleaned_author_id}"
|
||||
|
||||
return cleaned_author_id
|
||||
|
||||
|
||||
def fetch_openalex_page(
|
||||
author_id: str, cursor: str, select: str | None = None
|
||||
) -> dict[str, Any]:
|
||||
normalized_author_id = normalize_author_id(author_id)
|
||||
|
||||
params = {
|
||||
"filter": f"authorships.author.id:{normalized_author_id}",
|
||||
"per-page": PER_PAGE,
|
||||
"cursor": cursor,
|
||||
"sort": "publication_year:asc",
|
||||
}
|
||||
if select:
|
||||
params["select"] = select
|
||||
|
||||
query_params = urlencode(params)
|
||||
|
||||
url = f"{OPENALEX_WORKS_URL}?{query_params}"
|
||||
|
||||
request = Request(
|
||||
url,
|
||||
headers={
|
||||
"Accept": "application/json",
|
||||
"User-Agent": "AIIS career stage analysis",
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
with urlopen(request, timeout=REQUEST_TIMEOUT_SECONDS) as response:
|
||||
response_body = response.read().decode("utf-8")
|
||||
return json.loads(response_body)
|
||||
|
||||
except HTTPError as error:
|
||||
raise RuntimeError(
|
||||
f"OpenAlex request failed with HTTP status {error.code}: {url}"
|
||||
) from error
|
||||
|
||||
except URLError as error:
|
||||
raise RuntimeError(f"OpenAlex request failed: {error}") from error
|
||||
|
||||
|
||||
def get_all_author_works(
|
||||
author_id: str, select: str | None = None
|
||||
) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Fetches all works for an OpenAlex author by using cursor pagination.
|
||||
|
||||
`select` restricts the returned fields (comma-separated OpenAlex field
|
||||
names) to keep responses small when only a few fields are needed.
|
||||
"""
|
||||
works: list[dict[str, Any]] = []
|
||||
cursor = "*"
|
||||
|
||||
while cursor:
|
||||
data = fetch_openalex_page(author_id, cursor, select=select)
|
||||
|
||||
page_results = data.get("results", [])
|
||||
works.extend(page_results)
|
||||
|
||||
meta = data.get("meta", {})
|
||||
next_cursor = meta.get("next_cursor")
|
||||
|
||||
if not next_cursor or next_cursor == cursor:
|
||||
break
|
||||
|
||||
cursor = next_cursor
|
||||
|
||||
return works
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"2023": [
|
||||
{
|
||||
"year": 2023,
|
||||
"title": "Discovering Potential Founders Based on Academic Background",
|
||||
"keywords": ["Computer science", "Data science"],
|
||||
"topics": ["Education and Critical Thinking Development"],
|
||||
"primary_topic": "Education and Critical Thinking Development"
|
||||
},
|
||||
{
|
||||
"year": 2023,
|
||||
"title": "Challenges in Implementing a University-Based Innovation Search Engine",
|
||||
"keywords": ["Computer science", "Search engine", "World Wide Web"],
|
||||
"topics": ["Big Data and Business Intelligence"],
|
||||
"primary_topic": "Big Data and Business Intelligence"
|
||||
},
|
||||
{
|
||||
"year": 2023,
|
||||
"title": "Exploiting Topic Modelling for the Identification of Untapped Scientific Collaborations",
|
||||
"keywords": [
|
||||
"Data science",
|
||||
"Computer science",
|
||||
"Identification (biology)",
|
||||
"Citation",
|
||||
"Topic model",
|
||||
"Information retrieval",
|
||||
"Knowledge management",
|
||||
"World Wide Web"
|
||||
],
|
||||
"topics": [
|
||||
"Topic Modeling",
|
||||
"Complex Network Analysis Techniques",
|
||||
"Computational and Text Analysis Methods"
|
||||
],
|
||||
"primary_topic": "Topic Modeling"
|
||||
}
|
||||
],
|
||||
"2024": [
|
||||
{
|
||||
"year": 2024,
|
||||
"title": "Ai-Based Pattern Recognition in Limited, Unstructured Information: Improving Joint Value Creation in Mobility as a Service",
|
||||
"keywords": [
|
||||
"Joint (building)",
|
||||
"Service (business)",
|
||||
"Computer science",
|
||||
"Value (mathematics)",
|
||||
"Artificial intelligence",
|
||||
"Pattern recognition (psychology)",
|
||||
"Machine learning",
|
||||
"Business",
|
||||
"Engineering",
|
||||
"Marketing"
|
||||
],
|
||||
"topics": [
|
||||
"Big Data and Business Intelligence",
|
||||
"Customer churn and segmentation",
|
||||
"Semantic Web and Ontologies"
|
||||
],
|
||||
"primary_topic": "Big Data and Business Intelligence"
|
||||
},
|
||||
{
|
||||
"year": 2024,
|
||||
"title": "Discovering potential founders within academic institutions",
|
||||
"keywords": [
|
||||
"Political science",
|
||||
"Mathematics education",
|
||||
"Sociology",
|
||||
"Psychology"
|
||||
],
|
||||
"topics": [
|
||||
"Entrepreneurship Studies and Influences",
|
||||
"Genetics, Bioinformatics, and Biomedical Research",
|
||||
"Biomedical and Engineering Education"
|
||||
],
|
||||
"primary_topic": "Entrepreneurship Studies and Influences"
|
||||
}
|
||||
],
|
||||
"2025": [
|
||||
{
|
||||
"year": 2025,
|
||||
"title": "A Hybrid Approach for Mining the Organizational Structure from University Websites",
|
||||
"keywords": [
|
||||
"Organizational structure",
|
||||
"Key (lock)",
|
||||
"Field (mathematics)",
|
||||
"Information system",
|
||||
"The Internet",
|
||||
"Work (physics)"
|
||||
],
|
||||
"topics": [
|
||||
"Data Mining Algorithms and Applications",
|
||||
"Advanced Text Analysis Techniques",
|
||||
"Web visibility and informetrics"
|
||||
],
|
||||
"primary_topic": "Data Mining Algorithms and Applications"
|
||||
}
|
||||
],
|
||||
"2026": [
|
||||
{
|
||||
"year": 2026,
|
||||
"title": "Technical Architecture of Ecosystems: Customer Application, Middleware and Backend",
|
||||
"keywords": [
|
||||
"Middleware (distributed applications)",
|
||||
"Architecture",
|
||||
"Systems architecture",
|
||||
"Component (thermodynamics)",
|
||||
"Common Object Request Broker Architecture"
|
||||
],
|
||||
"topics": [
|
||||
"Advanced Software Engineering Methodologies",
|
||||
"Green IT and Sustainability",
|
||||
"Sustainable Industrial Ecology"
|
||||
],
|
||||
"primary_topic": "Advanced Software Engineering Methodologies"
|
||||
},
|
||||
{
|
||||
"year": 2026,
|
||||
"title": "Mobility as a Service Transaction Ecosystems Worldwide",
|
||||
"keywords": [
|
||||
"Database transaction",
|
||||
"Service (business)",
|
||||
"Ecosystem",
|
||||
"Key (lock)",
|
||||
"Production (economics)"
|
||||
],
|
||||
"topics": [
|
||||
"Service and Product Innovation",
|
||||
"Transportation and Mobility Innovations",
|
||||
"Information Systems Theories and Implementation"
|
||||
],
|
||||
"primary_topic": "Service and Product Innovation"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
name,role,openalex_author_id
|
||||
Lucas Davi,Professor,A5089242868
|
||||
Marcus Handte,Advisor / Wissenschaftlicher Mitarbeiter,A5007170803
|
||||
Arman Arzani,Advisor / Wissenschaftlicher Mitarbeiter,A5093075883
|
||||
Pedro José Marrón,Professor,A5047117780
|
||||
|
@@ -0,0 +1,186 @@
|
||||
import csv
|
||||
import json
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from openalex_client import get_all_author_works
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
INPUT_FILE = BASE_DIR / "research_timeline_sample.csv"
|
||||
DETAILS_DIR = BASE_DIR / "per_person_details"
|
||||
SUMMARY_FILE = BASE_DIR / "keyword_vs_topic_summary.csv"
|
||||
TOP_TERMS_FILE = BASE_DIR / "top_terms_by_person.csv"
|
||||
|
||||
SELECT_FIELDS = "id,title,publication_year,keywords,topics,primary_topic"
|
||||
TOP_N_TERMS = 15
|
||||
|
||||
|
||||
def extract_work_record(work: dict[str, Any]) -> dict[str, Any]:
|
||||
"""
|
||||
Reduces one OpenAlex work to the fields relevant for comparing keywords
|
||||
against topics per publication year.
|
||||
"""
|
||||
keywords = [kw.get("display_name") for kw in (work.get("keywords") or [])]
|
||||
topics = [t.get("display_name") for t in (work.get("topics") or [])]
|
||||
primary_topic = (work.get("primary_topic") or {}).get("display_name")
|
||||
|
||||
return {
|
||||
"year": work.get("publication_year"),
|
||||
"title": work.get("title"),
|
||||
"keywords": keywords,
|
||||
"topics": topics,
|
||||
"primary_topic": primary_topic,
|
||||
}
|
||||
|
||||
|
||||
def group_by_year(records: list[dict[str, Any]]) -> dict[int, list[dict[str, Any]]]:
|
||||
by_year: dict[int, list[dict[str, Any]]] = {}
|
||||
|
||||
for record in records:
|
||||
year = record["year"]
|
||||
if not isinstance(year, int):
|
||||
continue
|
||||
by_year.setdefault(year, []).append(record)
|
||||
|
||||
return dict(sorted(by_year.items()))
|
||||
|
||||
|
||||
def summarize_terms(records: list[dict[str, Any]], field: str) -> dict[str, Any]:
|
||||
"""
|
||||
Computes basic descriptive stats for a term field (keywords or topics)
|
||||
across all works of one person.
|
||||
|
||||
`distinct_ratio` = distinct terms / total term mentions. A low ratio
|
||||
means the same terms keep reappearing across many works; a high ratio
|
||||
means most mentions are of a term not seen elsewhere.
|
||||
"""
|
||||
all_terms: list[str] = []
|
||||
per_work_counts: list[int] = []
|
||||
|
||||
for record in records:
|
||||
terms = record[field]
|
||||
per_work_counts.append(len(terms))
|
||||
all_terms.extend(terms)
|
||||
|
||||
total_mentions = len(all_terms)
|
||||
distinct_terms = len(set(all_terms))
|
||||
avg_per_work = total_mentions / len(records) if records else 0.0
|
||||
distinct_ratio = distinct_terms / total_mentions if total_mentions else 0.0
|
||||
|
||||
counter = Counter(all_terms)
|
||||
top_terms = counter.most_common(TOP_N_TERMS)
|
||||
|
||||
return {
|
||||
"total_mentions": total_mentions,
|
||||
"distinct_terms": distinct_terms,
|
||||
"avg_per_work": round(avg_per_work, 2),
|
||||
"distinct_ratio": round(distinct_ratio, 3),
|
||||
"top_terms": top_terms,
|
||||
}
|
||||
|
||||
|
||||
def analyze_sample() -> None:
|
||||
if not INPUT_FILE.exists():
|
||||
raise FileNotFoundError(f"Input file not found: {INPUT_FILE}")
|
||||
|
||||
DETAILS_DIR.mkdir(exist_ok=True)
|
||||
|
||||
summary_rows: list[dict[str, Any]] = []
|
||||
top_terms_rows: list[dict[str, Any]] = []
|
||||
|
||||
with INPUT_FILE.open(mode="r", encoding="utf-8", newline="") as input_file:
|
||||
reader = csv.DictReader(input_file)
|
||||
|
||||
for row in reader:
|
||||
name = row.get("name", "").strip()
|
||||
openalex_author_id = row.get("openalex_author_id", "").strip()
|
||||
|
||||
if not openalex_author_id:
|
||||
print(f"Skipping {name}: missing OpenAlex author ID")
|
||||
continue
|
||||
|
||||
print(f"Fetching works for {name} ({openalex_author_id})...")
|
||||
|
||||
try:
|
||||
works = get_all_author_works(openalex_author_id, select=SELECT_FIELDS)
|
||||
except Exception as error:
|
||||
print(f"Error while processing {name}: {error}")
|
||||
continue
|
||||
|
||||
records = [extract_work_record(work) for work in works]
|
||||
by_year = group_by_year(records)
|
||||
|
||||
details_path = DETAILS_DIR / f"{name.replace(' ', '_')}.json"
|
||||
with details_path.open(mode="w", encoding="utf-8") as details_file:
|
||||
json.dump(by_year, details_file, indent=2, ensure_ascii=False)
|
||||
|
||||
keyword_stats = summarize_terms(records, "keywords")
|
||||
topic_stats = summarize_terms(records, "topics")
|
||||
|
||||
summary_rows.append(
|
||||
{
|
||||
"name": name,
|
||||
"openalex_author_id": openalex_author_id,
|
||||
"work_count": len(records),
|
||||
"years_covered": len(by_year),
|
||||
"avg_keywords_per_work": keyword_stats["avg_per_work"],
|
||||
"distinct_keywords": keyword_stats["distinct_terms"],
|
||||
"keyword_distinct_ratio": keyword_stats["distinct_ratio"],
|
||||
"avg_topics_per_work": topic_stats["avg_per_work"],
|
||||
"distinct_topics": topic_stats["distinct_terms"],
|
||||
"topic_distinct_ratio": topic_stats["distinct_ratio"],
|
||||
}
|
||||
)
|
||||
|
||||
for rank, (term, count) in enumerate(keyword_stats["top_terms"], start=1):
|
||||
top_terms_rows.append(
|
||||
{
|
||||
"name": name,
|
||||
"field": "keyword",
|
||||
"rank": rank,
|
||||
"term": term,
|
||||
"work_count": count,
|
||||
}
|
||||
)
|
||||
for rank, (term, count) in enumerate(topic_stats["top_terms"], start=1):
|
||||
top_terms_rows.append(
|
||||
{
|
||||
"name": name,
|
||||
"field": "topic",
|
||||
"rank": rank,
|
||||
"term": term,
|
||||
"work_count": count,
|
||||
}
|
||||
)
|
||||
|
||||
with SUMMARY_FILE.open(mode="w", encoding="utf-8", newline="") as summary_file:
|
||||
fieldnames = [
|
||||
"name",
|
||||
"openalex_author_id",
|
||||
"work_count",
|
||||
"years_covered",
|
||||
"avg_keywords_per_work",
|
||||
"distinct_keywords",
|
||||
"keyword_distinct_ratio",
|
||||
"avg_topics_per_work",
|
||||
"distinct_topics",
|
||||
"topic_distinct_ratio",
|
||||
]
|
||||
writer = csv.DictWriter(summary_file, fieldnames=fieldnames)
|
||||
writer.writeheader()
|
||||
writer.writerows(summary_rows)
|
||||
|
||||
with TOP_TERMS_FILE.open(mode="w", encoding="utf-8", newline="") as top_terms_file:
|
||||
fieldnames = ["name", "field", "rank", "term", "work_count"]
|
||||
writer = csv.DictWriter(top_terms_file, fieldnames=fieldnames)
|
||||
writer.writeheader()
|
||||
writer.writerows(top_terms_rows)
|
||||
|
||||
print(f"Analysis finished. Summary written to {SUMMARY_FILE}")
|
||||
print(f"Top terms written to {TOP_TERMS_FILE}")
|
||||
print(f"Per-person year/keyword/topic details written to {DETAILS_DIR}/")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
analyze_sample()
|
||||
@@ -0,0 +1,121 @@
|
||||
name,field,rank,term,work_count
|
||||
Lucas Davi,keyword,1,Computer science,126
|
||||
Lucas Davi,keyword,2,Computer security,95
|
||||
Lucas Davi,keyword,3,Operating system,74
|
||||
Lucas Davi,keyword,4,Software,59
|
||||
Lucas Davi,keyword,5,Programming language,54
|
||||
Lucas Davi,keyword,6,Embedded system,45
|
||||
Lucas Davi,keyword,7,Code (set theory),32
|
||||
Lucas Davi,keyword,8,Exploit,30
|
||||
Lucas Davi,keyword,9,Engineering,20
|
||||
Lucas Davi,keyword,10,Control flow,20
|
||||
Lucas Davi,keyword,11,Overhead (engineering),18
|
||||
Lucas Davi,keyword,12,Code reuse,18
|
||||
Lucas Davi,keyword,13,Software engineering,17
|
||||
Lucas Davi,keyword,14,Reuse,17
|
||||
Lucas Davi,keyword,15,Software security assurance,13
|
||||
Lucas Davi,topic,1,Security and Verification in Computing,105
|
||||
Lucas Davi,topic,2,Advanced Malware Detection Techniques,91
|
||||
Lucas Davi,topic,3,Diamond and Carbon-based Materials Research,21
|
||||
Lucas Davi,topic,4,Network Security and Intrusion Detection,17
|
||||
Lucas Davi,topic,5,Physical Unclonable Functions (PUFs) and Hardware Security,16
|
||||
Lucas Davi,topic,6,Cloud Data Security Solutions,13
|
||||
Lucas Davi,topic,7,Blockchain Technology Applications and Security,12
|
||||
Lucas Davi,topic,8,Web Application Security Vulnerabilities,10
|
||||
Lucas Davi,topic,9,Distributed systems and fault tolerance,8
|
||||
Lucas Davi,topic,10,Digital and Cyber Forensics,7
|
||||
Lucas Davi,topic,11,Information and Cyber Security,7
|
||||
Lucas Davi,topic,12,Software Engineering Research,7
|
||||
Lucas Davi,topic,13,Software Testing and Debugging Techniques,6
|
||||
Lucas Davi,topic,14,Adversarial Robustness in Machine Learning,5
|
||||
Lucas Davi,topic,15,Cryptographic Implementations and Security,4
|
||||
Marcus Handte,keyword,1,Computer science,94
|
||||
Marcus Handte,keyword,2,Human–computer interaction,33
|
||||
Marcus Handte,keyword,3,Artificial intelligence,31
|
||||
Marcus Handte,keyword,4,Engineering,29
|
||||
Marcus Handte,keyword,5,Distributed computing,25
|
||||
Marcus Handte,keyword,6,Telecommunications,23
|
||||
Marcus Handte,keyword,7,Ubiquitous computing,22
|
||||
Marcus Handte,keyword,8,World Wide Web,22
|
||||
Marcus Handte,keyword,9,Computer security,20
|
||||
Marcus Handte,keyword,10,Context (archaeology),19
|
||||
Marcus Handte,keyword,11,Wireless,16
|
||||
Marcus Handte,keyword,12,Business,15
|
||||
Marcus Handte,keyword,13,Middleware (distributed applications),15
|
||||
Marcus Handte,keyword,14,Real-time computing,15
|
||||
Marcus Handte,keyword,15,Computer vision,12
|
||||
Marcus Handte,topic,1,Context-Aware Activity Recognition Systems,32
|
||||
Marcus Handte,topic,2,Indoor and Outdoor Localization Technologies,17
|
||||
Marcus Handte,topic,3,IoT and Edge/Fog Computing,14
|
||||
Marcus Handte,topic,4,Distributed systems and fault tolerance,11
|
||||
Marcus Handte,topic,5,Underwater Vehicles and Communication Systems,9
|
||||
Marcus Handte,topic,6,Human Mobility and Location-Based Analysis,9
|
||||
Marcus Handte,topic,7,Energy Efficient Wireless Sensor Networks,8
|
||||
Marcus Handte,topic,8,Robotics and Sensor-Based Localization,8
|
||||
Marcus Handte,topic,9,Advanced Software Engineering Methodologies,6
|
||||
Marcus Handte,topic,10,Service-Oriented Architecture and Web Services,6
|
||||
Marcus Handte,topic,11,Bluetooth and Wireless Communication Technologies,6
|
||||
Marcus Handte,topic,12,Opportunistic and Delay-Tolerant Networks,6
|
||||
Marcus Handte,topic,13,Energy Harvesting in Wireless Networks,6
|
||||
Marcus Handte,topic,14,Mobile Agent-Based Network Management,5
|
||||
Marcus Handte,topic,15,Transportation Planning and Optimization,5
|
||||
Arman Arzani,keyword,1,Computer science,4
|
||||
Arman Arzani,keyword,2,Data science,2
|
||||
Arman Arzani,keyword,3,World Wide Web,2
|
||||
Arman Arzani,keyword,4,Service (business),2
|
||||
Arman Arzani,keyword,5,Key (lock),2
|
||||
Arman Arzani,keyword,6,Search engine,1
|
||||
Arman Arzani,keyword,7,Identification (biology),1
|
||||
Arman Arzani,keyword,8,Citation,1
|
||||
Arman Arzani,keyword,9,Topic model,1
|
||||
Arman Arzani,keyword,10,Information retrieval,1
|
||||
Arman Arzani,keyword,11,Knowledge management,1
|
||||
Arman Arzani,keyword,12,Joint (building),1
|
||||
Arman Arzani,keyword,13,Value (mathematics),1
|
||||
Arman Arzani,keyword,14,Artificial intelligence,1
|
||||
Arman Arzani,keyword,15,Pattern recognition (psychology),1
|
||||
Arman Arzani,topic,1,Big Data and Business Intelligence,2
|
||||
Arman Arzani,topic,2,Education and Critical Thinking Development,1
|
||||
Arman Arzani,topic,3,Topic Modeling,1
|
||||
Arman Arzani,topic,4,Complex Network Analysis Techniques,1
|
||||
Arman Arzani,topic,5,Computational and Text Analysis Methods,1
|
||||
Arman Arzani,topic,6,Customer churn and segmentation,1
|
||||
Arman Arzani,topic,7,Semantic Web and Ontologies,1
|
||||
Arman Arzani,topic,8,Entrepreneurship Studies and Influences,1
|
||||
Arman Arzani,topic,9,"Genetics, Bioinformatics, and Biomedical Research",1
|
||||
Arman Arzani,topic,10,Biomedical and Engineering Education,1
|
||||
Arman Arzani,topic,11,Data Mining Algorithms and Applications,1
|
||||
Arman Arzani,topic,12,Advanced Text Analysis Techniques,1
|
||||
Arman Arzani,topic,13,Web visibility and informetrics,1
|
||||
Arman Arzani,topic,14,Advanced Software Engineering Methodologies,1
|
||||
Arman Arzani,topic,15,Green IT and Sustainability,1
|
||||
Pedro José Marrón,keyword,1,Computer science,264
|
||||
Pedro José Marrón,keyword,2,Computer network,107
|
||||
Pedro José Marrón,keyword,3,Distributed computing,91
|
||||
Pedro José Marrón,keyword,4,Telecommunications,90
|
||||
Pedro José Marrón,keyword,5,Wireless,83
|
||||
Pedro José Marrón,keyword,6,Engineering,80
|
||||
Pedro José Marrón,keyword,7,Artificial intelligence,78
|
||||
Pedro José Marrón,keyword,8,Wireless sensor network,70
|
||||
Pedro José Marrón,keyword,9,Real-time computing,52
|
||||
Pedro José Marrón,keyword,10,Operating system,47
|
||||
Pedro José Marrón,keyword,11,Human–computer interaction,45
|
||||
Pedro José Marrón,keyword,12,World Wide Web,36
|
||||
Pedro José Marrón,keyword,13,Embedded system,33
|
||||
Pedro José Marrón,keyword,14,Computer security,33
|
||||
Pedro José Marrón,keyword,15,Context (archaeology),30
|
||||
Pedro José Marrón,topic,1,Energy Efficient Wireless Sensor Networks,86
|
||||
Pedro José Marrón,topic,2,Context-Aware Activity Recognition Systems,50
|
||||
Pedro José Marrón,topic,3,Mobile Ad Hoc Networks,36
|
||||
Pedro José Marrón,topic,4,Opportunistic and Delay-Tolerant Networks,36
|
||||
Pedro José Marrón,topic,5,Modular Robots and Swarm Intelligence,33
|
||||
Pedro José Marrón,topic,6,Indoor and Outdoor Localization Technologies,29
|
||||
Pedro José Marrón,topic,7,Energy Harvesting in Wireless Networks,20
|
||||
Pedro José Marrón,topic,8,Robotics and Sensor-Based Localization,19
|
||||
Pedro José Marrón,topic,9,IoT and Edge/Fog Computing,17
|
||||
Pedro José Marrón,topic,10,Distributed and Parallel Computing Systems,15
|
||||
Pedro José Marrón,topic,11,Distributed systems and fault tolerance,14
|
||||
Pedro José Marrón,topic,12,Advanced Database Systems and Queries,13
|
||||
Pedro José Marrón,topic,13,Underwater Vehicles and Communication Systems,12
|
||||
Pedro José Marrón,topic,14,Robotic Path Planning Algorithms,12
|
||||
Pedro José Marrón,topic,15,Semantic Web and Ontologies,10
|
||||
|
Reference in New Issue
Block a user