Finished the changes in the home page
This commit is contained in:
parent
4e8be3992e
commit
defebc02b9
|
@ -37,7 +37,8 @@ export const softwareColor = '#009DE0';
|
|||
// export const otherResearchProductsColor = '#00b8d0';
|
||||
export const otherResearchProductsColor = '#00B086';
|
||||
|
||||
export const nonOAColor = '#787878';
|
||||
// export const nonOAColor = '#787878';
|
||||
export const nonOAColor = '#c3cad2';
|
||||
export const noIndicatorColor = '#c3cad2';
|
||||
|
||||
// export const resultColor = '#072AE6';
|
||||
|
|
|
@ -76,7 +76,7 @@ export class ContinentOSPublicationsIndicatorsComponent implements OnInit {
|
|||
|
||||
loadingPublicationsAbsoluteTable: boolean = true;
|
||||
loadingPublicationsPercentageTable: boolean = true;
|
||||
publicationsTableContentSelection: string = 'affiliated';
|
||||
publicationsTableContentSelection: string = 'affiliated_peer_reviewed';
|
||||
publicationsAbsoluteTableData: CountryTableData[];
|
||||
publicationsPercentageTableData: CountryTableData[];
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
<div class="uk-margin-bottom">
|
||||
<label class="uk-margin-right">Show: </label>
|
||||
<select class="md-input" #selectContentAbsolute (change)="getContentAbsolute(selectContentAbsolute.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>
|
||||
<option value="affiliated_peer_reviewed">affiliated</option>
|
||||
<option value="affiliated">affiliated (incl. non-peer reviewed publications)</option>
|
||||
<option value="deposited_peer_reviewed">deposited</option>
|
||||
<option value="deposited">deposited (incl. non-peer reviewed publications)</option>
|
||||
</select>
|
||||
<!--<span class="md-input-bar"></span>-->
|
||||
</div>
|
||||
|
@ -45,10 +45,10 @@
|
|||
<div class="uk-margin-bottom">
|
||||
<label class="uk-margin-right">Show: </label>
|
||||
<select class="md-input" #selectContentPercentage (change)="getContentPercentage(selectContentPercentage.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>
|
||||
<option value="affiliated_peer_reviewed">affiliated</option>
|
||||
<option value="affiliated">affiliated (incl. non-peer reviewed publications)</option>
|
||||
<option value="deposited_peer_reviewed">deposited</option>
|
||||
<option value="deposited">deposited (incl. non-peer reviewed publications)</option>
|
||||
</select>
|
||||
<!--<span class="md-input-bar"></span>-->
|
||||
</div>
|
||||
|
|
|
@ -28,8 +28,8 @@ export class DataViewComponent implements OnInit {
|
|||
private resultColor = resultColor;
|
||||
|
||||
activeView: string = 'absolute';
|
||||
contentAbsoluteSelection: string = 'affiliated';
|
||||
contentPercentageSelection: string = 'affiliated';
|
||||
contentAbsoluteSelection: string = 'affiliated_peer_reviewed';
|
||||
contentPercentageSelection: string = 'affiliated_peer_reviewed';
|
||||
|
||||
tableAbsoluteData: CountryTableData[];
|
||||
tablePercentageData: CountryTableData[];
|
||||
|
@ -118,16 +118,16 @@ export class DataViewComponent implements OnInit {
|
|||
if (view === 'graph') {
|
||||
|
||||
if (!this.oaNoaPublicationsTimelineURL) {
|
||||
this.oaNoaPublicationsTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["publication"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["publication"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
||||
this.oaNoaPublicationsTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"new.oso.publication_timeline.peer_reviewed.results.oa","parameters":[1],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"new.oso.publication_timeline.peer_reviewed.results.oa","parameters":[0],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.publicationPalette.join('","')}\"]}}`));
|
||||
}
|
||||
if (!this.oaNoaDatasetsTimelineURL) {
|
||||
this.oaNoaDatasetsTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["dataset"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Datasets","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
||||
this.oaNoaDatasetsTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["dataset"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["dataset"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Datasets","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.datasetPalette.join('","')}\"]}}`));
|
||||
}
|
||||
if (!this.oaNoaSoftwareTimelineURL) {
|
||||
this.oaNoaSoftwareTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["software"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Software","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
||||
this.oaNoaSoftwareTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["software"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["software"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Software","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.softwarePalette.join('","')}\"]}}`));
|
||||
}
|
||||
if (!this.oaNoaOtherTimelineURL) {
|
||||
this.oaNoaOtherTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA Other Research Products","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["other"],"profile":"${this.profileName}"}},{"name":"Non-OA Other Research Products","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Other Research Products","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""}},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
||||
this.oaNoaOtherTimelineURL = this.sanitizer.bypassSecurityTrustResourceUrl(this.chartsURL + encodeURIComponent(`{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA","type":"column","query":{"name":"oso.result_timeline.results.oa","parameters":["other"],"profile":"${this.profileName}"}},{"name":"Non-OA","type":"column","query":{"name":"oso.result_timeline.results.non_oa","parameters":["other"],"profile":"${this.profileName}"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Other Research Products","align":"left","margin":50},"subtitle":{},"yAxis":{"title":{"text":""},"reversedStacks":false},"xAxis":{"title":{"text":""}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false},"stacking":"normal"}},"legend":{"enabled":true},"credits":{"href":null,"enabled":false},"colors":[\"${this.otherResearchProductsPalette.join('","')}\"]}}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export class DataHandlerService {
|
|||
|
||||
for (const series of rawData.datasets) {
|
||||
|
||||
if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('publication')) {
|
||||
if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated') {
|
||||
overviewMapData.publications = this.rawResultToCountryMapData(series.series.result);
|
||||
} else if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('dataset')) {
|
||||
overviewMapData.datasets = this.rawResultToCountryMapData(series.series.result);
|
||||
|
@ -57,7 +57,7 @@ export class DataHandlerService {
|
|||
const joinedPublicationsMap = new Map();
|
||||
|
||||
for (const series of rawData.datasets) {
|
||||
if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('publication')) {
|
||||
if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated') {
|
||||
|
||||
for (const rowResult of series.series.result) {
|
||||
if (joinedPublicationsMap.has(rowResult.row[1])) {
|
||||
|
@ -71,7 +71,7 @@ export class DataHandlerService {
|
|||
}
|
||||
}
|
||||
|
||||
} else if (series.series.query.name === 'oso.results.deposited' && series.series.query.parameters.includes('publication')) {
|
||||
} else if (series.series.query.name === 'new.oso.publications.peer_reviewed.deposited') {
|
||||
|
||||
for (const rowResult of series.series.result) {
|
||||
if (joinedPublicationsMap.has(rowResult.row[1])) {
|
||||
|
@ -209,9 +209,9 @@ export class DataHandlerService {
|
|||
|
||||
for (const series of rawData.datasets) {
|
||||
|
||||
if (series.series.query.name === 'oso.results.affiliated.country' && series.series.query.parameters.includes('publication')) {
|
||||
if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated.country') {
|
||||
countryData.publicationsAffiliated = Number(series.series.result[0].row[0]);
|
||||
} else if (series.series.query.name === 'oso.results.deposited.country' && series.series.query.parameters.includes('publication')) {
|
||||
} else if (series.series.query.name === 'new.oso.publications.peer_reviewed.deposited.country') {
|
||||
countryData.publicationsDeposited = Number(series.series.result[0].row[0]);
|
||||
} else if (series.series.query.name === 'oso.results.affiliated.country' && series.series.query.parameters.includes('dataset')) {
|
||||
countryData.datasetsAffiliated = Number(series.series.result[0].row[0]);
|
||||
|
@ -588,7 +588,7 @@ export class DataHandlerService {
|
|||
const tableData: CountryTableData[] = [];
|
||||
|
||||
mapTableData.forEach((value: CountryTableData, key: string) => {
|
||||
// console.log(key, value);
|
||||
console.log(key, value);
|
||||
tableData.push(value);
|
||||
});
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ export class DataService {
|
|||
}
|
||||
|
||||
public getOverviewMapData(): Observable<RawData> {
|
||||
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}`;
|
||||
const mapDataQuery = `{"series":[{"query":{"name":"new.oso.publications.peer_reviewed.affiliated","profile":"${this.profileName}"}},{"query":{"name":"new.oso.publications.peer_reviewed.deposited","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}`;
|
||||
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(mapDataQuery), headerOptions);
|
||||
}
|
||||
|
||||
public getCountryOverviewData(countryCode: string): Observable<RawData> {
|
||||
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}`;
|
||||
const countryOverviewDataQuery = `{"series":[{"query":{"name":"new.oso.publications.peer_reviewed.affiliated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"new.oso.publications.peer_reviewed.deposited.country", "parameters":["${countryCode}"],"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}`;
|
||||
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryOverviewDataQuery), headerOptions);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ export class DataService {
|
|||
}
|
||||
|
||||
public getLeadingOpenScienceMobileData(): Observable<RawData> {
|
||||
const leadingOpenScienceMobileDataQuery = `{"series":[{"query":{"name":"oso.mobile.overview","profile":"${this.profileName}"}}],"verbose":true}`;
|
||||
const leadingOpenScienceMobileDataQuery = `{"series":[{"query":{"name":"new.oso.mobile.overview","profile":"${this.profileName}"}}],"verbose":true}`;
|
||||
return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(leadingOpenScienceMobileDataQuery), headerOptions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue