1 |
57592
|
stefania.m
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
2 |
|
|
import { Injectable } from '@angular/core';
|
3 |
|
|
import { Observable } from 'rxjs';
|
4 |
|
|
import { OverviewData } from '../domain/overview-data';
|
5 |
58825
|
stefania.m
|
import { environment } from '../../environments/environment';
|
6 |
|
|
import { RawData } from '../domain/raw-data';
|
7 |
57592
|
stefania.m
|
|
8 |
|
|
const headerOptions = {
|
9 |
|
|
headers : new HttpHeaders().set('Content-Type', 'application/json')
|
10 |
|
|
.set('Accept', 'application/json'),
|
11 |
|
|
};
|
12 |
|
|
|
13 |
|
|
@Injectable ()
|
14 |
|
|
export class DataService {
|
15 |
58825
|
stefania.m
|
|
16 |
57592
|
stefania.m
|
private _jsonURl = 'http://esperos.di.uoa.gr/oss.json';
|
17 |
|
|
|
18 |
58825
|
stefania.m
|
private apiURL = environment.API_ENDPOINT + 'raw?json=';
|
19 |
60835
|
stefania.m
|
private profileName = environment.profileName;
|
20 |
58825
|
stefania.m
|
|
21 |
57592
|
stefania.m
|
constructor(private httpClient: HttpClient) {
|
22 |
|
|
}
|
23 |
|
|
|
24 |
58923
|
stefania.m
|
public getLastUpdateDate(): Observable<RawData> {
|
25 |
60835
|
stefania.m
|
const lastUpdateDateQuery = `{"series":[{"query":{"name":"creation_date","profile":"${this.profileName}"}}],"verbose":true}`;
|
26 |
|
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(lastUpdateDateQuery), headerOptions);
|
27 |
58923
|
stefania.m
|
}
|
28 |
|
|
|
29 |
58825
|
stefania.m
|
public getOverviewMapData(): Observable<RawData> {
|
30 |
60932
|
antonis.le
|
const mapDataQuery = `{"series":[{"query":{"name":"oso.results.affiliated","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories","profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data","profile":"${this.profileName}"}},{"query":{"name":"oso.journals","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies","profile":"${this.profileName}"}}],"verbose":true}`;
|
31 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(mapDataQuery), headerOptions);
|
32 |
58825
|
stefania.m
|
}
|
33 |
|
|
|
34 |
|
|
public getCountryOverviewData(countryCode: string): Observable<RawData> {
|
35 |
60930
|
antonis.le
|
const countryOverviewDataQuery = `{"series":[{"query":{"name":"oso.results.affiliated.country", "parameters":["${countryCode}","publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited.country", "parameters":["${countryCode}","publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated.country", "parameters":["${countryCode}","dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited.country", "parameters":["${countryCode}","dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
36 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryOverviewDataQuery), headerOptions);
|
37 |
58825
|
stefania.m
|
}
|
38 |
|
|
|
39 |
58923
|
stefania.m
|
public getCountryOAData(countryCode: string): Observable<RawData> {
|
40 |
60930
|
antonis.le
|
const countryOADataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["software","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["other","${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
41 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryOADataQuery), headerOptions);
|
42 |
58923
|
stefania.m
|
}
|
43 |
|
|
|
44 |
58825
|
stefania.m
|
public getEuropeOverviewData(): Observable<RawData> {
|
45 |
60930
|
antonis.le
|
const overviewRawDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies.europe","profile":"${this.profileName}"}}],"verbose":true}`;
|
46 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(overviewRawDataQuery), headerOptions);
|
47 |
58825
|
stefania.m
|
}
|
48 |
|
|
|
49 |
|
|
public getOverviewTableAbsoluteData(content: string): Observable<RawData> {
|
50 |
|
|
let overviewTableAbsoluteDataQuery = '';
|
51 |
|
|
if (content === 'affiliated') {
|
52 |
60930
|
antonis.le
|
overviewTableAbsoluteDataQuery = `{"series":[{"query":{"name":"oso.results.affiliated","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories","profile":"${this.profileName}"}},{"query":{"name":"oso.journals","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies","profile":"${this.profileName}"}}],"verbose":true}`;
|
53 |
58825
|
stefania.m
|
} else if (content === 'affiliated_peer_reviewed') {
|
54 |
60930
|
antonis.le
|
overviewTableAbsoluteDataQuery = `{"series":[{"query":{"name":"oso.results.affiliated.peer_reviewed","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated.peer_reviewed","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated.peer_reviewed","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.affiliated.peer_reviewed","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories","profile":"${this.profileName}"}},{"query":{"name":"oso.journals","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies","profile":"${this.profileName}"}}],"verbose":true}`;
|
55 |
58825
|
stefania.m
|
} else if (content === 'deposited') {
|
56 |
60930
|
antonis.le
|
overviewTableAbsoluteDataQuery = `{"series":[{"query":{"name":"oso.results.deposited","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories","profile":"${this.profileName}"}},{"query":{"name":"oso.journals","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies","profile":"${this.profileName}"}}],"verbose":true}`;
|
57 |
58825
|
stefania.m
|
} else if (content === 'deposited_peer_reviewed') {
|
58 |
60930
|
antonis.le
|
overviewTableAbsoluteDataQuery = `{"series":[{"query":{"name":"oso.results.deposited.peer_reviewed","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited.peer_reviewed","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited.peer_reviewed","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.deposited.peer_reviewed","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories","profile":"${this.profileName}"}},{"query":{"name":"oso.journals","profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies","profile":"${this.profileName}"}}],"verbose":true}`;
|
59 |
58825
|
stefania.m
|
}
|
60 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(overviewTableAbsoluteDataQuery), headerOptions);
|
61 |
58825
|
stefania.m
|
}
|
62 |
|
|
|
63 |
|
|
public getOverviewTablePercentageData(content: string): Observable<RawData> {
|
64 |
|
|
let overviewTablePercentageDataQuery = '';
|
65 |
|
|
if (content === 'affiliated') {
|
66 |
60930
|
antonis.le
|
overviewTablePercentageDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.bycountry","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.bycountry","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.bycountry","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.bycountry","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.bycountry","profile":"${this.profileName}"}}],"verbose":true}`;
|
67 |
58825
|
stefania.m
|
} else if (content === 'affiliated_peer_reviewed') {
|
68 |
60930
|
antonis.le
|
overviewTablePercentageDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.affiliated.peer_reviewed.bycountry","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.affiliated.peer_reviewed.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.affiliated.peer_reviewed.bycountry","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.affiliated.peer_reviewed.bycountry","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.bycountry","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.bycountry","profile":"${this.profileName}"}}],"verbose":true}`;
|
69 |
58825
|
stefania.m
|
} else if (content === 'deposited') {
|
70 |
60930
|
antonis.le
|
overviewTablePercentageDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.deposited.bycountry","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.bycountry","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.bycountry","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.bycountry","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.bycountry","profile":"${this.profileName}"}}],"verbose":true}`;
|
71 |
58825
|
stefania.m
|
} else if (content === 'deposited_peer_reviewed') {
|
72 |
60930
|
antonis.le
|
overviewTablePercentageDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.deposited.peer_reviewed.bycountry","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.peer_reviewed.bycountry","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.peer_reviewed.bycountry","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.peer_reviewed.bycountry","parameters":["other"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.bycountry","profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.bycountry","profile":"${this.profileName}"}}],"verbose":true}`;
|
73 |
58825
|
stefania.m
|
}
|
74 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(overviewTablePercentageDataQuery), headerOptions);
|
75 |
58825
|
stefania.m
|
}
|
76 |
|
|
|
77 |
58904
|
stefania.m
|
public getLeadingOpenScienceMobileData(): Observable<RawData> {
|
78 |
60930
|
antonis.le
|
const leadingOpenScienceMobileDataQuery = `{"series":[{"query":{"name":"oso.mobile.overview","profile":"${this.profileName}"}}],"verbose":true}`;
|
79 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(leadingOpenScienceMobileDataQuery), headerOptions);
|
80 |
58904
|
stefania.m
|
}
|
81 |
|
|
|
82 |
58853
|
stefania.m
|
public getEuropeOAPercentages(): Observable<RawData> {
|
83 |
60930
|
antonis.le
|
const europeOAPercentagesQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage","parameters":["publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage","parameters":["dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage","parameters":["software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage","parameters":["other"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
84 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(europeOAPercentagesQuery), headerOptions);
|
85 |
58853
|
stefania.m
|
}
|
86 |
|
|
|
87 |
|
|
public getCountryPageOverviewData(countryCode: string): Observable<RawData> {
|
88 |
60930
|
antonis.le
|
const countryPageOverviewDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.rnd.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funder.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funding_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.ec_funded_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
89 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryPageOverviewDataQuery), headerOptions);
|
90 |
58853
|
stefania.m
|
}
|
91 |
|
|
|
92 |
58912
|
stefania.m
|
public getFundersResults(): Observable<RawData> {
|
93 |
60930
|
antonis.le
|
const fundersResultsQuery = `{"series":[{"query":{"name":"oso.funders.results","profile":"${this.profileName}"}}],"verbose":true}`;
|
94 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsQuery), headerOptions);
|
95 |
58912
|
stefania.m
|
}
|
96 |
58853
|
stefania.m
|
|
97 |
58913
|
stefania.m
|
public getFundersResultsByType(type: string): Observable<RawData> {
|
98 |
60930
|
antonis.le
|
const fundersResultsByTypeQuery = `{"series":[{"query":{"name":"oso.funders.results.type", "parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
99 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeQuery), headerOptions);
|
100 |
58913
|
stefania.m
|
}
|
101 |
58853
|
stefania.m
|
|
102 |
58922
|
stefania.m
|
public getFundersResultsByTypeForPID(type: string): Observable<RawData> {
|
103 |
60930
|
antonis.le
|
const fundersResultsByTypeForPIDQuery = `{"series":[{"query":{"name":"oso.results.pid.affiliated.byfunder", "parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
104 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForPIDQuery), headerOptions);
|
105 |
58922
|
stefania.m
|
}
|
106 |
58853
|
stefania.m
|
|
107 |
58922
|
stefania.m
|
public getFundersResultsByTypeForLicence(type: string): Observable<RawData> {
|
108 |
60930
|
antonis.le
|
const fundersResultsByTypeForLicenceQuery = `{"series":[{"query":{"name":"oso.results.licence.affiliated.byfunder", "parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
109 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForLicenceQuery), headerOptions);
|
110 |
58922
|
stefania.m
|
}
|
111 |
58853
|
stefania.m
|
|
112 |
58922
|
stefania.m
|
public getFundersResultsByTypeForGold(type: string): Observable<RawData> {
|
113 |
60930
|
antonis.le
|
const fundersResultsByTypeForGoldQuery = `{"series":[{"query":{"name":"oso.results.gold.affiliated.byfunder", "parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
114 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForGoldQuery), headerOptions);
|
115 |
58922
|
stefania.m
|
}
|
116 |
58913
|
stefania.m
|
|
117 |
58922
|
stefania.m
|
public getFundersResultsByTypeForGreen(type: string): Observable<RawData> {
|
118 |
60930
|
antonis.le
|
const fundersResultsByTypeForGreenQuery = `{"series":[{"query":{"name":"oso.results.green.affiliated.byfunder", "parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
119 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForGreenQuery), headerOptions);
|
120 |
58922
|
stefania.m
|
}
|
121 |
|
|
|
122 |
58923
|
stefania.m
|
public getFundersResultsByTypeForCountry(type: string, countryCode: string): Observable<RawData> {
|
123 |
60930
|
antonis.le
|
const fundersResultsByTypeForCountryQuery = `{"series":[{"query":{"name":"oso.results.affiliated.byfunder.country", "parameters":["${countryCode}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
124 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForCountryQuery), headerOptions);
|
125 |
58923
|
stefania.m
|
}
|
126 |
58922
|
stefania.m
|
|
127 |
58939
|
stefania.m
|
public getFundersResultsByTypeForIndicatorForCountry(type: string, indicator: string, countryCode: string): Observable<RawData> {
|
128 |
60930
|
antonis.le
|
const fundersResultsByTypeForPIDForCountryQuery = `{"series":[{"query":{"name":"oso.results.${indicator}.affiliated.byfunder.country", "parameters":["${type}","${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
129 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(fundersResultsByTypeForPIDForCountryQuery), headerOptions);
|
130 |
58939
|
stefania.m
|
}
|
131 |
58922
|
stefania.m
|
|
132 |
58946
|
stefania.m
|
public getIndicatorsTableData(type: string, content: string): Observable<RawData> {
|
133 |
58996
|
stefania.m
|
|
134 |
58946
|
stefania.m
|
let indicatorsTableDataQuery = '';
|
135 |
|
|
if (content === 'affiliated') {
|
136 |
60933
|
antonis.le
|
indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
137 |
58946
|
stefania.m
|
} else if (content === 'affiliated_peer_reviewed') {
|
138 |
60948
|
antonis.le
|
indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
139 |
58946
|
stefania.m
|
} else if (content === 'deposited') {
|
140 |
60930
|
antonis.le
|
indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
141 |
58946
|
stefania.m
|
} else if (content === 'deposited_peer_reviewed') {
|
142 |
60930
|
antonis.le
|
indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
|
143 |
58946
|
stefania.m
|
}
|
144 |
60835
|
stefania.m
|
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(indicatorsTableDataQuery), headerOptions);
|
145 |
58946
|
stefania.m
|
}
|
146 |
58922
|
stefania.m
|
|
147 |
58939
|
stefania.m
|
|
148 |
57592
|
stefania.m
|
public getOverviewData(): Observable<OverviewData> {
|
149 |
|
|
return this.httpClient.get<OverviewData>(this._jsonURl, headerOptions);
|
150 |
|
|
}
|
151 |
|
|
|
152 |
57666
|
stefania.m
|
public getCountryData(countryName: string) {
|
153 |
57893
|
stefania.m
|
return this.httpClient.get<OverviewData>(this._jsonURl, headerOptions);
|
154 |
57666
|
stefania.m
|
}
|
155 |
57592
|
stefania.m
|
}
|