1
|
import { environment } from '../../../../environments/environment';
|
2
|
import { Component, OnInit } from '@angular/core';
|
3
|
import {
|
4
|
datasetPalette,
|
5
|
otherResearchProductsPalette,
|
6
|
publicationPalette,
|
7
|
softwarePalette,
|
8
|
resultsPalette,
|
9
|
datasetColor, publicationColor, otherResearchProductsColor, softwareColor, gradientStartColor
|
10
|
} from '../../../chart-palettes';
|
11
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
12
|
import { TreemapHighchartsData } from '../../../domain/treemap-highcharts-data';
|
13
|
import { CountryPageOverviewData } from '../../../domain/overview-map-data';
|
14
|
import { DataHandlerService } from '../../../services/data-handler.service';
|
15
|
import { DataService } from '../../../services/data.service';
|
16
|
import { ActivatedRoute } from '@angular/router';
|
17
|
|
18
|
@Component({
|
19
|
selector: 'app-country-overview',
|
20
|
templateUrl: './country-overview.component.html',
|
21
|
})
|
22
|
|
23
|
export class CountryOverviewComponent implements OnInit {
|
24
|
|
25
|
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
|
26
|
private profileName = environment.profileName;
|
27
|
|
28
|
private publicationPalette = publicationPalette;
|
29
|
private datasetPalette = datasetPalette;
|
30
|
private softwarePalette = softwarePalette;
|
31
|
private otherResearchProductsPalette = otherResearchProductsPalette;
|
32
|
private resultsPalette = resultsPalette;
|
33
|
|
34
|
publicationColor = publicationColor;
|
35
|
datasetColor = datasetColor;
|
36
|
softwareColor = softwareColor;
|
37
|
otherResearchProductsColor = otherResearchProductsColor;
|
38
|
gradientStartColor = gradientStartColor;
|
39
|
|
40
|
countryCode: string;
|
41
|
|
42
|
countryPageOAData: CountryPageOverviewData;
|
43
|
|
44
|
resultsByTypeOANonOAChartURL: SafeResourceUrl;
|
45
|
|
46
|
oaNonOAPublicationsTimelineChartURL: SafeResourceUrl;
|
47
|
oaNonOADatasetsTimelineChartURL: SafeResourceUrl;
|
48
|
oaNonOASoftwareTimelineChartURL: SafeResourceUrl;
|
49
|
oaNonOAOtherTimelineChartURL: SafeResourceUrl;
|
50
|
|
51
|
publicationsByFunderData: TreemapHighchartsData[];
|
52
|
datasetsByFunderData: TreemapHighchartsData[];
|
53
|
softwareByFunderData: TreemapHighchartsData[];
|
54
|
otherByFunderData: TreemapHighchartsData[];
|
55
|
|
56
|
publicationGroupByView = 'datasource';
|
57
|
publicationsByDatasourceChartURL: SafeResourceUrl;
|
58
|
publicationsByOrganizationChartURL: SafeResourceUrl;
|
59
|
publicationsByCountryChartURLMobile: SafeResourceUrl;
|
60
|
publicationsByDatasourceChartURLMobile: SafeResourceUrl;
|
61
|
publicationsByOrganizationChartURLMobile: SafeResourceUrl;
|
62
|
|
63
|
datasetsGroupByView = 'datasource';
|
64
|
datasetsByDatasourceChartURL: SafeResourceUrl;
|
65
|
datasetsByOrganizationChartURL: SafeResourceUrl;
|
66
|
datasetsByCountryChartURLMobile: SafeResourceUrl;
|
67
|
datasetsByDatasourceChartURLMobile: SafeResourceUrl;
|
68
|
datasetsByOrganizationChartURLMobile: SafeResourceUrl;
|
69
|
|
70
|
softwareGroupByView = 'datasource';
|
71
|
softwareByDatasourceChartURL: SafeResourceUrl;
|
72
|
softwareByOrganizationChartURL: SafeResourceUrl;
|
73
|
softwareByCountryChartURLMobile: SafeResourceUrl;
|
74
|
softwareByDatasourceChartURLMobile: SafeResourceUrl;
|
75
|
softwareByOrganizationChartURLMobile: SafeResourceUrl;
|
76
|
|
77
|
orpGroupByView = 'datasource';
|
78
|
otherByDatasourceChartURL: SafeResourceUrl;
|
79
|
otherByOrganizationChartURL: SafeResourceUrl;
|
80
|
otherByCountryChartURLMobile: SafeResourceUrl;
|
81
|
otherByDatasourceChartURLMobile: SafeResourceUrl;
|
82
|
otherByOrganizationChartURLMobile: SafeResourceUrl;
|
83
|
|
84
|
constructor(private dataService: DataService,
|
85
|
private dataHandlerService: DataHandlerService,
|
86
|
private route: ActivatedRoute,
|
87
|
private sanitizer: DomSanitizer) { }
|
88
|
|
89
|
ngOnInit(): void {
|
90
|
|
91
|
this.route.parent.params.subscribe(params => {
|
92
|
|
93
|
this.countryCode = params['countryCode'];
|
94
|
console.log('this.countryCode', this.countryCode);
|
95
|
|
96
|
this.dataService.getCountryOAData(this.countryCode).subscribe(
|
97
|
rawData => {
|
98
|
this.countryPageOAData = this.dataHandlerService.convertRawDataToCountryPageOAData(rawData);
|
99
|
}, error => {
|
100
|
console.log(error);
|
101
|
}
|
102
|
);
|
103
|
|
104
|
this.oaNonOAPublicationsTimelineChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"new.oso.publications_timeline.peer_reviewed.oa.affiliated.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"new.oso.publications_timeline.peer_reviewed.oa.affiliated.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications","align":"left","margin":50},"subtitle":{},"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.publicationPalette.join('","')}\"]}}`));
|
105
|
this.oaNonOADatasetsTimelineChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[1,"dataset","${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[0,"dataset","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Datasets","align":"left","margin":50},"subtitle":{},"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.datasetPalette.join('","')}\"]}}`));
|
106
|
this.oaNonOASoftwareTimelineChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[1,"software","${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[0,"software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Software","align":"left","margin":50},"subtitle":{},"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.softwarePalette.join('","')}\"]}}`));
|
107
|
this.oaNonOAOtherTimelineChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[1,"other","${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"new.oso.results_timeline.oa.affiliated.country","parameters":[0,"other","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Other research products","align":"left","margin":50},"subtitle":{},"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.otherResearchProductsPalette.join('","')}\"]}}`));
|
108
|
|
109
|
this.publicationsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"column","query":{"name":"new.oso.publications.peer_reviewed.affiliated.bydatasource.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
110
|
this.publicationsByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.affiliated.bydatasource.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
111
|
|
112
|
this.datasetsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
113
|
this.datasetsByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
114
|
|
115
|
this.softwareByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
116
|
this.softwareByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
117
|
|
118
|
this.otherByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
119
|
this.otherByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
120
|
|
121
|
|
122
|
// this.resultsByTypeOANonOAChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.type","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.access mode","type":"=","values":["Open Access"]},{"field":"result.access mode","type":"=","values":["Open Source"]}],"op":"OR"},{"groupFilters":[{"field":"result.organization.country.code","type":"=","values":["${this.countryCode}"]}],"op":"AND"}],"entity":"result","profile":"${this.profileName}","limit":"30"}},{"name":"Non-OA","type":"column","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.type","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.access mode","type":"!=","values":["Open Access"]},{"field":"result.access mode","type":"!=","values":["Open Source"]}],"op":"AND"},{"groupFilters":[{"field":"result.organization.country.code","type":"=","values":["${this.countryCode}"]}],"op":"AND"}],"entity":"result","profile":"${this.profileName}","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Research results by type","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":false},"colors":[\"${this.resultsPalette.join('","')}\"]}}`));
|
123
|
|
124
|
this.dataService.getFundersResultsByPublicationsForCountry(this.countryCode).subscribe(
|
125
|
rawData => {
|
126
|
this.publicationsByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
|
127
|
}, error => {
|
128
|
console.log(error);
|
129
|
}
|
130
|
);
|
131
|
|
132
|
this.dataService.getFundersResultsByTypeForCountry('dataset', this.countryCode).subscribe(
|
133
|
rawData => {
|
134
|
this.datasetsByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
|
135
|
}, error => {
|
136
|
console.log(error);
|
137
|
}
|
138
|
);
|
139
|
|
140
|
this.dataService.getFundersResultsByTypeForCountry('software', this.countryCode).subscribe(
|
141
|
rawData => {
|
142
|
this.softwareByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
|
143
|
}, error => {
|
144
|
console.log(error);
|
145
|
}
|
146
|
);
|
147
|
|
148
|
this.dataService.getFundersResultsByTypeForCountry('other', this.countryCode).subscribe(
|
149
|
rawData => {
|
150
|
this.otherByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
|
151
|
}, error => {
|
152
|
console.log(error);
|
153
|
}
|
154
|
);
|
155
|
}
|
156
|
);
|
157
|
}
|
158
|
|
159
|
getPublicationsGroupBy(contentSelection: string): void {
|
160
|
this.publicationGroupByView = contentSelection;
|
161
|
if (contentSelection === 'datasource' && !this.publicationsByDatasourceChartURL) {
|
162
|
this.publicationsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"column","query":{"name":"new.oso.publications.peer_reviewed.affiliated.bydatasource.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
163
|
} else if (contentSelection === 'organization' && !this.publicationsByOrganizationChartURL) {
|
164
|
this.publicationsByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"column","query":{"name":"new.oso.publications.peer_reviewed.affiliated.byorganization.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
165
|
}
|
166
|
}
|
167
|
|
168
|
getPublicationsGroupByMobile(contentSelection: string): void {
|
169
|
this.publicationGroupByView = contentSelection;
|
170
|
if (contentSelection === 'datasource' && !this.publicationsByDatasourceChartURLMobile) {
|
171
|
this.publicationsByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.affiliated.bydatasource.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
172
|
} else if (contentSelection === 'organization' && !this.publicationsByOrganizationChartURLMobile) {
|
173
|
this.publicationsByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"new.oso.publications.peer_reviewed.affiliated.byorganization.country","parameters":["${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
174
|
}
|
175
|
}
|
176
|
|
177
|
getDatasetsGroupBy(contentSelection: string): void {
|
178
|
this.datasetsGroupByView = contentSelection;
|
179
|
if (contentSelection === 'datasource' && !this.datasetsByDatasourceChartURL) {
|
180
|
this.datasetsByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
181
|
} else if (contentSelection === 'organization' && !this.datasetsByOrganizationChartURL) {
|
182
|
this.datasetsByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"column","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
183
|
}
|
184
|
}
|
185
|
|
186
|
getDatasetsGroupByMobile(contentSelection: string): void {
|
187
|
this.datasetsGroupByView = contentSelection;
|
188
|
if (contentSelection === 'datasource' && !this.datasetsByDatasourceChartURLMobile) {
|
189
|
this.datasetsByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
190
|
} else if (contentSelection === 'organization' && !this.datasetsByOrganizationChartURLMobile) {
|
191
|
this.datasetsByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"datasets","type":"bar","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access datasets","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
192
|
}
|
193
|
}
|
194
|
|
195
|
getSoftwareGroupBy(contentSelection: string): void {
|
196
|
this.softwareGroupByView = contentSelection;
|
197
|
if (contentSelection === 'datasource' && !this.softwareByDatasourceChartURL) {
|
198
|
this.softwareByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
199
|
} else if (contentSelection === 'organization' && !this.softwareByOrganizationChartURL) {
|
200
|
this.softwareByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"column","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
201
|
}
|
202
|
}
|
203
|
|
204
|
getSoftwareGroupByMobile(contentSelection: string): void {
|
205
|
this.softwareGroupByView = contentSelection;
|
206
|
if (contentSelection === 'datasource' && !this.softwareByDatasourceChartURLMobile) {
|
207
|
this.softwareByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
208
|
} else if (contentSelection === 'organization' && !this.softwareByOrganizationChartURLMobile) {
|
209
|
this.softwareByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"software","type":"bar","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access software","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
210
|
}
|
211
|
}
|
212
|
|
213
|
getORPGroupBy(contentSelection: string): void {
|
214
|
this.orpGroupByView = contentSelection;
|
215
|
if (contentSelection === 'datasource' && !this.otherByDatasourceChartURL) {
|
216
|
this.otherByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"column","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
217
|
} else if (contentSelection === 'organization' && !this.otherByOrganizationChartURL) {
|
218
|
this.otherByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"column","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
219
|
}
|
220
|
}
|
221
|
|
222
|
getORPGroupByMobile(contentSelection: string): void {
|
223
|
this.orpGroupByView = contentSelection;
|
224
|
if (contentSelection === 'datasource' && !this.otherByDatasourceChartURLMobile) {
|
225
|
this.otherByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"bar","query":{"name":"oso.results.affiliated.bydatasource.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by datasource","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
226
|
} else if (contentSelection === 'organization' && !this.otherByOrganizationChartURLMobile) {
|
227
|
this.otherByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"other research products","type":"bar","query":{"name":"oso.results.affiliated.byorganization.country","parameters":["${this.countryCode}","other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access other research products","align":"left","margin":50},"subtitle":{"text":"by organization","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
228
|
}
|
229
|
}
|
230
|
}
|