From 6c3665623d7617a89ba603ddfe92935ed4c042f4 Mon Sep 17 00:00:00 2001 From: genja Date: Mon, 9 Nov 2026 16:49:18 +0100 Subject: [PATCH] splitted multiplicators and founding potential components --- webapp/src/app/app.routes.ts | 33 ++- .../multipliers-dashboard.component.html | 253 +++++++++++++++++ .../multipliers-dashboard.component.scss | 203 +++++++++++++ .../multipliers-dashboard.component.ts | 268 ++++++++++++++++++ .../researcher-network.component.html | 239 ++++++---------- .../researcher-network.component.scss | 119 ++------ .../multiplicator-researchers.resolver.ts | 91 ++++++ .../shared/ui/app-menu/app-menu.component.ts | 42 ++- .../methodology-note.component.html | 12 + .../methodology-note.component.scss | 64 +++++ .../methodology-note.component.ts | 13 + .../multiplier-role-labels.ts | 24 ++ .../multiplier-role-scores.component.html | 25 ++ .../multiplier-role-scores.component.scss | 21 ++ .../multiplier-role-scores.component.ts | 45 +++ 15 files changed, 1189 insertions(+), 263 deletions(-) create mode 100644 webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.html create mode 100644 webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.scss create mode 100644 webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.ts create mode 100644 webapp/src/app/resolvers/multiplicator-researchers.resolver.ts create mode 100644 webapp/src/app/shared/ui/methodology-note/methodology-note.component.html create mode 100644 webapp/src/app/shared/ui/methodology-note/methodology-note.component.scss create mode 100644 webapp/src/app/shared/ui/methodology-note/methodology-note.component.ts create mode 100644 webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-labels.ts create mode 100644 webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.html create mode 100644 webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.scss create mode 100644 webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.ts diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 702320d6..56f2575e 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -3,8 +3,8 @@ import { guestOnlyGuard } from './shared/guards/guest-only.guard'; import { personListResolver } from './resolvers/person-list.resolver'; import { founderStatisticsResolver } from './resolvers/founder-statistics.resolver'; import { founderCandidatesResolver } from './resolvers/founder-candidates.resolver'; -import { multiplierResearcherResolver } from './resolvers/multiplier-researcher.resolver'; -import { multiplierResearcherNetworkResolver } from './resolvers/multiplier-researcher-network.resolver'; +import { multiplierResearcherPageResolver } from './resolvers/multiplier-researcher-page.resolver'; +import { multiplicatorResearchersResolver } from './resolvers/multiplicator-researchers.resolver'; import { personBioResolver } from './resolvers/person-bio.resolver'; import { personPatentsResolver } from './resolvers/person-patents.resolver'; import { personResolver } from './resolvers/person.resolver'; @@ -140,6 +140,25 @@ export const routes: Routes = [ (mod) => mod.CompareAuthorsComponent, ), }, + { + path: 'multipliers', + canActivate: [ + roleGuard([ + UserRole.User, + UserRole.Manager, + UserRole.Admin, + UserRole.SuperAdmin, + ]), + ], + loadComponent: () => + import( + './modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component' + ).then((mod) => mod.MultipliersDashboardComponent), + resolve: { + researchers: multiplicatorResearchersResolver, + }, + runGuardsAndResolvers: 'paramsOrQueryParamsChange', + }, { path: 'founders', canActivate: [ @@ -158,12 +177,7 @@ export const routes: Routes = [ statistics: founderStatisticsResolver, candidates: founderCandidatesResolver, }, - runGuardsAndResolvers: (from, to) => { - const keys = ['threshold', 'screened', 'page', 'size', 'sortBy', 'sortOrder']; - return keys.some( - (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), - ); - }, + runGuardsAndResolvers: 'paramsOrQueryParamsChange', }, { path: 'founders/:authorId', @@ -180,8 +194,7 @@ export const routes: Routes = [ './modules/founder-potential/researcher-network/researcher-network.component' ).then((mod) => mod.ResearcherNetworkComponent), resolve: { - researcher: multiplierResearcherResolver, - network: multiplierResearcherNetworkResolver, + page: multiplierResearcherPageResolver, }, runGuardsAndResolvers: (from, to) => from.params['authorId'] !== to.params['authorId'], diff --git a/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.html b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.html new file mode 100644 index 00000000..99ee0dbf --- /dev/null +++ b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.html @@ -0,0 +1,253 @@ + +
+ +

+ Datenbasis: Die UDE-Kohorte umfasst die Universität und + acht zugehörige Einrichtungen. Forschende werden anhand jüngerer + OpenAlex-Affiliationen ausgewählt; ihre Publikationen und + Koautorenschaften werden anschließend institutionsübergreifend + ausgewertet. Die Rollen-Scores vergleichen nur Personen derselben + Karrierestufe. +

+
    +
  • + Bridger: Netzwerkvermittlung, Verbindungen zwischen + Fachgebieten und Institutionen. +
  • +
  • + Mentor: gemeinsame Publikationen mit Nachwuchs sowie + Hinweise auf Betreuung und deren berufliche Entwicklung. +
  • +
  • + Amplifier: Industriekooperationen, verknüpfte + Patente, EU-Projekte und relevante Medienerwähnungen. +
  • +
+

+ Rohmetriken werden zunächst innerhalb der vier Karrierestufen + Early, Emerging, Established, Senior in Peer-Ränge + umgerechnet. Die drei Rollen-Scores sind gewichtete Mittel dieser Ränge: + Bridger (35 % Betweenness, 25 % Brokerage, 20 % + Feldbreite, 20 % institutionsübergreifende Zusammenarbeit), Mentor + (35 % Nachwuchs, 25 % Mentoring-Rate, 25 % typische + Autor:innenrollen, 15 % Nachwuchsentwicklung) und Amplifier + (50 % Industrie, 25 % Patente, 15 % EU-Projekte, + 10 % Medien). Ab 85 % und mindestens zwei aktiven Jahren wird + ein Badge vergeben. Ein Score beschreibt ein relatives Signal, keinen + kausalen Nachweis. +

+

+ Die aktuelle Multiplikator-Auswertung ist für die definierte UDE-Kohorte + berechnet. Für andere Universitäten erscheinen Daten erst, wenn deren + Kohorte ebenfalls durch die Pipeline verarbeitet wurde. +

+
+ +
+ + +
+ + Name suchen + + {{ SEARCH_ICON }} + + + + Rollen-Badge + + @for (role of roleOptions; track role.value) { + {{ role.label }} + } + + + + + Karrierestufe + + @for (bucket of careerOptions; track bucket) { + {{ bucket }} + } + + + + + Rolle für Mindest-Rang + + @for (field of peerRankFields; track field.value) { + {{ + field.label + }} + } + + + +
+ + + + +
+
+ +
+ + {{ fmtInt(pageTotal()) }} + {{ pageTotal() === 1 ? 'Forschende:r' : 'Forschende' }} + + + +
+
+
+
+ +
+
+
+

Multiplikator:innen in der Kohorte

+

+ Nach dem stärksten Rollen-Rang sortiert. Öffne das Netzwerk, um + Kooperationen und die zugrunde liegenden Metriken anzusehen. +

+
+
+ + + + @if (rows().length > 0) { + + } @else if ( + pageTotal() === 0 && + selectedTags().length === 0 && + selectedCareerBuckets().length === 0 && + !nameDraft() && + appliedMinPeerRank() === 0 + ) { +
+ hub +

Noch keine Multiplikator-Daten

+

+ Für die {{ universityName() }} wurden noch + keine Multiplikator-Scores berechnet. +

+
+ } @else { +
+

Keine passenden Forschenden gefunden

+

+ Ändere oder entferne einen Filter, um weitere Ergebnisse zu + sehen. +

+
+ } +
+
+ + +
+
+
+ + +
+ {{ row.name }} + + {{ fmtInt(row.nWorks) }} Publikationen · + {{ fmtInt(row.activeYears) }} aktive Jahre + @if (row.researcher.suspicious_profile) { + · Profil mit möglicher Zusammenführung + } + +
+
+ + + + + + + @if (row.tags.length) { +
+ @for (tag of row.tags; track tag) { + + {{ tagLabel(tag) }} + + } +
+ } @else { + – + } +
+ + + + + {{ fmtSubScore(row.max) }} + + + + + + diff --git a/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.scss b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.scss new file mode 100644 index 00000000..06426990 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.scss @@ -0,0 +1,203 @@ +.multipliers-dashboard { + width: 100%; + min-width: 0; +} + +.filters-section, +.table-section { + margin-top: 28px; +} + +.filters-card, +.table-card { + background: var(--sg-surface-muted); +} + +.filters-card .mat-mdc-card-content { + padding: 16px 18px; +} + +.filters-grid { + display: grid; + grid-template-columns: minmax(190px, 1.4fr) repeat(3, minmax(150px, 1fr)) minmax(190px, 1.1fr); + gap: 12px; + align-items: center; + + mat-form-field { + width: 100%; + } + + .name-filter { + min-width: 0; + } +} + +.rank-filter { + min-width: 0; + padding: 0 8px; + + label { + display: block; + margin-bottom: 2px; + color: var(--sg-text-muted); + font-size: 12px; + font-weight: 500; + } + + mat-slider { + width: 100%; + } +} + +.filter-actions { + display: flex; + justify-content: flex-end; + align-items: center; + gap: 8px; + + .result-count { + margin-right: auto; + color: var(--sg-text-soft); + font-size: 12.5px; + font-variant-numeric: tabular-nums; + } + + mat-icon { + margin-right: 4px; + } +} + +.section-heading { + display: flex; + align-items: flex-end; + justify-content: space-between; + margin-bottom: 12px; + + h2 { + margin: 0 0 4px; + color: var(--sg-text); + font-size: var(--sg-section-title-size, clamp(17px, 1.3vw, 19px)); + font-weight: var(--sg-section-title-weight, 700); + line-height: var(--sg-section-title-line-height, 1.3); + } + + .note { + margin: 0; + color: var(--sg-text-muted); + font-size: 13px; + } +} + +.table-card { + overflow: hidden; + + .mat-mdc-card-content { + padding: 0; + } +} + +.person-cell { + display: flex; + flex-direction: column; + gap: 3px; + min-width: 160px; + + &__name { + color: var(--sg-text); + font-weight: 600; + } + + &__meta { + color: var(--sg-text-soft); + font-size: 11.5px; + white-space: nowrap; + } +} + +.warning { + color: var(--sg-warning); +} + +.tags-cell { + display: flex; + flex-wrap: wrap; + gap: 5px; +} + +.muted { + color: var(--sg-text-soft); +} + +.max-score { + display: inline-flex; + align-items: center; + gap: 8px; + min-width: 105px; + color: var(--sg-text); + font-size: 12px; + font-variant-numeric: tabular-nums; + + .mat-mdc-progress-bar { + --mat-progress-bar-track-height: 7px; + --mat-progress-bar-active-indicator-height: 7px; + --mat-progress-bar-track-color: var(--sg-surface-soft); + --mat-progress-bar-active-indicator-color: var(--sg-success); + width: 62px; + } +} + +.empty-state { + display: flex; + min-height: 190px; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 28px; + text-align: center; + + mat-icon { + width: 34px; + height: 34px; + color: var(--sg-text-soft); + font-size: 34px; + } + + h3 { + margin: 10px 0 5px; + color: var(--sg-text); + font-size: 18px; + } + + p { + max-width: 60ch; + margin: 0; + color: var(--sg-text-muted); + font-size: 13px; + } + + strong { + color: var(--sg-text); + } + + &--filtered { + min-height: 130px; + } +} + +@media (max-width: 1100px) { + .filters-grid { + grid-template-columns: repeat(2, minmax(180px, 1fr)); + } +} + +@media (max-width: 640px) { + .filters-grid { + grid-template-columns: 1fr; + gap: 2px; + } + + .filter-actions { + flex-wrap: wrap; + } + +} diff --git a/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.ts b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.ts new file mode 100644 index 00000000..a97e79ce --- /dev/null +++ b/webapp/src/app/modules/founder-potential/multipliers-dashboard/multipliers-dashboard.component.ts @@ -0,0 +1,268 @@ +import { + Component, + computed, + effect, + inject, + input, + signal, + TemplateRef, + viewChild, +} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router, RouterModule } from '@angular/router'; +import { toSignal } from '@angular/core/rxjs-interop'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSliderModule } from '@angular/material/slider'; +import { MatTooltipModule } from '@angular/material/tooltip'; + +import { + CareerBucket, + MultiplierTag, + PeerRankField, + ResearcherSortBy, + ResearcherSummary, + ResearcherSummaryPage, +} from '../../../api'; +import { fmtInt, fmtSubScore, tagDescription, tagLabel } from '../founder-potential.utils'; +import { ChipComponent } from '../../../shared/ui/chip/chip.component'; +import { + DataTableComponent, + GenericColumn, +} from '../../../shared/ui/data-table/data-table.component'; +import { MethodologyNoteComponent } from '../../../shared/ui/methodology-note/methodology-note.component'; +import { PageContainerComponent } from '../../../shared/ui/page-container/page-container.component'; +import { MultiplierRoleScoresComponent } from '../../../shared/ui/multiplier-role-scores/multiplier-role-scores.component'; +import { QueryParamPaginatorComponent } from '../../../shared/ui/query-param-paginator/query-param-paginator.component'; +import { CredentialService } from '../../../shared/services/credential.service'; +import { NETWORK_ICON, SEARCH_ICON } from '../../../shared/ui/icons'; + +const FALLBACK_UNIVERSITY = 'Universität Duisburg-Essen'; + +interface MultiplierRow { + researcher: ResearcherSummary; + name: string; + careerBucket: string; + activeYears: number; + nWorks: number; + tags: string[]; + max: number; +} + +@Component({ + selector: 'app-multipliers-dashboard', + standalone: true, + imports: [ + CommonModule, + RouterModule, + MatButtonModule, + MatCardModule, + MatFormFieldModule, + MatIconModule, + MatInputModule, + MatProgressBarModule, + MatSelectModule, + MatSliderModule, + MatTooltipModule, + ChipComponent, + DataTableComponent, + MethodologyNoteComponent, + PageContainerComponent, + MultiplierRoleScoresComponent, + QueryParamPaginatorComponent, + ], + templateUrl: './multipliers-dashboard.component.html', + styleUrl: './multipliers-dashboard.component.scss', +}) +export class MultipliersDashboardComponent { + readonly NETWORK_ICON = NETWORK_ICON; + readonly SEARCH_ICON = SEARCH_ICON; + + readonly researchers = input.required(); + + private readonly router = inject(Router); + private readonly route = inject(ActivatedRoute); + private readonly credentials = inject(CredentialService, { optional: true }); + + private readonly queryParams = toSignal(this.route.queryParamMap, { + initialValue: this.route.snapshot.queryParamMap, + }); + + readonly universityName = computed( + () => this.credentials?.organizationName() || FALLBACK_UNIVERSITY, + ); + readonly pageTotal = computed(() => this.researchers().total ?? 0); + readonly nameDraft = signal(''); + readonly minPeerRankDraft = signal(0); + + readonly selectedTags = computed(() => this.queryParams().getAll('tag')); + readonly selectedCareerBuckets = computed(() => + this.queryParams().getAll('careerBucket'), + ); + readonly selectedPeerRankField = computed( + () => this.queryParams().get('peerRankField') ?? PeerRankField.Max, + ); + readonly appliedMinPeerRank = computed( + () => Math.round((toNumber(this.queryParams().get('minPeerRank')) ?? 0) * 100), + ); + + readonly roleOptions = [ + { value: MultiplierTag.Bridger, label: tagLabel(MultiplierTag.Bridger) }, + { value: MultiplierTag.Mentor, label: tagLabel(MultiplierTag.Mentor) }, + { value: MultiplierTag.Amplifier, label: tagLabel(MultiplierTag.Amplifier) }, + ]; + readonly careerOptions = Object.values(CareerBucket); + readonly peerRankFields = [ + { value: PeerRankField.Max, label: 'Stärkste Rolle' }, + { value: PeerRankField.Bridger, label: tagLabel(MultiplierTag.Bridger) }, + { value: PeerRankField.Mentor, label: tagLabel(MultiplierTag.Mentor) }, + { value: PeerRankField.Amplifier, label: tagLabel(MultiplierTag.Amplifier) }, + ]; + + constructor() { + effect(() => { + this.nameDraft.set(this.queryParams().get('name') ?? ''); + this.minPeerRankDraft.set(this.appliedMinPeerRank()); + }, { allowSignalWrites: true }); + } + + private readonly nameTemplate = + viewChild.required>('nameTemplate'); + private readonly rolesTemplate = + viewChild.required>('rolesTemplate'); + private readonly tagsTemplate = + viewChild.required>('tagsTemplate'); + private readonly maxTemplate = + viewChild.required>('maxTemplate'); + private readonly actionTemplate = + viewChild.required>('actionTemplate'); + + readonly rows = computed(() => + (this.researchers().elements ?? []).map((researcher) => ({ + researcher, + name: researcher.display_name ?? researcher.author_id, + careerBucket: researcher.career_bucket ?? '–', + activeYears: researcher.active_years ?? 0, + nWorks: researcher.n_works ?? 0, + tags: researcher.tags ?? [], + max: researcher.max_multiplier_peer_rank ?? 0, + })), + ); + + readonly columns = computed[]>(() => [ + { + id: 'name', + header: 'Forschende:r', + type: 'display', + cellTemplate: this.nameTemplate(), + }, + { + id: 'roles', + header: 'Multiplikator-Rollen', + type: 'display', + cellTemplate: this.rolesTemplate(), + }, + { + id: 'tags', + header: 'Badges', + type: 'display', + cellTemplate: this.tagsTemplate(), + }, + { + id: ResearcherSortBy.Max, + header: 'Stärkster Rang', + type: 'accessor', + accessorKey: 'max', + cellTemplate: this.maxTemplate(), + }, + { + id: 'network', + header: '', + type: 'display', + cellTemplate: this.actionTemplate(), + }, + ]); + + readonly formatPercent = (value: number): string => `${value}%`; + readonly fmtInt = fmtInt; + readonly fmtSubScore = fmtSubScore; + readonly tagLabel = tagLabel; + readonly tagDescription = tagDescription; + + onNameInput(event: Event): void { + this.nameDraft.set((event.target as HTMLInputElement).value); + } + + onMinRankInput(value: number): void { + this.minPeerRankDraft.set(value); + } + + onFilterCommit(): void { + const rank = this.minPeerRankDraft(); + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { + name: this.nameDraft().trim() || null, + minPeerRank: rank > 0 ? rank / 100 : null, + peerRankField: this.selectedPeerRankField() || PeerRankField.Max, + page: 0, + }, + queryParamsHandling: 'merge', + }); + } + + onTagsChange(values: string[]): void { + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { tag: values.length ? values : null, page: 0 }, + queryParamsHandling: 'merge', + }); + } + + onCareerBucketsChange(values: string[]): void { + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { careerBucket: values.length ? values : null, page: 0 }, + queryParamsHandling: 'merge', + }); + } + + onPeerRankFieldChange(value: string): void { + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { peerRankField: value, page: 0 }, + queryParamsHandling: 'merge', + }); + } + + openNetwork(row: MultiplierRow): void { + void this.router.navigate(['/founders', row.researcher.author_id]); + } + + clearFilters(): void { + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { + tag: null, + careerBucket: null, + name: null, + minPeerRank: null, + peerRankField: PeerRankField.Max, + suspiciousProfile: null, + page: 0, + }, + queryParamsHandling: 'merge', + }); + } +} + +function toNumber(value: string | null): number | null { + if (value === null || value === '') return null; + const parsed = Number(value); + return Number.isFinite(parsed) && parsed >= 0 && parsed <= 1 ? parsed : null; +} diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html index 319187b2..e092b0ba 100644 --- a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html @@ -1,25 +1,28 @@ + + + {{ ARROW_BACK_ICON }} + Zurück zu den Multiplikatoren + +
@if (unavailable(); as empty) { {{ PERSON_OFF_ICON }} -

{{ empty.title }}

-

{{ empty.body }}

@if (empty.hint) {

{{ empty.hint }}

} - +
} @else { -
-

- Smart-Guide · Multiplikator-Detektion · {{ universityName() }} -

-

{{ name() }}

+
@if (careerBucket()) { } - {{ fmtInt(nWorks()) }} Publikationen · - {{ fmtInt(activeYears()) }} aktive Jahre + + {{ fmtInt(nWorks()) }} Publikationen · + {{ fmtInt(activeYears()) }} aktive Jahre + @if (suspicious()) { - {{ WARNING_ICON }} Zusammengeführtes - Profil + + {{ WARNING_ICON }} + Zusammengeführtes Profil · Daten vorsichtig interpretieren + }
@if (tags().length) { @@ -50,7 +53,25 @@ }
} - + + + +

+ Für das Diagramm werden Koautor:innen-Paare aus Publikationen zu einem + gewichteten Netzwerk verbunden. Arbeiten mit mehr als 50 Autor:innen + werden nur aus dem Graphen ausgeschlossen (sie zählen weiterhin für + Publikations- und Karrierewerte); ältere Kanten werden mit 0,8 pro Jahr + abgewichtet. Gezeigt werden bis zu 42 starke Koautor:innen, wobei + Nachwuchs-Koautor:innen bevorzugt aufgenommen werden. +

+

+ Die drei Rollen-Scores sind gewichtete Mittel von Metrik-Perzentilen + gegenüber Forschenden derselben Karrierestufe an der + {{ universityName() }}. Ein Score von 85 % ist + damit ein relativer Peer-Rang, kein kausaler Nachweis. Die Badges + markieren Rollen-Scores ab 85 %. +

+
@for (entry of roleLegend(); track entry.role) { @@ -62,13 +83,14 @@ {{ entry.label }} } - Kollaboration (Breite = Stärke) - überwiegend - institutionsübergreifend + + + Kollaboration (Breite = Stärke) + + + + überwiegend institutionsübergreifend + Knotengröße = aktive Jahre
@@ -88,143 +110,62 @@
Kein Netzwerk verfügbar.
}
- {{ fmtInt(netMeta().shown) }} der + {{ fmtInt(netMeta().shown) }} von {{ fmtInt(netMeta().totalCoauthors) }} Koautor:innen dargestellt · - {{ fmtInt(netMeta().cohortCoauthors) }} aus der UDE-Kohorte · - {{ fmtInt(netMeta().mentees) }} Mentees + {{ fmtInt(netMeta().cohortCoauthors) }} aus der + Universitätskohorte · {{ fmtInt(netMeta().mentees) }} Mentees
-
-
-

Multiplikator-Scores

-

- Rang gegen Peers dieser Universität, gleiche Karrierestufe. - Schwelle: 85. -

- @for (s of subScores(); track s.key) { - - } -
+
+

Multiplikator-Rollen

+

+ Peer-Rang innerhalb derselben Karrierestufe. Die gestrichelte + Markierung zeigt die Badge-Schwelle von 85 %. +

+ +
-
-

Gründungspotenzial

-

- Rang gegen ~9.000 Wissenschaftler:innen an anderen - Universitäten. -

- - - - - @if ( - founder().timingApplicable && founder().yearsToFounding !== null - ) { -

- @if ((founder().yearsToFounding ?? 0) <= 0) { - Das Aktivitätsmuster wirkt bereits gründungsbereit. - } @else { - Voraussichtlich in - {{ fmt1(founder().yearsToFounding) }} Jahren gründungsreif. - } -

- } -
- -
- Publikationen {{ fmtInt(facts().pubs) }} - Patente {{ fmtInt(facts().patents) }} - Industrie-Publikationen - {{ fmtInt(facts().industry) }} - Förderungen {{ fmtInt(facts().grants) }} - aktive Jahre {{ fmtInt(facts().activeYears) }} -
- -
-

Metriken im Detail

-

- Jeder Rohwert steht neben seinem Peer-Rang (0–1), damit - nachvollziehbar bleibt, warum eine Person so eingestuft wurde. -

-
- - - - - - - - - - - - - - - - - - -
Metrik{{ row.label }}Wert - {{ fmtMetricValue(row.metric.raw) }} - - Peer-Rang - - {{ fmtPeerRank(row.metric.peer_rank) }} -
-
-
-
+
+

Metriken im Detail

+

+ Rohwerte und zugehörige Peer-Ränge zeigen, welche Netzwerk- und + Kooperationssignale in die Rollen-Scores einfließen. +

+ +
- Konfiguration + Netzwerk-Konfiguration {{ network()?.config_hash ?? '–' }} · berechnet - am - {{ - network()?.computed_at | date: 'dd.MM.yyyy HH:mm' - }} + {{ network()?.computed_at | date: 'dd.MM.yyyy HH:mm' }}
} +
+ + + {{ row.label }} + + + + {{ fmtMetricValue(row.metric.raw) }} + + + + + {{ fmtPeerRank(row.metric.peer_rank) }} + + diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss index 8cfa7d8b..e1cacfe8 100644 --- a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss @@ -1,7 +1,6 @@ .researcher-network { - max-width: 1440px; - margin: 0 auto; - padding: 24px 8px 64px; + width: 100%; + min-width: 0; } .back-link { @@ -21,26 +20,6 @@ } } -.page { - max-width: 72ch; - - .eyebrow { - font-size: 11px; - letter-spacing: 0.14em; - text-transform: uppercase; - color: var(--sg-text-soft); - margin: 0 0 10px; - } - - h1 { - font-size: 30px; - line-height: 1.15; - margin: 0 0 12px; - font-weight: 700; - color: var(--sg-text); - } -} - .meta-line { display: flex; flex-wrap: wrap; @@ -159,15 +138,14 @@ .panel { display: flex; flex-direction: column; - gap: 22px; + gap: 12px; - h3 { - font-size: 11px; - letter-spacing: 0.12em; - text-transform: uppercase; - color: var(--sg-text-soft); - margin: 0 0 8px; - font-weight: 600; + h2 { + margin: 0; + color: var(--sg-text); + font-size: var(--sg-section-title-size, clamp(17px, 1.3vw, 19px)); + font-weight: var(--sg-section-title-weight, 700); + line-height: var(--sg-section-title-line-height, 1.3); } } @@ -178,71 +156,33 @@ line-height: 1.45; } -.timing-note { - font-size: 12.5px; - color: var(--sg-success); - margin: 2px 0 0; -} - -.facts { - display: flex; - flex-wrap: wrap; - gap: 7px; - - b { - color: var(--sg-text); - font-variant-numeric: tabular-nums; - } -} - .metrics { min-width: 0; -} + margin-top: 24px; -.scroller { - overflow-x: auto; -} - -table.mx { - width: 100%; - background: transparent; - font-size: 12px; - - .mat-mdc-header-cell { - padding: 0 7px; - height: 20px; - color: var(--sg-text-soft); - font-weight: 600; - font-size: 11px; - text-transform: uppercase; - letter-spacing: 0.06em; - } - - .mat-mdc-cell { - color: var(--sg-text-muted); - vertical-align: middle; - line-height: 1.2; - } - .mat-mdc-row { - height: 25px; - } - - .num { - text-align: right; - font-variant-numeric: tabular-nums; + h2 { + margin: 0 0 6px; color: var(--sg-text); - white-space: nowrap; + font-size: var(--sg-section-title-size, clamp(17px, 1.3vw, 19px)); + font-weight: var(--sg-section-title-weight, 700); + line-height: var(--sg-section-title-line-height, 1.3); + } +} - &.hot { - font-weight: 700; - color: var(--sg-success); - } +.num { + font-variant-numeric: tabular-nums; + color: var(--sg-text); + white-space: nowrap; + + &.hot { + font-weight: 700; + color: var(--sg-success); } } .unavailable { margin-top: 32px; - max-width: 68ch; + width: 100%; background: var(--sg-surface-muted); .mat-mdc-card-content { @@ -257,13 +197,6 @@ table.mx { margin-bottom: 10px; } - h1 { - font-size: 24px; - line-height: 1.2; - margin: 0 0 10px; - color: var(--sg-text); - } - &__body { font-size: 15px; line-height: 1.55; diff --git a/webapp/src/app/resolvers/multiplicator-researchers.resolver.ts b/webapp/src/app/resolvers/multiplicator-researchers.resolver.ts new file mode 100644 index 00000000..324f6f45 --- /dev/null +++ b/webapp/src/app/resolvers/multiplicator-researchers.resolver.ts @@ -0,0 +1,91 @@ +import { inject } from '@angular/core'; +import { ResolveFn } from '@angular/router'; + +import { + CareerBucket, + MultiplierTag, + MultiplicatorsService, + PeerRankField, + ResearcherSortBy, + ResearcherSummaryPage, + SortDirection, +} from '../api'; + +const VALID_TAGS = Object.values(MultiplierTag); +const VALID_CAREER_BUCKETS = Object.values(CareerBucket); +const VALID_PEER_RANK_FIELDS = Object.values(PeerRankField); +const VALID_SORT_FIELDS = Object.values(ResearcherSortBy); + +/** + * Cohort-wide multiplier table, driven by URL params so filter, pagination, + * and sort changes re-query Elasticsearch on the server. + */ +export const multiplicatorResearchersResolver: ResolveFn = ( + route, +) => { + const service = inject(MultiplicatorsService); + const params = route.queryParamMap; + + const page = toInt(params.get('page'), 0); + const size = toInt(params.get('size'), 25); + const tags = validValues(params.getAll('tag'), VALID_TAGS); + const careerBuckets = validValues( + params.getAll('careerBucket'), + VALID_CAREER_BUCKETS, + ); + const minPeerRank = toNumber(params.get('minPeerRank')); + const peerRankField = validValue( + params.get('peerRankField'), + VALID_PEER_RANK_FIELDS, + PeerRankField.Max, + ); + const name = params.get('name')?.trim() || undefined; + const sortBy = validValue( + params.get('sortBy'), + VALID_SORT_FIELDS, + ResearcherSortBy.Max, + ); + const sortOrder = params.get('sortOrder') === SortDirection.Asc + ? SortDirection.Asc + : SortDirection.Desc; + const suspiciousRaw = params.get('suspiciousProfile'); + const suspiciousProfile = + suspiciousRaw === 'true' ? true : suspiciousRaw === 'false' ? false : undefined; + + return service.searchMultiplicatorResearchers( + page, + size, + tags.length ? tags : undefined, + careerBuckets.length ? careerBuckets : undefined, + minPeerRank ?? undefined, + peerRankField, + suspiciousProfile, + name, + sortBy, + sortOrder, + ); +}; + +function toInt(value: string | null, fallback: number): number { + if (!value) return fallback; + const parsed = Number.parseInt(value, 10); + return Number.isFinite(parsed) && parsed >= 0 ? parsed : fallback; +} + +function toNumber(value: string | null): number | null { + if (value === null || value === '') return null; + const parsed = Number(value); + return Number.isFinite(parsed) && parsed >= 0 && parsed <= 1 ? parsed : null; +} + +function validValues(values: string[], valid: readonly T[]): T[] { + return values.filter((value): value is T => valid.includes(value as T)); +} + +function validValue( + value: string | null, + valid: readonly T[], + fallback: T, +): T { + return value && valid.includes(value as T) ? (value as T) : fallback; +} diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts index 0c478cb4..9862db54 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts @@ -32,6 +32,7 @@ import { LOGOUT_ICON, MANAGE_ACCOUNTS_ICON, NEWS_ICON, + NETWORK_ICON, ORGANIZATIONS_ICON, PATENT_ICON, PERSONS_ICON, @@ -100,12 +101,18 @@ export class AppMenuComponent { isItemActive(item: NavItem): boolean { const path = this.currentPath(); + // `/founders/:authorId` is the multiplier-network detail route. Do not + // highlight the founder-potential dashboard for that path. + if (item.route === '/founders' && path.startsWith('/founders/')) { + return false; + } + if ((item.detailRoutePrefixes ?? []).some((prefix) => path.startsWith(prefix))) { + return true; + } if (path === item.route || path.startsWith(`${item.route}/`)) { return true; } - return (item.detailRoutePrefixes ?? []).some((prefix) => - path.startsWith(prefix), - ); + return false; } readonly navItems = computed(() => { @@ -116,14 +123,6 @@ export class AppMenuComponent { route: '/dashboard', disabled: false, }, - { - label: 'Gründungspotenzial', - icon: FOUNDER_ICON, - route: '/founders', - disabled: false, - queryParams: { threshold: 90, screened: 'true', page: 0, size: 25 }, - detailRoutePrefixes: ['/founders/'], - }, { label: 'Personen', icon: PERSONS_ICON, @@ -225,6 +224,27 @@ export class AppMenuComponent { route: '/hierarchy', disabled: false, }, + { + label: 'Gründungspotenzial', + icon: FOUNDER_ICON, + route: '/founders', + disabled: false, + queryParams: { threshold: 90, screened: 'true', page: 0, size: 25 }, + }, + { + label: 'Multiplikatoren', + icon: NETWORK_ICON, + route: '/multipliers', + disabled: false, + queryParams: { + page: 0, + size: 25, + sortBy: 'max', + sortOrder: 'desc', + peerRankField: 'max', + }, + detailRoutePrefixes: ['/founders/'], + }, { label: 'Accounts', icon: MANAGE_ACCOUNTS_ICON, diff --git a/webapp/src/app/shared/ui/methodology-note/methodology-note.component.html b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.html new file mode 100644 index 00000000..89d8c91b --- /dev/null +++ b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.html @@ -0,0 +1,12 @@ + + + + info + Datenbasis & Methodik + + Wie diese Ergebnisse entstanden sind + +
+ +
+
diff --git a/webapp/src/app/shared/ui/methodology-note/methodology-note.component.scss b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.scss new file mode 100644 index 00000000..6d5ce999 --- /dev/null +++ b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.scss @@ -0,0 +1,64 @@ +:host { + display: block; + margin-top: 18px; +} + +.methodology-note { + background: var(--sg-surface-muted); + border: 1px solid var(--sg-border); + box-shadow: none; + + mat-panel-title { + align-items: center; + gap: 8px; + color: var(--sg-text); + font-size: 13px; + font-weight: 600; + } + + mat-panel-description { + color: var(--sg-text-soft); + font-size: 12px; + } + + mat-icon { + width: 18px; + height: 18px; + font-size: 18px; + color: var(--sg-blue-highlight); + } + + &__content { + color: var(--sg-text-muted); + font-size: 13px; + line-height: 1.55; + } +} + +:host ::ng-deep .methodology-note__content p { + margin: 0 0 10px; +} + +:host ::ng-deep .methodology-note__content p:last-child { + margin-bottom: 0; +} + +:host ::ng-deep .methodology-note__content ul { + margin: 8px 0 10px; + padding-left: 20px; +} + +:host ::ng-deep .methodology-note__content li + li { + margin-top: 4px; +} + +:host ::ng-deep .methodology-note__content strong { + color: var(--sg-text); + font-weight: 600; +} + +@media (max-width: 700px) { + .methodology-note mat-panel-description { + display: none; + } +} diff --git a/webapp/src/app/shared/ui/methodology-note/methodology-note.component.ts b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.ts new file mode 100644 index 00000000..355294c6 --- /dev/null +++ b/webapp/src/app/shared/ui/methodology-note/methodology-note.component.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatIconModule } from '@angular/material/icon'; + +/** A consistent, collapsible methodology note used by data-heavy views. */ +@Component({ + selector: 'app-methodology-note', + standalone: true, + imports: [MatExpansionModule, MatIconModule], + templateUrl: './methodology-note.component.html', + styleUrl: './methodology-note.component.scss', +}) +export class MethodologyNoteComponent {} diff --git a/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-labels.ts b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-labels.ts new file mode 100644 index 00000000..6c2462ed --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-labels.ts @@ -0,0 +1,24 @@ +/** Stable role names used by the multiplier model. */ +export const MULTIPLIER_TAG_LABELS: Record = { + bridger: 'Bridger', + mentor: 'Mentor', + amplifier: 'Amplifier', +}; + +/** Coach-facing descriptions for the three multiplier archetypes. */ +export const MULTIPLIER_TAG_DESCRIPTIONS: Record = { + bridger: + 'Verbindet Forschungsgruppen, Fachgebiete oder Institutionen, die sonst wenig zusammenarbeiten.', + mentor: + 'Publiziert mit Nachwuchsforschenden und zeigt Signale für deren Förderung und Entwicklung.', + amplifier: + 'Trägt Wissen über Industriekooperationen, Patente, EU-Projekte und Medienresonanz nach außen.', +}; + +export function multiplierTagLabel(tag: string): string { + return MULTIPLIER_TAG_LABELS[tag] ?? tag; +} + +export function multiplierTagDescription(tag: string): string { + return MULTIPLIER_TAG_DESCRIPTIONS[tag] ?? MULTIPLIER_TAG_LABELS[tag] ?? tag; +} diff --git a/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.html b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.html new file mode 100644 index 00000000..7e6095d8 --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.html @@ -0,0 +1,25 @@ +@if (presentation() === 'compact') { +
+ @for (role of roles(); track role.key) { + + {{ role.label }} {{ role.display }} + + } +
+} @else { +
+ @for (role of roles(); track role.key) { + + } +
+} diff --git a/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.scss b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.scss new file mode 100644 index 00000000..72f126e6 --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.scss @@ -0,0 +1,21 @@ +.role-scores { + &--compact { + display: flex; + flex-wrap: wrap; + gap: 5px; + align-items: center; + font-size: 11px; + + b { + color: var(--sg-text); + font-variant-numeric: tabular-nums; + margin-left: 3px; + } + } + + &--detailed { + display: flex; + flex-direction: column; + gap: 2px; + } +} diff --git a/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.ts b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.ts new file mode 100644 index 00000000..b002d53f --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-role-scores/multiplier-role-scores.component.ts @@ -0,0 +1,45 @@ +import { Component, computed, input } from '@angular/core'; +import { MatTooltipModule } from '@angular/material/tooltip'; + +import { MultiplierPeerRanks } from '../../../api'; +import { ChipComponent } from '../chip/chip.component'; +import { ScoreBarComponent } from '../score-bar/score-bar.component'; +import { + multiplierTagDescription, + multiplierTagLabel, +} from './multiplier-role-labels'; + +const ROLE_KEYS = ['bridger', 'mentor', 'amplifier'] as const; + +/** Reusable compact or detailed rendering of the three multiplier roles. */ +@Component({ + selector: 'app-multiplier-role-scores', + standalone: true, + imports: [MatTooltipModule, ChipComponent, ScoreBarComponent], + templateUrl: './multiplier-role-scores.component.html', + styleUrl: './multiplier-role-scores.component.scss', +}) +export class MultiplierRoleScoresComponent { + readonly scores = input(null); + readonly presentation = input<'compact' | 'detailed'>('detailed'); + readonly showThreshold = input(false); + + readonly roles = computed(() => + ROLE_KEYS.map((key) => ({ + key, + label: multiplierTagLabel(key), + hint: multiplierTagDescription(key), + value: this.scores()?.[key] ?? 0, + display: formatScore(this.scores()?.[key] ?? 0), + })), + ); + + readonly threshold = 85; +} + +function formatScore(value: number): string { + return `${(value * 100).toLocaleString('de-DE', { + minimumFractionDigits: 1, + maximumFractionDigits: 1, + })} %`; +}