|
|
|
@ -110,7 +110,7 @@ export class StakeholderCreator {
|
|
|
|
|
}
|
|
|
|
|
let res_access_mode = new Indicator("",null, "chart","small",true, true,[new IndicatorPath("pie", "stats-tool", "chart?json=",
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"'+typePlural+'","type":"'+ChartHelper.prefix+'type'+ChartHelper.suffix+'","query":{"select":[{"field":"'+dbType+'","aggregate":"count"},{"field":"'+dbType+'.access mode","aggregate":null}],"filters":[{"groupFilters":[{"field":"'+dbType+'.project.funder","type":"=","values":["'+ChartHelper.prefix+'funder_name'+ChartHelper.suffix+'"]}],"op":"AND"}'+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+ChartHelper.prefix+'title'+ChartHelper.suffix+'"},"subtitle":{},"yAxis":{"title":{"text":"'+typePlural+'"}},"xAxis":{"title":{"text":"Year"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}', null)]);
|
|
|
|
|
res_access_mode.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,chartTitle[index] + typeSingl+" acccess mode","pie");
|
|
|
|
|
res_access_mode.indicatorPaths[0].parameters = IndicatorPath.createParameters(stakeholder.index_name,chartTitle[index] + typeSingl+" access mode","pie");
|
|
|
|
|
res_access_mode.indicatorPaths[0].filters = IndicatorPath.createResultFilters(dbType);
|
|
|
|
|
pubDefSub.charts.push(res_access_mode);
|
|
|
|
|
|
|
|
|
@ -185,20 +185,21 @@ export class StakeholderCreator {
|
|
|
|
|
static createOpenAccessTopic(stakeholder:Stakeholder):Category {
|
|
|
|
|
let category = new Category("Open Access", "", "open-access", true, true);
|
|
|
|
|
category.subCategories.push(this.createOASub(stakeholder,"Publications","Publication","publication","publications"));
|
|
|
|
|
// category.subCategories.push(this.createOASub(stakeholder,"Research data","Research data","dataset","datasets"));
|
|
|
|
|
// category.subCategories.push(this.createOASub(stakeholder,"Software","Software","software","software"));
|
|
|
|
|
// category.subCategories.push(this.createOASub(stakeholder,"Other research products","Other research product","other","other"));
|
|
|
|
|
category.subCategories.push(this.createOASub(stakeholder,"Research data","Research data","dataset","datasets"));
|
|
|
|
|
category.subCategories.push(this.createOASub(stakeholder,"Software","Software","software","software"));
|
|
|
|
|
category.subCategories.push(this.createOASub(stakeholder,"Other research products","Other research product","other","other"));
|
|
|
|
|
return category;
|
|
|
|
|
}
|
|
|
|
|
static createOASub(stakeholder:Stakeholder,typePlural, typeSingl, dbType, dbTypePlural ):SubCategory {
|
|
|
|
|
let sub:SubCategory = new SubCategory(typePlural, null, dbTypePlural, true, true);
|
|
|
|
|
sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 0 ));
|
|
|
|
|
sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 1 ));
|
|
|
|
|
// sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 2 ));
|
|
|
|
|
sub.charts = sub.charts.concat( this.createOAPerType(stakeholder,typePlural, typeSingl, dbType, dbTypePlural, 2 ));
|
|
|
|
|
return sub;
|
|
|
|
|
}
|
|
|
|
|
static createOAPerType(stakeholder:Stakeholder,typePlural, typeSingl, dbType, dbTypePlural, index:number):Indicator[] {
|
|
|
|
|
|
|
|
|
|
//default pallette: "colors":["#2f7ed8","#0d233a","#8bbc21","#910000","#1aadce","#492970","#f28f43","#77a1e5","#c42525","#a6c96a"]
|
|
|
|
|
let greenAndGoldPalette = ', "colors":["#239D60","#F8B500"]';
|
|
|
|
|
let fundingFilter = ['', '{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["FP7"]}],"op":"AND"}',
|
|
|
|
|
'{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["H2020"]}],"op":"AND"}'];
|
|
|
|
|
let fieldValue = ["", "FP7", "H2020"];
|
|
|
|
@ -208,7 +209,7 @@ export class StakeholderCreator {
|
|
|
|
|
|
|
|
|
|
let open_non_url = "http://88.197.53.71:8080/stats-api/chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","color":"#e62020ee","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.oavsnonoa"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+chartTitle[index]+' Open Access vs Non Open Access"},"subtitle":{},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"pie","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.greenvsgold"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{},"subtitle":{},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let open_non_ind:Indicator = new Indicator(chartTitle[index], "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_url, "pie")])
|
|
|
|
|
let open_non_ind:Indicator = new Indicator(chartTitle[index]+" Overview", "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_url, "pie")])
|
|
|
|
|
open_non_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
if(index!=0){
|
|
|
|
|
open_non_ind.recommendedFor.push("ec__________::EC");
|
|
|
|
@ -223,8 +224,7 @@ export class StakeholderCreator {
|
|
|
|
|
gold_vs_green_ind.recommendedFor.push("ec__________::EC");
|
|
|
|
|
}
|
|
|
|
|
indicators.push(gold_vs_green_ind);
|
|
|
|
|
|
|
|
|
|
let gold_vs_green_time_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA","type":"column","color":"#F8B500","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.gold.year"}},{"name":"Green OA","type":"column","color":"#239D60","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.green.year"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Green vs Gold Open Access"},"subtitle":{"text":"by year"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let gold_vs_green_time_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"column","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.green.year"}},{"name":"Gold OA","type":"column","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + (index == 2 ? ".h2020" : (index == 1 ? ".fp7" : "")) + '.' + dbTypePlural + '.gold.year"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + ' Green vs Gold Open Access"},"subtitle":{"text":"by year"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}'+greenAndGoldPalette+'}}');
|
|
|
|
|
let gold_vs_green_time_ind: Indicator = (new Indicator("", "", "chart", "small", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_vs_green_time_url, "column")]));
|
|
|
|
|
gold_vs_green_time_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
if (index != 0) {
|
|
|
|
@ -233,7 +233,7 @@ export class StakeholderCreator {
|
|
|
|
|
indicators.push(gold_vs_green_time_ind);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let top_project_url = "http://88.197.53.71:8080/stats-api/chart?json="+ encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"monitor.'+ ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.top10projects"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Top 15 projects"},"subtitle":{"text":"by publications"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let top_project_url = "http://88.197.53.71:8080/stats-api/chart?json="+ encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"monitor.'+ ChartHelper.prefix + 'id' + ChartHelper.suffix +(index==2?".h2020":(index==1?".fp7":""))+ '.' + dbTypePlural+'.top10projects"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Top 10 projects"},"subtitle":{"text":"by '+typePlural+'"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let top_project_ind:Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_project_url, "column")]));
|
|
|
|
|
top_project_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
if(index!=0){
|
|
|
|
@ -241,44 +241,47 @@ export class StakeholderCreator {
|
|
|
|
|
}
|
|
|
|
|
indicators.push(top_project_ind);
|
|
|
|
|
if(index == 0) {
|
|
|
|
|
let top_datasources_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","color":"#42a5f5","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + '.' + dbTypePlural + '.top10datasources"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Top 10 Datasources"},"subtitle":{},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let top_datasources_url = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Data","type":"bar","query":{"name":"monitor.' + ChartHelper.prefix + 'id' + ChartHelper.suffix + '.' + dbTypePlural + '.top10datasources"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Top 10 Datasources"},"subtitle":{},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let top_datasources_ind: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", top_datasources_url, "column")]));
|
|
|
|
|
top_datasources_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(top_datasources_ind);
|
|
|
|
|
}
|
|
|
|
|
if(index != 0) {
|
|
|
|
|
let open_non_fl2 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access vs Non Open Access"},"subtitle":{"text":"'+chartTitle[index]+'"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let open_non_fl2_ind: Indicator = (new Indicator("By Scientific area", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl2, "column")]));
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Open Access vs Non Open Access"},"subtitle":{"text":"By Scientific area"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let open_non_fl2_ind: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl2, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(open_non_fl2_ind);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
open_non_fl2_ind.recommendedFor.push("ec__________::EC");
|
|
|
|
|
}
|
|
|
|
|
let gold_green__fl2 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Green vs Gold Open Access"},"subtitle":{"text":"' + chartTitle[index] + '"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let gold_green_ind_fl2: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl2, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(gold_green_ind_fl2);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
gold_green_ind_fl2.recommendedFor.push("ec__________::EC");
|
|
|
|
|
if(dbType == "publication") {
|
|
|
|
|
let gold_green__fl2 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 2","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Green vs Gold Open Access"},"subtitle":{"text":"By Scientific area"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}'+greenAndGoldPalette+'}}');
|
|
|
|
|
let gold_green_ind_fl2: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl2, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(gold_green_ind_fl2);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
gold_green_ind_fl2.recommendedFor.push("ec__________::EC");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let open_non_fl1 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access vs Non Open Access"},"subtitle":{"text":"'+chartTitle[index]+'"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let open_non_fl1_ind: Indicator = (new Indicator("By Programme", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl1, "column")]));
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":['+fundingFilter[index]+',{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Non Open Access","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"!=","values":["Open Access"]}],"op":"AND"}'+(fundingFilter[index].length >0?', ':'')+fundingFilter[index]+'],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Open Access vs Non Open Access"},"subtitle":{"text":"By Programme"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let open_non_fl1_ind: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", open_non_fl1, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(open_non_fl1_ind);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
open_non_fl1_ind.recommendedFor.push("ec__________::EC");
|
|
|
|
|
}
|
|
|
|
|
let gold_green__fl1 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Green vs Gold Open Access"},"subtitle":{"text":"' + chartTitle[index] + '"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}');
|
|
|
|
|
let gold_green_ind_fl1: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl1, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(gold_green_ind_fl1);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
gold_green_ind_fl1.recommendedFor.push("ec__________::EC");
|
|
|
|
|
if(dbType == "publication") {
|
|
|
|
|
let gold_green__fl1 = "http://88.197.53.71:8080/stats-api/chart?json=" + encodeURIComponent(
|
|
|
|
|
'{"library":"HighCharts","chartDescription":{"queries":[{"name":"Green OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Gold OA","type":"bar","query":{"select":[{"field":"' + dbType + '","aggregate":"count"},{"field":"' + dbType + '.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"' + dbType + '.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.project.funding level 0","type":"=","values":["' + fieldValue[index] + '"]}],"op":"AND"},{"groupFilters":[{"field":"' + dbType + '.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"}],"entity":"' + dbType + '","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"' + chartTitle[index] + 'Green vs Gold Open Access"},"subtitle":{"text":"By Programme"},"yAxis":{"title":{}},"xAxis":{"title":{}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}'+greenAndGoldPalette+'}}');
|
|
|
|
|
let gold_green_ind_fl1: Indicator = (new Indicator("", "", "chart", "medium", true, true, [utils.generateIndicatorByChartUrl("stats-tool", gold_green__fl1, "column")]));
|
|
|
|
|
// open_non_fl2_ind.indicatorPaths[0].parameters["id"] = stakeholder.index_shortName.toLowerCase();
|
|
|
|
|
indicators.push(gold_green_ind_fl1);
|
|
|
|
|
if (index != 0) {
|
|
|
|
|
gold_green_ind_fl1.recommendedFor.push("ec__________::EC");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -286,16 +289,16 @@ export class StakeholderCreator {
|
|
|
|
|
return indicators;
|
|
|
|
|
}
|
|
|
|
|
static createOSTopic(stakeholder:Stakeholder):Topic{
|
|
|
|
|
let topic = new Topic("Open Science","Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...","open-science",true,true);
|
|
|
|
|
let topic = new Topic("Open Science","","open-science",true,true);
|
|
|
|
|
topic.categories.push(this.createOpenAccessTopic(stakeholder));
|
|
|
|
|
let linked:Category = new Category("Fair / Linked","","linked",true,true);
|
|
|
|
|
let linked:Category = new Category("Fair / Linked","Indicators based on FAIR data maturity model will soon be included","linked",true,true);
|
|
|
|
|
topic.categories.push(linked);
|
|
|
|
|
linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Publications","Publication","publication","publications"));
|
|
|
|
|
linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Research data","Research data","dataset","datasets"));
|
|
|
|
|
linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Software","Software","software","software"));
|
|
|
|
|
linked.subCategories.push(this.createOSOverviewPerType(stakeholder,"Other research products","Other research product","other","other"));
|
|
|
|
|
|
|
|
|
|
let openInfra:Category = new Category("Open Infrastructures","","open-infrastructures",true,true);
|
|
|
|
|
let openInfra:Category = new Category("Open Infrastructures","Indicators based on the use of services for generating, producing and publishing research","open-infrastructures",true,true);
|
|
|
|
|
openInfra.subCategories.push(new SubCategory("Overview","","overview",true,true,true));
|
|
|
|
|
topic.categories.push(openInfra);
|
|
|
|
|
return topic;
|
|
|
|
|