country software page, indicators have their own routes

This commit is contained in:
Andreas Mantas 2021-09-06 11:13:31 +00:00
parent fb1da76d51
commit 1d6895199e
8 changed files with 343 additions and 416 deletions

View File

@ -29,7 +29,8 @@ const continentOpenScienceRoutes: Routes = [
},
{
path: 'software',
component: CountryOSSoftwareComponent,
loadChildren: () => import('./software/country-os-software.module').then(m => m.CountryOpenScienceSoftwareModule),
// component: CountryOSSoftwareComponent,
},
{
path: 'other-research-products',

View File

@ -20,7 +20,7 @@ import { CountryOSORPComponent } from './other-research-products/country-os-orp.
CountryOpenScienceComponent,
CountryOSPublicationsComponent,
// CountryOSDatasetsComponent,
CountryOSSoftwareComponent,
// CountryOSSoftwareComponent,
// CountryOSORPComponent
],
providers: [

View File

@ -0,0 +1,136 @@
<div *ngIf="indicator && indicator=='pid'" class="pidIndicator">
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithPIDTimeline" width="100%" height="550" [src]="softwareWithPIDTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<!--MOBILE & PAD PORTRAIT-->
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectPIDGroupBy (change)="getSoftwareWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithPIDGroupByView==='datasource' && softwareWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithPIDGroupByView==='organization' && softwareWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithPIDGroupByView==='funder' && softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
<!--LAPTOP & PAD LANDSCAPE-->
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="indicator && indicator=='licence'" class="licenceIndicator">
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithLicenceTimeline" width="100%" height="550" [src]="softwareWithLicenceTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<!--MOBILE & PAD PORTRAIT-->
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectLicenceGroupBy (change)="getSoftwareWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithLicenceGroupByView==='datasource' && softwareWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithLicenceGroupByView==='organization' && softwareWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithLicenceGroupByView==='funder' && softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
<!--LAPTOP & PAD LANDSCAPE-->
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,143 @@
import {
gradientStartColor,
softwareColor, softwarePalette, resultsPalette
} from '../../../../chart-palettes';
import { Component, OnInit } from '@angular/core';
import { environment } from '../../../../../environments/environment';
import { DataHandlerService } from '../../../../services/data-handler.service';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { DataService } from '../../../../services/data.service';
import { ActivatedRoute } from '@angular/router';
import { TreemapHighchartsData } from '../../../../domain/treemap-highcharts-data';
@Component({
selector: 'app-country-os-software-indicators',
templateUrl: './country-os-software-indicators.component.html',
})
export class CountryOSSoftwareIndicatorsComponent implements OnInit {
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
private profileName = environment.profileName;
indicator: string;
private softwarePalette = softwarePalette;
private resultsPalette = resultsPalette;
softwareColor = softwareColor;
gradientStartColor = gradientStartColor;
countryCode: string;
softwareWithPIDTimeline: SafeResourceUrl;
softwareWithLicenceTimeline: SafeResourceUrl;
softwareWithPIDGroupByView = 'datasource';
softwareWithPIDByDatasourceChartURL: SafeResourceUrl;
softwareWithPIDByOrganizationChartURL: SafeResourceUrl;
softwareWithPIDByDatasourceChartURLMobile: SafeResourceUrl;
softwareWithPIDByOrganizationChartURLMobile: SafeResourceUrl;
softwareWithLicenceGroupByView = 'datasource';
softwareWithLicenceByDatasourceChartURL: SafeResourceUrl;
softwareWithLicenceByOrganizationChartURL: SafeResourceUrl;
softwareWithLicenceByDatasourceChartURLMobile: SafeResourceUrl;
softwareWithLicenceByOrganizationChartURLMobile: SafeResourceUrl;
softwareWithPIDByFunderData: TreemapHighchartsData[];
softwareWithLicenceByFunderData: TreemapHighchartsData[];
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.route.parent.parent.parent.params.subscribe(params => {
this.countryCode = params['countryCode'];
// this.softwareWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
this.softwareWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// this.softwareWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
this.softwareWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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('","')}\"]}}`));
// this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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('","')}\"]}}`));
// this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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('","')}\"]}}`));
// this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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('","')}\"]}}`));
// this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.dataService.getFundersResultsByTypeForIndicatorForCountry('software', 'pid', this.countryCode).subscribe(
rawData => {
this.softwareWithPIDByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByTypeForIndicatorForCountry('software', 'licence', this.countryCode).subscribe(
rawData => {
this.softwareWithLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
});
}
getSoftwareWithPIDGroupBy(contentSelection: string): void {
this.softwareWithPIDGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithPIDByDatasourceChartURL) {
this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithPIDByOrganizationChartURL) {
this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithPIDGroupByMobile(contentSelection: string): void {
this.softwareWithPIDGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithPIDByDatasourceChartURLMobile) {
this.softwareWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithPIDByOrganizationChartURLMobile) {
this.softwareWithPIDByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithLicenceGroupBy(contentSelection: string): void {
this.softwareWithLicenceGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithLicenceByDatasourceChartURL) {
this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithLicenceByOrganizationChartURL) {
this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithLicenceGroupByMobile(contentSelection: string): void {
this.softwareWithLicenceGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithLicenceByDatasourceChartURLMobile) {
this.softwareWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithLicenceByOrganizationChartURLMobile) {
this.softwareWithLicenceByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
}

View File

@ -0,0 +1,29 @@
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { CountryOSSoftwareComponent } from './country-os-software.component';
import { CountryOSSoftwareIndicatorsComponent } from './country-os-software-indicators.component';
const countryOpenScienceSoftwareRoutes: Routes = [
{
path: '',
component: CountryOSSoftwareComponent,
children : [
{
path: '',
redirectTo: 'pid',
pathMatch: 'full',
},
{
path: ':indicator',
component: CountryOSSoftwareIndicatorsComponent,
}
]
},
];
@NgModule ({
imports: [RouterModule.forChild(countryOpenScienceSoftwareRoutes)],
exports: [RouterModule]
})
export class CountryOpenScienceSoftwareRoutingModule {}

View File

@ -1,291 +1,10 @@
<div>
<ul uk-tab class="uk-tab-large">
<li><a href="#">PID</a></li>
<li><a href="#">Licence</a></li>
<li [routerLinkActive]="['uk-active']"><a [routerLink]="['./pid']">PID</a></li>
<li [routerLinkActive]="['uk-active']"><a [routerLink]="['./licence']">Licence</a></li>
</ul>
<ul class="uk-switcher uk-margin">
<li>
<div class="pidIndicator">
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithPIDTimeline" width="100%" height="550" [src]="softwareWithPIDTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<!--MOBILE & PAD PORTRAIT-->
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectPIDGroupBy (change)="getSoftwareWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithPIDGroupByView==='datasource' && softwareWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithPIDGroupByView==='organization' && softwareWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithPIDGroupByView==='funder' && softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
<!--LAPTOP & PAD LANDSCAPE-->
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li>
<div class="licenceIndicator">
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithLicenceTimeline" width="100%" height="550" [src]="softwareWithLicenceTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<!--MOBILE & PAD PORTRAIT-->
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectLicenceGroupBy (change)="getSoftwareWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithLicenceGroupByView==='datasource' && softwareWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithLicenceGroupByView==='organization' && softwareWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithLicenceGroupByView==='funder' && softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
<!--LAPTOP & PAD LANDSCAPE-->
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
<!-- <div class="pidIndicator">
<h3 class="uk-margin-remove">PID</h3>
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithPIDTimeline" width="100%" height="550" [src]="softwareWithPIDTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
&lt;!&ndash;MOBILE & PAD PORTRAIT&ndash;&gt;
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectPIDGroupBy (change)="getSoftwareWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithPIDGroupByView==='datasource' && softwareWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithPIDGroupByView==='organization' && softwareWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithPIDGroupByView==='funder' && softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
&lt;!&ndash;LAPTOP & PAD LANDSCAPE&ndash;&gt;
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithPIDByFunderData"
[chartTitle]="'OS Software with PID by funder'"
[chartData]="softwareWithPIDByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="licenceIndicator uk-margin-large-top">
<h3 class="uk-margin-remove">Licence</h3>
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-2@l uk-child-width-1-1@s">
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
<iframe *ngIf="softwareWithLicenceTimeline" width="100%" height="550" [src]="softwareWithLicenceTimeline"></iframe>
</div>
</div>
</div>
<div class="uk-grid-margin">
<div class="md-card chartCard">
<div class="md-card-content">
&lt;!&ndash;MOBILE & PAD PORTRAIT&ndash;&gt;
<div class="uk-hidden@m">
<div class="uk-flex uk-flex-right uk-flex-middle uk-margin-bottom">
<label class="uk-margin-right">Show by: </label>
<select class="md-input" #selectLicenceGroupBy (change)="getSoftwareWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="softwareWithLicenceGroupByView==='datasource' && softwareWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="softwareWithLicenceGroupByView==='organization' && softwareWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="softwareWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="softwareWithLicenceGroupByView==='funder' && softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</div>
&lt;!&ndash;LAPTOP & PAD LANDSCAPE&ndash;&gt;
<div class="uk-visible@m">
<ul class="uk-subnav uk-subnav-pill uk-flex uk-flex-right uk-flex-middle uk-margin-bottom" uk-margin
data-uk-switcher="{connect:'#switcher-content-a-fade-publications', animation: 'fade'}">
<li class="uk-active"><a (click)="getSoftwareWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getSoftwareWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" style="animation-duration: 200ms;" class="uk-active">
<iframe *ngIf="softwareWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="softwareWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="softwareWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="softwareWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="softwareWithLicenceByFunderData"
[chartTitle]="'OS Software with licence by funder'"
[chartData]="softwareWithLicenceByFunderData" [color]="softwareColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>-->
<router-outlet></router-outlet>
</div>

View File

@ -1,136 +1,8 @@
import {
gradientStartColor,
softwareColor, softwarePalette, resultsPalette
} from '../../../../chart-palettes';
import { Component, OnInit } from '@angular/core';
import { environment } from '../../../../../environments/environment';
import { DataHandlerService } from '../../../../services/data-handler.service';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { DataService } from '../../../../services/data.service';
import { ActivatedRoute } from '@angular/router';
import { TreemapHighchartsData } from '../../../../domain/treemap-highcharts-data';
import { Component } from '@angular/core';
@Component({
selector: 'app-country-os-software',
templateUrl: './country-os-software.component.html',
})
export class CountryOSSoftwareComponent implements OnInit {
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
private profileName = environment.profileName;
private softwarePalette = softwarePalette;
private resultsPalette = resultsPalette;
softwareColor = softwareColor;
gradientStartColor = gradientStartColor;
countryCode: string;
softwareWithPIDTimeline: SafeResourceUrl;
softwareWithLicenceTimeline: SafeResourceUrl;
softwareWithPIDGroupByView = 'datasource';
softwareWithPIDByDatasourceChartURL: SafeResourceUrl;
softwareWithPIDByOrganizationChartURL: SafeResourceUrl;
softwareWithPIDByDatasourceChartURLMobile: SafeResourceUrl;
softwareWithPIDByOrganizationChartURLMobile: SafeResourceUrl;
softwareWithLicenceGroupByView = 'datasource';
softwareWithLicenceByDatasourceChartURL: SafeResourceUrl;
softwareWithLicenceByOrganizationChartURL: SafeResourceUrl;
softwareWithLicenceByDatasourceChartURLMobile: SafeResourceUrl;
softwareWithLicenceByOrganizationChartURLMobile: SafeResourceUrl;
softwareWithPIDByFunderData: TreemapHighchartsData[];
softwareWithLicenceByFunderData: TreemapHighchartsData[];
constructor(private dataService: DataService,
private dataHandlerService: DataHandlerService,
private route: ActivatedRoute,
private sanitizer: DomSanitizer) { }
ngOnInit(): void {
this.route.parent.parent.parent.params.subscribe(params => {
this.countryCode = params['countryCode'];
// this.softwareWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
this.softwareWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// this.softwareWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
this.softwareWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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('","')}\"]}}`));
// this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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('","')}\"]}}`));
// this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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('","')}\"]}}`));
// this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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('","')}\"]}}`));
// this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.softwareWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.dataService.getFundersResultsByTypeForIndicatorForCountry('software', 'pid', this.countryCode).subscribe(
rawData => {
this.softwareWithPIDByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByTypeForIndicatorForCountry('software', 'licence', this.countryCode).subscribe(
rawData => {
this.softwareWithLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
});
}
getSoftwareWithPIDGroupBy(contentSelection: string): void {
this.softwareWithPIDGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithPIDByDatasourceChartURL) {
this.softwareWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithPIDByOrganizationChartURL) {
this.softwareWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithPIDGroupByMobile(contentSelection: string): void {
this.softwareWithPIDGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithPIDByDatasourceChartURLMobile) {
this.softwareWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithPIDByOrganizationChartURLMobile) {
this.softwareWithPIDByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with PID","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithLicenceGroupBy(contentSelection: string): void {
this.softwareWithLicenceGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithLicenceByDatasourceChartURL) {
this.softwareWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithLicenceByOrganizationChartURL) {
this.softwareWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getSoftwareWithLicenceGroupByMobile(contentSelection: string): void {
this.softwareWithLicenceGroupByView = contentSelection;
if (contentSelection === 'datasource' && !this.softwareWithLicenceByDatasourceChartURLMobile) {
this.softwareWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.softwareWithLicenceByOrganizationChartURLMobile) {
this.softwareWithLicenceByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization.country","parameters":["software","${this.countryCode}"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OS Software with licence","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},"color":{"linearGradient":{"x1":0,"y1":0,"x2":0,"y2":1},"stops":[[0,"${this.softwareColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
}
export class CountryOSSoftwareComponent {}

View File

@ -0,0 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CountryOpenScienceSoftwareRoutingModule } from './country-os-software-routing.module';
import { ReusableComponentsModule } from '../../../../shared/reusablecomponents/reusable-components.module';
import { CountryOSSoftwareComponent } from './country-os-software.component';
import { CountryOSSoftwareIndicatorsComponent } from './country-os-software-indicators.component';
import { DataService } from '../../../../services/data.service';
import { DataHandlerService } from '../../../../services/data-handler.service';
@NgModule ({
imports: [
CommonModule,
CountryOpenScienceSoftwareRoutingModule,
ReusableComponentsModule,
],
declarations: [
CountryOSSoftwareComponent,
CountryOSSoftwareIndicatorsComponent,
],
providers: [
DataService,
DataHandlerService
],
})
export class CountryOpenScienceSoftwareModule {}