continent datasets page, indicators have their own routes

This commit is contained in:
Andreas Mantas 2021-09-03 15:47:14 +00:00
parent e77ec3c8c5
commit 253d3b42be
8 changed files with 454 additions and 598 deletions

View File

@ -24,7 +24,8 @@ const continentOpenScienceRoutes: Routes = [
},
{
path: 'datasets',
component: ContinentOSDatasetsComponent,
loadChildren: () => import('./datasets/continent-os-datasets.module').then(m => m.ContinentOpenScienceDatasetsModule),
// component: ContinentOSDatasetsComponent,
},
{
path: 'software',

View File

@ -21,7 +21,7 @@ import { ContinentOSPublicationsIndicatorsComponent } from './publications/conti
ContinentOpenScienceComponent,
// ContinentOSPublicationsComponent,
// ContinentOSPublicationsIndicatorsComponent,
ContinentOSDatasetsComponent,
// ContinentOSDatasetsComponent,
ContinentOSSoftwareComponent,
ContinentOSORPComponent
],

View File

@ -0,0 +1,204 @@
<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="datasetsWithPIDTimeline" width="100%" height="550" [src]="datasetsWithPIDTimeline"></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)="getDatasetsWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithPIDGroupByView==='country' && datasetsWithPIDByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='datasource' && datasetsWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='organization' && datasetsWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithPIDGroupByView==='funder' && datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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)="getDatasetsWithPIDGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithPIDByCountryChartURL"
width="100%" height="350" [src]="datasetsWithPIDByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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="datasetsWithLicenceTimeline" width="100%" height="550" [src]="datasetsWithLicenceTimeline"></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)="getDatasetsWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithLicenceGroupByView==='country' && datasetsWithLicenceByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='datasource' && datasetsWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='organization' && datasetsWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithLicenceGroupByView==='funder' && datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></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)="getDatasetsWithLicenceGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithLicenceByCountryChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="indicator && indicator=='more-details'" class="indicatorsTable uk-visible@m uk-margin-large-top">
<h3 class="">More details for datasets</h3>
<div class="uk-margin-top uk-margin-bottom">
<label class="uk-margin-right">Show: </label>
<select class="md-input" #selectDatasetsContent (change)="getContent('dataset', selectDatasetsContent.value)" style="width: 230px; display: inline-block">
<option value="affiliated">affiliated</option>
<option value="affiliated_peer_reviewed">affiliated peer reviewed</option>
<option value="deposited">deposited</option>
<option value="deposited_peer_reviewed">deposited peer reviewed</option>
</select>
<!--<span class="md-input-bar"></span>-->
</div>
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-2@m">
<div class="absoluteTable">
<div class="md-card chartCard">
<div class="md-card-content">
<ul class="uk-subnav uk-subnav-pill dataView uk-flex uk-flex-center" data-uk-switcher="{connect:'#data-indicators-content-a-fade', animation: 'fade'}">
<li aria-expanded="true" class="uk-active">
<a href="#">
<i class="fas fa-hashtag"></i>
</a>
</li>
<li aria-expanded="false" class="">
<a href="#">
<i class="fas fa-percentage"></i>
</a>
</li>
</ul>
<ul id="data-indicators-content-a-fade" class="uk-switcher uk-margin" >
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<div *ngIf="loadingPublicationsAbsoluteTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsAbsoluteTableData" [isPercentage]="false" [countries]="datasetsAbsoluteTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<div *ngIf="loadingPublicationsPercentageTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsPercentageTableData" [isPercentage]="true" [countries]="datasetsPercentageTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,185 @@
import { Component, OnInit } from '@angular/core';
import {
datasetColor,
datasetPalette,
gradientStartColor,
} from '../../../../chart-palettes';
import {environment} from '../../../../../environments/environment';
import {CountryTableData} from '../../../../domain/overview-map-data';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {TreemapHighchartsData} from '../../../../domain/treemap-highcharts-data';
import {DataHandlerService} from '../../../../services/data-handler.service';
import {DataService} from '../../../../services/data.service';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'app-continent-os-datasets-indicators',
templateUrl: './continent-os-datasets-indicators.component.html',
})
export class ContinentOSDatasetsIndicatorsComponent implements OnInit {
indicator: string;
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
private profileName = environment.profileName;
private datasetPalette = datasetPalette;
datasetColor = datasetColor;
gradientStartColor = gradientStartColor;
datasetsWithPIDTimeline: SafeResourceUrl;
datasetsWithLicenceTimeline: SafeResourceUrl;
datasetsWithPIDGroupByView = 'country';
datasetsWithPIDByCountryChartURL: SafeResourceUrl;
datasetsWithPIDByDatasourceChartURL: SafeResourceUrl;
datasetsWithPIDByOrganizationChartURL: SafeResourceUrl;
datasetsWithPIDByCountryChartURLMobile: SafeResourceUrl;
datasetsWithPIDByDatasourceChartURLMobile: SafeResourceUrl;
datasetsWithPIDByOrganizationChartURLMobile: SafeResourceUrl;
datasetsWithLicenceGroupByView = 'country';
datasetsWithLicenceByCountryChartURL: SafeResourceUrl;
datasetsWithLicenceByDatasourceChartURL: SafeResourceUrl;
datasetsWithLicenceByOrganizationChartURL: SafeResourceUrl;
datasetsWithLicenceByCountryChartURLMobile: SafeResourceUrl;
datasetsWithLicenceByDatasourceChartURLMobile: SafeResourceUrl;
datasetsWithLicenceByOrganizationChartURLMobile: SafeResourceUrl;
datasetsWithPIDByFunderData: TreemapHighchartsData[];
datasetsWithLicenceByFunderData: TreemapHighchartsData[];
loadingDatasetsAbsoluteTable: boolean = true;
loadingDatasetsPercentageTable: boolean = true;
datasetsTableContentSelection: string = 'affiliated';
datasetsAbsoluteTableData: CountryTableData[];
datasetsPercentageTableData: CountryTableData[];
constructor(private dataService: DataService,
private dataHandlerService: DataHandlerService,
private route: ActivatedRoute,
private sanitizer: DomSanitizer) { }
ngOnInit(): void {
this.route.params.subscribe(params => {
this.indicator = params['indicator'];
});
// this.datasetsWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
this.datasetsWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// this.datasetsWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
this.datasetsWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
//
// // this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithPIDByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithLicenceByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.dataService.getFundersResultsByTypeForPID('dataset').subscribe(
rawData => {
this.datasetsWithPIDByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByTypeForLicence('dataset').subscribe(
rawData => {
this.datasetsWithLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.getDatasetsTableData(this.datasetsTableContentSelection);
}
getDatasetsTableData(contentSelection: string) {
this.loadingDatasetsAbsoluteTable = true;
this.loadingDatasetsPercentageTable = true;
this.dataService.getIndicatorsTableData('dataset', contentSelection).subscribe(
rawData => {
this.datasetsAbsoluteTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.datasetsPercentageTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.loadingDatasetsAbsoluteTable = false;
this.loadingDatasetsPercentageTable = false;
}, error => {
console.log(error);
this.loadingDatasetsAbsoluteTable = false;
this.loadingDatasetsPercentageTable = false;
}
);
}
getContent(type: string, contentSelection: string): void {
this.datasetsTableContentSelection = contentSelection;
this.getDatasetsTableData(this.datasetsTableContentSelection);
}
getDatasetsWithPIDGroupBy(contentSelection: string): void {
this.datasetsWithPIDGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithPIDByCountryChartURL) {
this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithPIDByDatasourceChartURL) {
this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithPIDByOrganizationChartURL) {
this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithPIDGroupByMobile(contentSelection: string): void {
this.datasetsWithPIDGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithPIDByCountryChartURLMobile) {
this.datasetsWithPIDByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithPIDByDatasourceChartURLMobile) {
this.datasetsWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithPIDByOrganizationChartURLMobile) {
this.datasetsWithPIDByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithLicenceGroupBy(contentSelection: string): void {
this.datasetsWithLicenceGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithLicenceByCountryChartURL) {
this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithLicenceByDatasourceChartURL) {
this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithLicenceByOrganizationChartURL) {
this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithLicenceGroupByMobile(contentSelection: string): void {
this.datasetsWithLicenceGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithLicenceByCountryChartURLMobile) {
this.datasetsWithLicenceByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithLicenceByDatasourceChartURLMobile) {
this.datasetsWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithLicenceByOrganizationChartURLMobile) {
this.datasetsWithLicenceByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[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 { ContinentOSDatasetsComponent } from './continent-os-datasets.component';
import { ContinentOSDatasetsIndicatorsComponent } from './continent-os-datasets-indicators.component';
const continentOpenScienceDatasetsRoutes: Routes = [
{
path: '',
component: ContinentOSDatasetsComponent,
children : [
{
path: '',
redirectTo: 'pid',
pathMatch: 'full',
},
{
path: ':indicator',
component: ContinentOSDatasetsIndicatorsComponent,
}
]
},
];
@NgModule ({
imports: [RouterModule.forChild(continentOpenScienceDatasetsRoutes)],
exports: [RouterModule]
})
export class ContinentOpenScienceDatasetsRoutingModule {}

View File

@ -1,431 +1,11 @@
<div>
<ul uk-tab class="uk-tab-large">
<li><a href="#">PID</a></li>
<li><a href="#">Licence</a></li>
<li class="uk-visible@m"><a href="#">More Details</a></li>
<li [routerLinkActive]="['uk-active']"><a [routerLink]="['./pid']">PID</a></li>
<li [routerLinkActive]="['uk-active']"><a [routerLink]="['./licence']">Licence</a></li>
<li [routerLinkActive]="['uk-active']" class="uk-visible@m"><a [routerLink]="['./more-details']">More Details</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="datasetsWithPIDTimeline" width="100%" height="550" [src]="datasetsWithPIDTimeline"></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)="getDatasetsWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithPIDGroupByView==='country' && datasetsWithPIDByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='datasource' && datasetsWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='organization' && datasetsWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithPIDGroupByView==='funder' && datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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)="getDatasetsWithPIDGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithPIDByCountryChartURL"
width="100%" height="350" [src]="datasetsWithPIDByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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="datasetsWithLicenceTimeline" width="100%" height="550" [src]="datasetsWithLicenceTimeline"></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)="getDatasetsWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithLicenceGroupByView==='country' && datasetsWithLicenceByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='datasource' && datasetsWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='organization' && datasetsWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithLicenceGroupByView==='funder' && datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></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)="getDatasetsWithLicenceGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithLicenceByCountryChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li>
<div class="indicatorsTable uk-visible@m uk-margin-large-top">
<h3 class="">More details for datasets</h3>
<div class="uk-margin-top uk-margin-bottom">
<label class="uk-margin-right">Show: </label>
<select class="md-input" #selectDatasetsContent (change)="getContent('dataset', selectDatasetsContent.value)" style="width: 230px; display: inline-block">
<option value="affiliated">affiliated</option>
<option value="affiliated_peer_reviewed">affiliated peer reviewed</option>
<option value="deposited">deposited</option>
<option value="deposited_peer_reviewed">deposited peer reviewed</option>
</select>
<!--<span class="md-input-bar"></span>-->
</div>
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-2@m">
<div class="absoluteTable">
<div class="md-card chartCard">
<div class="md-card-content">
<ul class="uk-subnav uk-subnav-pill dataView uk-flex uk-flex-center" data-uk-switcher="{connect:'#data-indicators-content-a-fade', animation: 'fade'}">
<li aria-expanded="true" class="uk-active">
<a href="#">
<i class="fas fa-hashtag"></i>
</a>
</li>
<li aria-expanded="false" class="">
<a href="#">
<i class="fas fa-percentage"></i>
</a>
</li>
</ul>
<ul id="data-indicators-content-a-fade" class="uk-switcher uk-margin" >
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<div *ngIf="loadingPublicationsAbsoluteTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsAbsoluteTableData" [isPercentage]="false" [countries]="datasetsAbsoluteTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<div *ngIf="loadingPublicationsPercentageTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsPercentageTableData" [isPercentage]="true" [countries]="datasetsPercentageTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
</ul>
</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="datasetsWithPIDTimeline" width="100%" height="550" [src]="datasetsWithPIDTimeline"></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)="getDatasetsWithPIDGroupByMobile(selectPIDGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithPIDGroupByView==='country' && datasetsWithPIDByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='datasource' && datasetsWithPIDByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithPIDGroupByView==='organization' && datasetsWithPIDByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithPIDByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithPIDGroupByView==='funder' && datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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)="getDatasetsWithPIDGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithPIDGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithPIDByCountryChartURL"
width="100%" height="350" [src]="datasetsWithPIDByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithPIDByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithPIDByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithPIDByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithPIDByFunderData"
[chartTitle]="'OA Datasets with PID by funder'"
[chartData]="datasetsWithPIDByFunderData" [color]="datasetColor"></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="datasetsWithLicenceTimeline" width="100%" height="550" [src]="datasetsWithLicenceTimeline"></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)="getDatasetsWithLicenceGroupByMobile(selectLicenceGroupBy.value)" style="width: 230px; display: inline-block">
<option value="country">country</option>
<option value="datasource">datasource</option>
<option value="organization">organization</option>
<option value="funder">funder</option>
</select>
</div>
<iframe *ngIf="datasetsWithLicenceGroupByView==='country' && datasetsWithLicenceByCountryChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByCountryChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='datasource' && datasetsWithLicenceByDatasourceChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByDatasourceChartURLMobile"></iframe>
<iframe *ngIf="datasetsWithLicenceGroupByView==='organization' && datasetsWithLicenceByOrganizationChartURLMobile"
width="100%" height="550" [src]="datasetsWithLicenceByOrganizationChartURLMobile"></iframe>
<app-treemap-highchart *ngIf="datasetsWithLicenceGroupByView==='funder' && datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></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)="getDatasetsWithLicenceGroupBy('country')">Country</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('datasource')">Datasource</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('organization')">Organization</a></li>
<li><a (click)="getDatasetsWithLicenceGroupBy('funder')">Funder</a></li>
</ul>
<ul id="switcher-content-a-fade-publications" class="uk-switcher uk-margin">
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<iframe *ngIf="datasetsWithLicenceByCountryChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByCountryChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByDatasourceChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByDatasourceChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<iframe *ngIf="datasetsWithLicenceByOrganizationChartURL"
width="100%" height="350" [src]="datasetsWithLicenceByOrganizationChartURL"></iframe>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<app-treemap-highchart *ngIf="datasetsWithLicenceByFunderData"
[chartTitle]="'OA Datasets with licence by funder'"
[chartData]="datasetsWithLicenceByFunderData" [color]="datasetColor"></app-treemap-highchart>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>-->
<!--<div class="indicatorsTable uk-visible@m uk-margin-large-top">
<h3 class="">More details for datasets</h3>
<div class="uk-margin-top uk-margin-bottom">
<label class="uk-margin-right">Show: </label>
<select class="md-input" #selectDatasetsContent (change)="getContent('dataset', selectDatasetsContent.value)" style="width: 230px; display: inline-block">
<option value="affiliated">affiliated</option>
<option value="affiliated_peer_reviewed">affiliated peer reviewed</option>
<option value="deposited">deposited</option>
<option value="deposited_peer_reviewed">deposited peer reviewed</option>
</select>
&lt;!&ndash;<span class="md-input-bar"></span>&ndash;&gt;
</div>
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-2@m">
<div class="absoluteTable">
<div class="md-card chartCard">
<div class="md-card-content">
<ul class="uk-subnav uk-subnav-pill dataView uk-flex uk-flex-center" data-uk-switcher="{connect:'#data-indicators-content-a-fade', animation: 'fade'}">
<li aria-expanded="true" class="uk-active">
<a href="#">
<i class="fas fa-hashtag"></i>
</a>
</li>
<li aria-expanded="false" class="">
<a href="#">
<i class="fas fa-percentage"></i>
</a>
</li>
</ul>
<ul id="data-indicators-content-a-fade" class="uk-switcher uk-margin" >
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;">
<div *ngIf="loadingPublicationsAbsoluteTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsAbsoluteTableData" [isPercentage]="false" [countries]="datasetsAbsoluteTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
<li aria-hidden="true" style="animation-duration: 200ms;" class="">
<div *ngIf="loadingPublicationsPercentageTable" class="whiteFilm"><i class="fa fa-spinner fa-spin fa-2x loader" aria-hidden="true"></i></div>
<app-countries-table *ngIf="datasetsPercentageTableData" [isPercentage]="true" [countries]="datasetsPercentageTableData" [view]="'openScience'" [entity]="'dataset'"></app-countries-table>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>-->
<router-outlet></router-outlet>
</div>

View File

@ -1,178 +1,8 @@
import { Component, OnInit } from '@angular/core';
import {
datasetColor,
datasetPalette,
gradientStartColor,
} from '../../../../chart-palettes';
import {environment} from '../../../../../environments/environment';
import {CountryTableData} from '../../../../domain/overview-map-data';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {TreemapHighchartsData} from '../../../../domain/treemap-highcharts-data';
import {DataHandlerService} from '../../../../services/data-handler.service';
import {DataService} from '../../../../services/data.service';
import {ActivatedRoute} from '@angular/router';
import { Component } from '@angular/core';
@Component({
selector: 'app-continent-os-datasets',
templateUrl: './continent-os-datasets.component.html',
})
export class ContinentOSDatasetsComponent implements OnInit {
private chartsURL = environment.API_ENDPOINT + 'chart?json=';
private profileName = environment.profileName;
private datasetPalette = datasetPalette;
datasetColor = datasetColor;
gradientStartColor = gradientStartColor;
datasetsWithPIDTimeline: SafeResourceUrl;
datasetsWithLicenceTimeline: SafeResourceUrl;
datasetsWithPIDGroupByView = 'country';
datasetsWithPIDByCountryChartURL: SafeResourceUrl;
datasetsWithPIDByDatasourceChartURL: SafeResourceUrl;
datasetsWithPIDByOrganizationChartURL: SafeResourceUrl;
datasetsWithPIDByCountryChartURLMobile: SafeResourceUrl;
datasetsWithPIDByDatasourceChartURLMobile: SafeResourceUrl;
datasetsWithPIDByOrganizationChartURLMobile: SafeResourceUrl;
datasetsWithLicenceGroupByView = 'country';
datasetsWithLicenceByCountryChartURL: SafeResourceUrl;
datasetsWithLicenceByDatasourceChartURL: SafeResourceUrl;
datasetsWithLicenceByOrganizationChartURL: SafeResourceUrl;
datasetsWithLicenceByCountryChartURLMobile: SafeResourceUrl;
datasetsWithLicenceByDatasourceChartURLMobile: SafeResourceUrl;
datasetsWithLicenceByOrganizationChartURLMobile: SafeResourceUrl;
datasetsWithPIDByFunderData: TreemapHighchartsData[];
datasetsWithLicenceByFunderData: TreemapHighchartsData[];
loadingDatasetsAbsoluteTable: boolean = true;
loadingDatasetsPercentageTable: boolean = true;
datasetsTableContentSelection: string = 'affiliated';
datasetsAbsoluteTableData: CountryTableData[];
datasetsPercentageTableData: CountryTableData[];
constructor(private dataService: DataService,
private dataHandlerService: DataHandlerService,
private route: ActivatedRoute,
private sanitizer: DomSanitizer) { }
ngOnInit(): void {
// this.datasetsWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
this.datasetsWithPIDTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.pid_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// this.datasetsWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
this.datasetsWithLicenceTimeline = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"name":"oso.results.licence_timeline.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","align":"left"},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
//
// // this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
// // this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetPalette.join('","')}\"]}}`));
// this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithPIDByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.datasetsWithLicenceByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
this.dataService.getFundersResultsByTypeForPID('dataset').subscribe(
rawData => {
this.datasetsWithPIDByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.dataService.getFundersResultsByTypeForLicence('dataset').subscribe(
rawData => {
this.datasetsWithLicenceByFunderData = this.dataHandlerService.convertRawDataToTreemapHighchartsData(rawData);
}, error => {
console.log(error);
}
);
this.getDatasetsTableData(this.datasetsTableContentSelection);
}
getDatasetsTableData(contentSelection: string) {
this.loadingDatasetsAbsoluteTable = true;
this.loadingDatasetsPercentageTable = true;
this.dataService.getIndicatorsTableData('dataset', contentSelection).subscribe(
rawData => {
this.datasetsAbsoluteTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.datasetsPercentageTableData = this.dataHandlerService.convertRawDataToIndicatorsTableData(rawData);
this.loadingDatasetsAbsoluteTable = false;
this.loadingDatasetsPercentageTable = false;
}, error => {
console.log(error);
this.loadingDatasetsAbsoluteTable = false;
this.loadingDatasetsPercentageTable = false;
}
);
}
getContent(type: string, contentSelection: string): void {
this.datasetsTableContentSelection = contentSelection;
this.getDatasetsTableData(this.datasetsTableContentSelection);
}
getDatasetsWithPIDGroupBy(contentSelection: string): void {
this.datasetsWithPIDGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithPIDByCountryChartURL) {
this.datasetsWithPIDByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithPIDByDatasourceChartURL) {
this.datasetsWithPIDByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithPIDByOrganizationChartURL) {
this.datasetsWithPIDByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithPIDGroupByMobile(contentSelection: string): void {
this.datasetsWithPIDGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithPIDByCountryChartURLMobile) {
this.datasetsWithPIDByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.pid.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with PID","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithPIDByDatasourceChartURLMobile) {
this.datasetsWithPIDByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithPIDByOrganizationChartURLMobile) {
this.datasetsWithPIDByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.pid.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithLicenceGroupBy(contentSelection: string): void {
this.datasetsWithLicenceGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithLicenceByCountryChartURL) {
this.datasetsWithLicenceByCountryChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithLicenceByDatasourceChartURL) {
this.datasetsWithLicenceByDatasourceChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithLicenceByOrganizationChartURL) {
this.datasetsWithLicenceByOrganizationChartURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
getDatasetsWithLicenceGroupByMobile(contentSelection: string): void {
this.datasetsWithLicenceGroupByView = contentSelection;
if (contentSelection === 'country' && !this.datasetsWithLicenceByCountryChartURLMobile) {
this.datasetsWithLicenceByCountryChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"oso.results.licence.affiliated.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets with licence","align":"left","margin":50},"subtitle":{"text":"by country","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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'datasource' && !this.datasetsWithLicenceByDatasourceChartURLMobile) {
this.datasetsWithLicenceByDatasourceChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.bydatasource","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
} else if (contentSelection === 'organization' && !this.datasetsWithLicenceByOrganizationChartURLMobile) {
this.datasetsWithLicenceByOrganizationChartURLMobile = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"publications","type":"bar","query":{"name":"oso.results.licence.affiliated.byorganization","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"OA Datasets 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.datasetColor}"],[1,"${this.gradientStartColor}"]]}}},"legend":{"enabled":false},"credits":{"href":null,"enabled":false}}}`));
}
}
}
export class ContinentOSDatasetsComponent {}

View File

@ -0,0 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ContinentOpenScienceDatasetsRoutingModule } from './continent-os-datasets-routing.module';
import { ReusableComponentsModule } from '../../../../shared/reusablecomponents/reusable-components.module';
import { ContinentOSDatasetsComponent } from './continent-os-datasets.component';
import { ContinentOSDatasetsIndicatorsComponent } from './continent-os-datasets-indicators.component';
import { DataService } from '../../../../services/data.service';
import { DataHandlerService } from '../../../../services/data-handler.service';
@NgModule ({
imports: [
CommonModule,
ContinentOpenScienceDatasetsRoutingModule,
ReusableComponentsModule,
],
declarations: [
ContinentOSDatasetsComponent,
ContinentOSDatasetsIndicatorsComponent,
],
providers: [
DataService,
DataHandlerService
],
})
export class ContinentOpenScienceDatasetsModule {}