Project

General

Profile

1
import {
2
  gradientStartColor,
3
  publicationColor,
4
  publicationPalette, publicationIndicatorsPalette, goldGreenIndicatorsPalette
5
} from '../../../../chart-palettes';
6
import { Component, OnInit } from '@angular/core';
7
import { environment } from '../../../../../environments/environment';
8
import { DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
9
import { TreemapHighchartsData } from '../../../../domain/treemap-highcharts-data';
10
import { DataHandlerService } from '../../../../services/data-handler.service';
11
import { DataService } from '../../../../services/data.service';
12
import { ActivatedRoute } from '@angular/router';
13

    
14
@Component({
15
  selector: 'app-country-os-publications-indicators',
16
  templateUrl: './country-os-publications-indicators.component.html',
17
})
18

    
19
export class CountryOSPublicationsIndicatorsComponent implements OnInit {
20

    
21
  private chartsURL = environment.API_ENDPOINT + 'chart?json=';
22
  private profileName = environment.profileName;
23

    
24
  indicator: string;
25

    
26
  private publicationPalette = publicationPalette;
27
  private publicationIndicatorsPalette = publicationIndicatorsPalette;
28
  private goldGreenIndicatorsPalette = goldGreenIndicatorsPalette;
29

    
30
  publicationColor = publicationColor;
31
  gradientStartColor = gradientStartColor;
32

    
33
  countryCode: string;
34

    
35
  publicationsWithLicenceTimeline: SafeResourceUrl;
36
  publicationsWithCCLicenceTimeline: SafeResourceUrl;
37
  publicationsWithPIDTimeline: SafeResourceUrl;
38
  publicationsWithAbstractTimeline: SafeResourceUrl;
39
  publicationsWithGoldGreenTimeline: SafeResourceUrl;
40

    
41
  publicationsWithPIDGroupByView = 'datasource';
42
  publicationsWithPIDByDatasourceChartURL: SafeResourceUrl;
43
  publicationsWithPIDByOrganizationChartURL: SafeResourceUrl;
44

    
45
  publicationsWithLicenceGroupByView = 'datasource';
46
  publicationsWithLicenceByDatasourceChartURL: SafeResourceUrl;
47
  publicationsWithLicenceByOrganizationChartURL: SafeResourceUrl;
48

    
49
  publicationsWithCCLicenceGroupByView = 'datasource';
50
  publicationsWithCCLicenceByDatasourceChartURL: SafeResourceUrl;
51
  publicationsWithCCLicenceByOrganizationChartURL: SafeResourceUrl;
52

    
53
  publicationsWithAbstractGroupByView = 'datasource';
54
  publicationsWithAbstractByDatasourceChartURL: SafeResourceUrl;
55
  publicationsWithAbstractByOrganizationChartURL: SafeResourceUrl;
56

    
57
  publicationsWithGoldGreenGroupByView = 'country';
58
  publicationsWithGoldGreenByDatasourceChartURL: SafeResourceUrl;
59
  publicationsWithGoldGreenByOrganizationChartURL: SafeResourceUrl;
60
  publicationsWithGoldGreenByFunderChartURL: SafeResourceUrl;
61

    
62
  publicationsWithPIDByFunderData: TreemapHighchartsData[];
63
  publicationsWithLicenceByFunderData: TreemapHighchartsData[];
64
  publicationsWithCCLicenceByFunderData: TreemapHighchartsData[];
65
  publicationsWithAbstractByFunderData: TreemapHighchartsData[];
66

    
67

    
68
  constructor(private dataService: DataService,
69
              private dataHandlerService: DataHandlerService,
70
              private route: ActivatedRoute,
71
              private sanitizer: DomSanitizer) { }
72

    
73
  ngOnInit(): void {
74

    
75
    this.route.params.subscribe(params => {
76

    
77
      this.indicator = params['indicator'];
78
    });
79

    
80
    this.route.parent.parent.parent.parent.parent.params.subscribe(params => {
81

    
82
      this.countryCode = params['countryCode'];
83

    
84
      this.publicationsWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"column","query":{"name":"new.oso.publications.pid_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",1],"profile":"${this.profileName}"}},{"name":"without PID","type":"column","query":{"name":"new.oso.publications.pid_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
85
      this.publicationsWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"column","query":{"name":"new.oso.publications.licence_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",1],"profile":"${this.profileName}"}},{"name":"without licence","type":"column","query":{"name":"new.oso.publications.licence_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
86
      this.publicationsWithCCLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"column","query":{"name":"new.oso.publications.cc_licence_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",1],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"column","query":{"name":"new.oso.publications.cc_licence_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
87
      this.publicationsWithAbstractTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"column","query":{"name":"new.oso.publications.abstract_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",1],"profile":"${this.profileName}"}},{"name":"without abstract","type":"column","query":{"name":"new.oso.publications.abstract_timeline.peer_reviewed.affiliated.country","parameters":["${this.countryCode}",0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
88
      this.publicationsWithGoldGreenTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"column","query":{"name":"new.oso.publications.green_gold_timeline.peer_reviewed.affiliated.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"column","query":{"name":"new.oso.publications.green_gold_timeline.peer_reviewed.affiliated.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"column","query":{"name":"new.oso.publications.green_gold_timeline.peer_reviewed.affiliated.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"column","query":{"name":"new.oso.publications.green_gold_timeline.peer_reviewed.affiliated.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
89

    
90
      this.publicationsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
91
      this.publicationsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
92
      this.publicationsWithCCLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
93
      this.publicationsWithAbstractByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
94
      this.publicationsWithGoldGreenByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
95

    
96

    
97
      this.dataService.getFundersResultsByPublicationsForIndicatorForCountry('pid', this.countryCode).subscribe(
98
        rawData => {
99
          this.publicationsWithPIDByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
100
        }, error => {
101
          console.log(error);
102
        }
103
      );
104

    
105
      this.dataService.getFundersResultsByPublicationsForIndicatorForCountry('licence', this.countryCode).subscribe(
106
        rawData => {
107
          this.publicationsWithLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
108
        }, error => {
109
          console.log(error);
110
        }
111
      );
112

    
113
      this.dataService.getFundersResultsByPublicationsForIndicatorForCountry('cc_licence', this.countryCode).subscribe(
114
        rawData => {
115
          this.publicationsWithCCLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
116
        }, error => {
117
          console.log(error);
118
        }
119
      );
120

    
121
      this.dataService.getFundersResultsByPublicationsForIndicatorForCountry('abstract', this.countryCode).subscribe(
122
        rawData => {
123
          this.publicationsWithAbstractByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
124
        }, error => {
125
          console.log(error);
126
        }
127
      );
128

    
129
    });
130

    
131
  }
132

    
133
  getPublicationsWithPIDGroupBy(contentSelection: string): void {
134
    this.publicationsWithPIDGroupByView = contentSelection;
135
    if (contentSelection === 'datasource' && !this.publicationsWithPIDByDatasourceChartURL) {
136
      this.publicationsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
137
    } else if (contentSelection === 'organization' && !this.publicationsWithPIDByOrganizationChartURL) {
138
      this.publicationsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
139
    }
140
  }
141

    
142
  getPublicationsWithPIDGroupByMobile(contentSelection: string): void {
143
    this.publicationsWithPIDGroupByView = contentSelection;
144
    if (contentSelection === 'datasource' && !this.publicationsWithPIDByDatasourceChartURL) {
145
      this.publicationsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
146
    } else if (contentSelection === 'organization' && !this.publicationsWithPIDByOrganizationChartURL) {
147
      this.publicationsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without PID","type":"bar","query":{"name":"new.oso.publications.pid.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with PID","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('","')}\"]}}`));
148
    }
149
  }
150

    
151
  getPublicationsWithLicenceGroupBy(contentSelection: string): void {
152
    this.publicationsWithLicenceGroupByView = contentSelection;
153
    if (contentSelection === 'datasource' && !this.publicationsWithLicenceByDatasourceChartURL) {
154
      this.publicationsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
155
    } else if (contentSelection === 'organization' && !this.publicationsWithLicenceByOrganizationChartURL) {
156
      this.publicationsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
157
    }
158
  }
159

    
160
  getPublicationsWithLicenceGroupByMobile(contentSelection: string): void {
161
    this.publicationsWithLicenceGroupByView = contentSelection;
162
    if (contentSelection === 'datasource' && !this.publicationsWithLicenceByDatasourceChartURL) {
163
      this.publicationsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
164
    } else if (contentSelection === 'organization' && !this.publicationsWithLicenceByOrganizationChartURL) {
165
      this.publicationsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without licence","type":"bar","query":{"name":"new.oso.publications.licence.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with licence","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('","')}\"]}}`));
166
    }
167
  }
168

    
169
  getPublicationsWithCCLicenceGroupBy(contentSelection: string): void {
170
    this.publicationsWithCCLicenceGroupByView = contentSelection;
171
    if (contentSelection === 'datasource' && !this.publicationsWithCCLicenceByDatasourceChartURL) {
172
      this.publicationsWithCCLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
173
    } else if (contentSelection === 'organization' && !this.publicationsWithCCLicenceByOrganizationChartURL) {
174
      this.publicationsWithCCLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
175
    }
176
  }
177

    
178
  getPublicationsWithCCLicenceGroupByMobile(contentSelection: string): void {
179
    this.publicationsWithCCLicenceGroupByView = contentSelection;
180
    if (contentSelection === 'datasource' && !this.publicationsWithCCLicenceByDatasourceChartURL) {
181
      this.publicationsWithCCLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
182
    } else if (contentSelection === 'organization' && !this.publicationsWithCCLicenceByOrganizationChartURL) {
183
      this.publicationsWithCCLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without CC licence","type":"bar","query":{"name":"new.oso.publications.cc_licence.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with CC licence","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('","')}\"]}}`));
184
    }
185
  }
186

    
187
  getPublicationsWithAbstractGroupBy(contentSelection: string): void {
188
    this.publicationsWithAbstractGroupByView = contentSelection;
189
    if (contentSelection === 'datasource' && !this.publicationsWithAbstractByDatasourceChartURL) {
190
      this.publicationsWithAbstractByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
191
    } else if (contentSelection === 'organization' && !this.publicationsWithAbstractByOrganizationChartURL) {
192
      this.publicationsWithAbstractByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
193
    }
194
  }
195

    
196
  getPublicationsWithAbstractGroupByMobile(contentSelection: string): void {
197
    this.publicationsWithAbstractGroupByView = contentSelection;
198
    if (contentSelection === 'datasource' && !this.publicationsWithAbstractByDatasourceChartURL) {
199
      this.publicationsWithAbstractByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.bydatasource.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
200
    } else if (contentSelection === 'organization' && !this.publicationsWithAbstractByOrganizationChartURL) {
201
      this.publicationsWithAbstractByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"with abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.byorganization.country","parameters":[1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"without abstract","type":"bar","query":{"name":"new.oso.publications.abstract.peer_reviewed.affiliated.byorganization.country","parameters":[0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access publications with abstract","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('","')}\"]}}`));
202
    }
203
  }
204

    
205
  getPublicationsWithGoldGreenGroupBy(contentSelection: string): void {
206
    this.publicationsWithGoldGreenGroupByView = contentSelection;
207
    if (contentSelection === 'datasource' && !this.publicationsWithGoldGreenByDatasourceChartURL) {
208
      this.publicationsWithGoldGreenByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
209
    } else if (contentSelection === 'organization' && !this.publicationsWithGoldGreenByOrganizationChartURL) {
210
      this.publicationsWithGoldGreenByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
211
    } else if (contentSelection === 'funder' && !this.publicationsWithGoldGreenByFunderChartURL) {
212
      this.publicationsWithGoldGreenByFunderChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green Open Access publications","align":"left","margin":50},"subtitle":{"text":"by funder (top funders)","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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
213
    }
214
  }
215

    
216
  getPublicationsWithGoldGreenGroupByMobile(contentSelection: string): void {
217
    this.publicationsWithGoldGreenGroupByView = contentSelection;
218
    if (contentSelection === 'datasource' && !this.publicationsWithGoldGreenByDatasourceChartURL) {
219
      this.publicationsWithGoldGreenByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.bydatasource.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
220
    } else if (contentSelection === 'organization' && !this.publicationsWithGoldGreenByOrganizationChartURL) {
221
      this.publicationsWithGoldGreenByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byorganization.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green 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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
222
    } else if (contentSelection === 'funder' && !this.publicationsWithGoldGreenByFunderChartURL) {
223
      this.publicationsWithGoldGreenByFunderChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[0,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"both Gold & Green OA","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[1,1,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"Green OA only","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[1,0,"${this.countryCode}"],"profile":"${this.profileName}"}},{"name":"neither","type":"bar","query":{"name":"new.oso.publications.green_gold.peer_reviewed.affiliated.byfunder.country","parameters":[0,0,"${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Gold vs Green Open Access publications","align":"left","margin":50},"subtitle":{"text":"by funder (top funders)","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.goldGreenIndicatorsPalette.join('","')}\"]}}`));
224
    }
225
  }
226
}
(2-2/6)