diff --git a/service/src/main/inse/tags.py b/service/src/main/inse/tags.py index 08fc4bd0..1b25c312 100644 --- a/service/src/main/inse/tags.py +++ b/service/src/main/inse/tags.py @@ -12,3 +12,4 @@ class Tags(StrEnum): AUTH = "Auth" ACCOUNT = "Account" ORGANIZATION = "Organization" + UNIVERSITY_RANKINGS = "University Rankings" diff --git a/service/src/main/inse/university_ranking/router.py b/service/src/main/inse/university_ranking/router.py index 22e24b1c..67c12957 100644 --- a/service/src/main/inse/university_ranking/router.py +++ b/service/src/main/inse/university_ranking/router.py @@ -20,7 +20,7 @@ logger = logging.getLogger(__name__) router = APIRouter( prefix="/api/inse-service/university-rankings", - tags=[Tags.INSTITUTIONS] + tags=[Tags.UNIVERSITY_RANKINGS] ) @router.get( diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index 8ea55e0b..6a70a903 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -26,6 +26,8 @@ export * from './topics.service'; import { TopicsService } from './topics.service'; export * from './works.service'; import { WorksService } from './works.service'; +export * from './university-rankings.service'; +import { UniversityRankingsService } from './university-rankings.service'; export const APIS = [ AuthService, CompanyConnectionsService, @@ -41,4 +43,5 @@ export const APIS = [ ProjectsService, TopicsService, WorksService, + UniversityRankingsService, ]; diff --git a/webapp/src/app/api/api/university-rankings.service.ts b/webapp/src/app/api/api/university-rankings.service.ts new file mode 100644 index 00000000..f88965d8 --- /dev/null +++ b/webapp/src/app/api/api/university-rankings.service.ts @@ -0,0 +1,344 @@ +/** + * Innovation Search Engine API + * + * NOTE: This class is manually implemented to act as if it were auto-generated by OpenAPI Generator. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { RankingResponse } from '../model/rankingResponse'; +// @ts-ignore +import { TrendResponse } from '../model/trendResponse'; +// @ts-ignore +import { TopInstitutionItem } from '../model/topInstitutionItem'; +// @ts-ignore +import { AutocompleteLocationItem } from '../model/autocompleteLocationItem'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + +@Injectable({ + providedIn: 'root', +}) +export class UniversityRankingsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } + + public getRankingsApiInseServiceUniversityRankingsGet( + topic: + | 'Artificial Intelligence' + | 'Quantum Computing' + | 'Renewable Energy' + | 'Biotechnology', + metric?: 'publications' | 'citations', + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (topic === null || topic === undefined) { + throw new Error( + 'Required parameter topic was null or undefined when calling getRankingsApiInseServiceUniversityRankingsGet.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topic, + 'topic', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + metric, + 'metric', + ); + + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + + let localVarPath = `/api/inse-service/university-rankings`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + public getTrendApiInseServiceUniversityRankingsTrendGet( + topics: string[], + institutions?: string[], + countries?: string[], + regions?: string[], + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (topics === null || topics === undefined) { + throw new Error( + 'Required parameter topics was null or undefined when calling getTrendApiInseServiceUniversityRankingsTrendGet.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (topics) { + topics.forEach((val) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + val, + 'topics', + ); + }); + } + if (institutions) { + institutions.forEach((val) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + val, + 'institutions', + ); + }); + } + if (countries) { + countries.forEach((val) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + val, + 'countries', + ); + }); + } + if (regions) { + regions.forEach((val) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + val, + 'regions', + ); + }); + } + + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + + let localVarPath = `/api/inse-service/university-rankings/trend`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( + topic: string, + region?: string, + country?: string, + limit?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (topic === null || topic === undefined) { + throw new Error( + 'Required parameter topic was null or undefined when calling getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topic, + 'topic', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + region, + 'region', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + country, + 'country', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + + let localVarPath = `/api/inse-service/university-rankings/top-institutions`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( + query: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (query === null || query === undefined) { + throw new Error( + 'Required parameter query was null or undefined when calling getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + + let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } +} diff --git a/webapp/src/app/api/model/autocompleteLocationItem.ts b/webapp/src/app/api/model/autocompleteLocationItem.ts new file mode 100644 index 00000000..c3fe1cdd --- /dev/null +++ b/webapp/src/app/api/model/autocompleteLocationItem.ts @@ -0,0 +1,6 @@ +export interface AutocompleteLocationItem { + id: string; + display_name: string; + code: string; + type: 'country' | 'continent'; +} diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index 8e381ef2..edd20e54 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -177,3 +177,6 @@ export * from './workTopicSubfield'; export * from './worksFilterProperties'; export * from './worksListResponse'; export * from './yearlyData'; +export * from './trendResponse'; +export * from './topInstitutionItem'; +export * from './autocompleteLocationItem'; diff --git a/webapp/src/app/api/model/topInstitutionItem.ts b/webapp/src/app/api/model/topInstitutionItem.ts new file mode 100644 index 00000000..8f1c6489 --- /dev/null +++ b/webapp/src/app/api/model/topInstitutionItem.ts @@ -0,0 +1,7 @@ +import { DehydratedInstitution } from './dehydratedInstitution'; + +export interface TopInstitutionItem extends DehydratedInstitution { + works_count?: number | null; + image_thumbnail_url?: string | null; + exact_topic_count?: number | null; +} diff --git a/webapp/src/app/api/model/trendResponse.ts b/webapp/src/app/api/model/trendResponse.ts new file mode 100644 index 00000000..7f5589f9 --- /dev/null +++ b/webapp/src/app/api/model/trendResponse.ts @@ -0,0 +1,20 @@ +export interface TopicYearlyData { + year: number; + raw: number; + normalized: number; + institutions_count: number; +} + +export interface TrendSeries { + entity_id: string; + entity_name: string; + entity_type: 'institution' | 'country' | 'region'; + country_code?: string | null; + topic_data: { [key: string]: Array }; +} + +export interface TrendResponse { + series: Array; + years: Array; + location_mappings?: { [key: string]: Array } | null; +} diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.html b/webapp/src/app/modules/keywords-search/keywords-search.component.html index 8eb10128..d30dc5f6 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.html +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.html @@ -229,5 +229,13 @@ Suchen + + + @if (selectedKeywords().length > 0) { +
+ +
+ } diff --git a/webapp/src/app/modules/keywords-search/keywords-search.component.ts b/webapp/src/app/modules/keywords-search/keywords-search.component.ts index 03a02061..52312b88 100644 --- a/webapp/src/app/modules/keywords-search/keywords-search.component.ts +++ b/webapp/src/app/modules/keywords-search/keywords-search.component.ts @@ -28,6 +28,7 @@ import { TopicsService } from '../../api/api/topics.service'; import { KeywordsTopicsRequest } from '../../api/model/keywordsTopicsRequest'; import { KeywordEntryWithTopic } from '../../api/model/keywordEntryWithTopic'; import { TopicAutocompleteComponent } from '../../shared/ui/topic-autocomplete/topic-autocomplete.component'; +import { UniTrendParentComponent } from '../university-ranking/uni-trend-parent/uni-trend-parent.component'; type InputMode = 'url' | 'text'; type KeywordCategory = 'broad' | 'coarse' | 'fine' | 'manual'; @@ -47,6 +48,7 @@ type KeywordCategory = 'broad' | 'coarse' | 'fine' | 'manual'; MatExpansionModule, MatProgressBarModule, TopicAutocompleteComponent, + UniTrendParentComponent, ], templateUrl: './keywords-search.component.html', styleUrl: './keywords-search.component.scss', diff --git a/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts b/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts index d3e362bf..311fc10f 100644 --- a/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts +++ b/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts @@ -3,6 +3,7 @@ import { inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { InstitutionsService, + UniversityRankingsService, RankingResponse, TrendResponse, TopInstitutionItem, @@ -20,6 +21,7 @@ export type DashboardMetric = 'publications' | 'citations'; @Injectable({ providedIn: 'root' }) export class UniversityRankingService { private apiService = inject(InstitutionsService); + private rankingsApiService = inject(UniversityRankingsService); /** * Fetches ranking and timeseries data directly from the backend. @@ -29,7 +31,7 @@ export class UniversityRankingService { topic: ResearchTopic, metric: DashboardMetric, ): Observable { - return this.apiService.getRankingsApiInseServiceUniversityRankingsGet( + return this.rankingsApiService.getRankingsApiInseServiceUniversityRankingsGet( topic, metric, ); @@ -45,7 +47,7 @@ export class UniversityRankingService { countries?: string[], regions?: string[], ): Observable { - return this.apiService.getTrendApiInseServiceUniversityRankingsTrendGet( + return this.rankingsApiService.getTrendApiInseServiceUniversityRankingsTrendGet( topics as any, institutions, countries, @@ -62,7 +64,7 @@ export class UniversityRankingService { country?: string, limit?: number, ): Observable { - return this.apiService.getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( + return this.rankingsApiService.getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( topic, region, country, @@ -86,7 +88,7 @@ export class UniversityRankingService { * Autocompletes countries and continents. */ autocompleteLocations(query: string): Observable { - return this.apiService.getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( + return this.rankingsApiService.getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( query, ); } diff --git a/webapp/src/app/modules/university-ranking/uni-trend-chart/uni-trend-chart.component.ts b/webapp/src/app/modules/university-ranking/uni-trend-chart/uni-trend-chart.component.ts index f8ba7f61..f549b878 100644 --- a/webapp/src/app/modules/university-ranking/uni-trend-chart/uni-trend-chart.component.ts +++ b/webapp/src/app/modules/university-ranking/uni-trend-chart/uni-trend-chart.component.ts @@ -6,7 +6,7 @@ import { } from '@angular/core'; import { EChartsOption } from 'echarts'; import { NgxEchartsDirective } from 'ngx-echarts'; -import { TrendResponse } from '../../../api'; +import { TrendResponse, TrendSeries, TopicYearlyData } from '../../../api'; @Component({ selector: 'app-uni-trend-chart', @@ -162,10 +162,10 @@ export class UniTrendChartComponent { }, tooltip: { trigger: 'axis', - axisPointer: { type: 'cross' }, - backgroundColor: 'rgba(255, 255, 255, 0.95)', + backgroundColor: 'rgba(255, 255, 255, 0.96)', borderColor: '#e5e7eb', borderWidth: 1, + padding: 0, textStyle: { color: '#374151', fontSize: 12, @@ -178,14 +178,14 @@ export class UniTrendChartComponent { res += `Year: ${yearNum}
`; res += `
`; - trendData.series.forEach((entity, entityIdx) => { + trendData.series.forEach((entity: TrendSeries, entityIdx: number) => { const color = entityColors[entityIdx % entityColors.length]; res += `
`; res += ``; res += `${entity.entity_name}:
`; const yrData = entity.topic_data[selectedTopic]?.find( - (y) => y.year === yearNum, + (y: TopicYearlyData) => y.year === yearNum, ); if (yrData) { const val = @@ -201,24 +201,26 @@ export class UniTrendChartComponent { const instCountryCode = entity.country_code?.toUpperCase(); const parentCountry = trendData.series.find( - (s) => + (s: TrendSeries) => s.entity_type === 'country' && s.entity_id.toUpperCase() === instCountryCode, ); - const parentContinent = trendData.series.find((s) => { - if (s.entity_type !== 'region') return false; - const memberCountries = - trendData.location_mappings?.[s.entity_id] || []; - return memberCountries.some( - (c) => c.toUpperCase() === instCountryCode, - ); - }); + const parentContinent = trendData.series.find( + (s: TrendSeries) => { + if (s.entity_type !== 'region') return false; + const memberCountries = + trendData.location_mappings?.[s.entity_id] || []; + return memberCountries.some( + (c: string) => c.toUpperCase() === instCountryCode, + ); + }, + ); if (parentCountry) { const parentYr = parentCountry.topic_data[ selectedTopic - ]?.find((y) => y.year === yearNum); + ]?.find((y: TopicYearlyData) => y.year === yearNum); if (parentYr && parentYr.raw > 0) { const pct = (yrData.raw / parentYr.raw) * 100; contributionStr = ` (${pct.toFixed(1)}% of ${parentCountry.entity_name})`; @@ -226,17 +228,19 @@ export class UniTrendChartComponent { } else if (parentContinent) { const parentYr = parentContinent.topic_data[ selectedTopic - ]?.find((y) => y.year === yearNum); + ]?.find((y: TopicYearlyData) => y.year === yearNum); if (parentYr && parentYr.raw > 0) { const pct = (yrData.raw / parentYr.raw) * 100; contributionStr = ` (${pct.toFixed(1)}% of ${parentContinent.entity_name})`; } } else { const sumInsts = trendData.series - .filter((s) => s.entity_type === 'institution') - .reduce((sum, s) => { + .filter( + (s: TrendSeries) => s.entity_type === 'institution', + ) + .reduce((sum: number, s: TrendSeries) => { const y = s.topic_data[selectedTopic]?.find( - (yd) => yd.year === yearNum, + (yd: TopicYearlyData) => yd.year === yearNum, ); return sum + (y ? y.raw : 0); }, 0); @@ -248,24 +252,26 @@ export class UniTrendChartComponent { } else if (entity.entity_type === 'country') { const countryCode = entity.entity_id.toUpperCase(); - const parentContinent = trendData.series.find((s) => { - if (s.entity_type !== 'region') return false; - const memberCountries = - trendData.location_mappings?.[s.entity_id] || []; - return memberCountries.some( - (c) => c.toUpperCase() === countryCode, - ); - }); + const parentContinent = trendData.series.find( + (s: TrendSeries) => { + if (s.entity_type !== 'region') return false; + const memberCountries = + trendData.location_mappings?.[s.entity_id] || []; + return memberCountries.some( + (c: string) => c.toUpperCase() === countryCode, + ); + }, + ); const childInstsSum = trendData.series .filter( - (s) => + (s: TrendSeries) => s.entity_type === 'institution' && s.country_code?.toUpperCase() === countryCode, ) - .reduce((sum, s) => { + .reduce((sum: number, s: TrendSeries) => { const y = s.topic_data[selectedTopic]?.find( - (yd) => yd.year === yearNum, + (yd: TopicYearlyData) => yd.year === yearNum, ); return sum + (y ? y.raw : 0); }, 0); @@ -276,7 +282,7 @@ export class UniTrendChartComponent { if (parentContinent) { const parentYr = parentContinent.topic_data[ selectedTopic - ]?.find((y) => y.year === yearNum); + ]?.find((y: TopicYearlyData) => y.year === yearNum); if (parentYr && parentYr.raw > 0) { const pct = (yrData.raw / parentYr.raw) * 100; contributionStr = ` (${pct.toFixed(1)}% of ${parentContinent.entity_name})`; @@ -292,23 +298,24 @@ export class UniTrendChartComponent { trendData.location_mappings?.[continentId] || []; const childSum = trendData.series - .filter((s) => { + .filter((s: TrendSeries) => { if (s.entity_type === 'country') { return memberCountries.some( - (c) => c.toUpperCase() === s.entity_id.toUpperCase(), + (c: string) => + c.toUpperCase() === s.entity_id.toUpperCase(), ); } if (s.entity_type === 'institution') { return memberCountries.some( - (c) => + (c: string) => c.toUpperCase() === s.country_code?.toUpperCase(), ); } return false; }) - .reduce((sum, s) => { + .reduce((sum: number, s: TrendSeries) => { const y = s.topic_data[selectedTopic]?.find( - (yd) => yd.year === yearNum, + (yd: TopicYearlyData) => yd.year === yearNum, ); return sum + (y ? y.raw : 0); }, 0); diff --git a/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts b/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts index 94ac41df..70e0148a 100644 --- a/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts +++ b/webapp/src/app/modules/university-ranking/uni-trend-parent/uni-trend-parent.component.ts @@ -16,6 +16,8 @@ import { UniversityRankingsService } from '../../../api/api/university-rankings. import { InstitutionsService } from '../../../api/api/institutions.service'; import { TrendResponse, + TrendSeries, + TopicYearlyData, TopInstitutionItem, AutocompleteLocationItem, AutocompleteResponse, @@ -89,7 +91,7 @@ export class UniTrendParentComponent implements OnInit { ); const defaultInstId = 'https://openalex.org/I62318514'.toLowerCase(); - const filteredSeries = raw.series.filter((s: any) => { + const filteredSeries = raw.series.filter((s: TrendSeries) => { const id = s.entity_id.toLowerCase(); if (s.entity_type === 'institution') { return id === defaultInstId || currentInstIds.has(id);