open-science-observatory-ui/src/app/pages/continent/collaboration/publications/continent-collaboration-pub...

203 lines
40 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import {
gradientStartColor,
publicationColor,
publicationPalette, publicationIndicatorsPalette, goldGreenIndicatorsPalette
} from '../../../../chart-palettes';
import {environment} from '../../../../../environments/environment';
import {CountryTableData} from '../../../../domain/overview-map-data';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {TreemapHighchartsData} from '../../../../domain/treemap-highcharts-data';
import {DataHandlerService} from '../../../../services/data-handler.service';
import {DataService} from '../../../../services/data.service';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'app-continent-collaboration-publications-indicators',
templateUrl: './continent-collaboration-publications-indicators.component.html',
})
export class ContinentCollaborationPublicationsIndicatorsComponent implements OnInit {
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
private profileName = environment.profileName;
indicator: string;
private publicationIndicatorsPalette = publicationIndicatorsPalette;
publicationColor = publicationColor;
publicationsCoFundedFundersTimeline: SafeResourceUrl;
publicationsCoFundedProjectsTimeline: SafeResourceUrl;
publicationsCoAuthoredTimeline: SafeResourceUrl;
publicationsCoFundedFundersGroupByView = 'country';
publicationsCoFundedFundersByCountryChartURL: SafeResourceUrl;
publicationsCoFundedFundersByDatasourceChartURL: SafeResourceUrl;
publicationsCoFundedFundersByOrganizationChartURL: SafeResourceUrl;
publicationsCoFundedFundersByCountryChartURLMobile: SafeResourceUrl;
publicationsCoFundedProjectsGroupByView = 'country';
publicationsCoFundedProjectsByCountryChartURL: SafeResourceUrl;
publicationsCoFundedProjectsByDatasourceChartURL: SafeResourceUrl;
publicationsCoFundedProjectsByOrganizationChartURL: SafeResourceUrl;
publicationsCoFundedProjectsByCountryChartURLMobile: SafeResourceUrl;
publicationsCoAuthoredGroupByView = 'country';
publicationsCoAuthoredByCountryChartURL: SafeResourceUrl;
publicationsCoAuthoredByDatasourceChartURL: SafeResourceUrl;
publicationsCoAuthoredByOrganizationChartURL: SafeResourceUrl;
publicationsCoAuthoredByCountryChartURLMobile: SafeResourceUrl;
publicationsCoFundedFundersByFunderData: TreemapHighchartsData[];
publicationsCoFundedProjectsByFunderData: TreemapHighchartsData[];
publicationsCoAuthoredByFunderData: TreemapHighchartsData[];
loadingPublicationsAbsoluteTable: boolean = true;
loadingPublicationsPercentageTable: boolean = true;
publicationsTableContentSelection: string = 'affiliated_peer_reviewed';
publicationsAbsoluteTableData: CountryTableData[];
publicationsPercentageTableData: CountryTableData[];
constructor(private dataService: DataService,
private dataHandlerService: DataHandlerService,
private route: ActivatedRoute,
private sanitizer: DomSanitizer) { }
ngOnInit(): void {
this.route.params.subscribe(params => {
this.indicator = params['indicator'];
});
this.publicationsCoFundedFundersTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab_timeline.affiliated","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab_timeline.affiliated","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"over time","align":"left","margin":50},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoFundedProjectsTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab_timeline.affiliated","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab_timeline.affiliated","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"over time","align":"left","margin":50},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoAuthoredTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab_timeline.affiliated","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab_timeline.affiliated","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"over time","align":"left","margin":50},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoFundedFundersByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoFundedFundersByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoFundedProjectsByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoFundedProjectsByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoAuthoredByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.publicationsCoAuthoredByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
this.dataService.getFundersResultsByPublicationForCollaborationIndicatorForCountry('funders').subscribe(
rawData => {
this.publicationsCoFundedFundersByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByPublicationForCollaborationIndicatorForCountry('projects').subscribe(
rawData => {
this.publicationsCoFundedProjectsByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByPublicationForCollaborationIndicatorForCountry('authors').subscribe(
rawData => {
this.publicationsCoAuthoredByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.getPublicationsTableData(this.publicationsTableContentSelection);
}
getPublicationsTableData(contentSelection: string) {
this.loadingPublicationsAbsoluteTable = true;
this.loadingPublicationsPercentageTable = true;
this.dataService.getCollaborationIndicatorsTableData('publication', contentSelection).subscribe(
rawData => {
this.publicationsAbsoluteTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.publicationsPercentageTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.loadingPublicationsAbsoluteTable = false;
this.loadingPublicationsPercentageTable = false;
}, error => {
console.log(error);
this.loadingPublicationsAbsoluteTable = false;
this.loadingPublicationsPercentageTable = false;
}
);
}
getContent(type: string, contentSelection: string): void {
this.publicationsTableContentSelection = contentSelection;
this.getPublicationsTableData(this.publicationsTableContentSelection);
}
getPublicationsCoFundedFundersGroupBy(contentSelection: string): void {
this.publicationsCoFundedFundersGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoFundedFundersByCountryChartURL) {
this.publicationsCoFundedFundersByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"column","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoFundedFundersByDatasourceChartURL) {
this.publicationsCoFundedFundersByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoFundedFundersByOrganizationChartURL) {
this.publicationsCoFundedFundersByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
getPublicationsCoFundedFundersGroupByMobile(contentSelection: string): void {
this.publicationsCoFundedFundersGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoFundedFundersByCountryChartURLMobile) {
this.publicationsCoFundedFundersByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoFundedFundersByDatasourceChartURL) {
this.publicationsCoFundedFundersByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoFundedFundersByOrganizationChartURL) {
this.publicationsCoFundedFundersByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} funders","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.funders_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open access publications with multiple funders","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
getPublicationsCoFundedProjectsGroupBy(contentSelection: string): void {
this.publicationsCoFundedProjectsGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoFundedProjectsByCountryChartURL) {
this.publicationsCoFundedProjectsByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"column","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoFundedProjectsByDatasourceChartURL) {
this.publicationsCoFundedProjectsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoFundedProjectsByOrganizationChartURL) {
this.publicationsCoFundedProjectsByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
getPublicationsCoFundedProjectsGroupByMobile(contentSelection: string): void {
this.publicationsCoFundedProjectsGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoFundedProjectsByCountryChartURLMobile) {
this.publicationsCoFundedProjectsByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoFundedProjectsByDatasourceChartURL) {
this.publicationsCoFundedProjectsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoFundedProjectsByOrganizationChartURL) {
this.publicationsCoFundedProjectsByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"> 1 projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"{0,1} projects","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.projects_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications linked to multiple projects","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
getPublicationsCoAuthoredGroupBy(contentSelection: string): void {
this.publicationsCoAuthoredGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoAuthoredByCountryChartURL) {
this.publicationsCoAuthoredByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry.all","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"column","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry.all","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoAuthoredByDatasourceChartURL) {
this.publicationsCoAuthoredByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoAuthoredByOrganizationChartURL) {
this.publicationsCoAuthoredByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
getPublicationsCoAuthoredGroupByMobile(contentSelection: string): void {
this.publicationsCoAuthoredGroupByView = contentSelection;
if (contentSelection === 'country' && !this.publicationsCoAuthoredByCountryChartURLMobile) {
this.publicationsCoAuthoredByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bycountry","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'datasource' && !this.publicationsCoAuthoredByDatasourceChartURL) {
this.publicationsCoAuthoredByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bydatasource","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.bydatasource","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource (top datasources)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
} else if (contentSelection === 'organization' && !this.publicationsCoAuthoredByOrganizationChartURL) {
this.publicationsCoAuthoredByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"co-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.byorganization","parameters":[1],"profile":"${this.profileName}"}},{"name":"single-authored","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.authors_collab.affiliated.byorganization","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Co-authored Open Access publications","align":"left","margin":50},"subtitle":{"text":"by organization (top organizations)","align":"left"},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationIndicatorsPalette.join('","')}\"]}}`));
}
}
}