Project

General

Profile

1
export class Stakeholder {
2
  id: string;
3
  type: string;
4
  index_id;
5
  index_name: string;
6
  index_shortName:string;
7
  alias: string;
8
  isDefaultProfile: boolean;
9
  isActive: boolean;
10
  isPublic: boolean;
11
  creationDate: string;
12
  updateDate: string;
13
  managers: string[];
14
  topics:Topic[];
15
  constructor( id: string, type: string, index_id, index_name: string, index_shortName:string , isDefaultProfile: boolean, alias:string , isActive: boolean, isPublic: boolean){
16
    this.id = id;
17
    this.type = type;
18
    this.index_id = index_id;
19
    this.index_name = index_name;
20
    this.index_shortName = index_shortName;
21
    this.isDefaultProfile = isDefaultProfile;
22
    this.alias = alias;
23
    this.isActive = isActive;
24
    this.isPublic = isPublic;
25
    this.topics =[];
26
    this.managers =[];
27
  }
28
  static createECStakeholder():Stakeholder{
29
    let ec:Stakeholder = new Stakeholder("ec","funder","ec__________::EC","European Commission","EC",
30
      false,"ec",true,true);
31
    ec.topics.push(ec.createOSTopic(ec));
32
    ec.topics.push(ec.createImpactTopic());
33
    return ec;
34
  }
35
  createOSTopic(stakeholder:Stakeholder):Topic{
36
    let topic = new Topic("OpenScience","Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...","open-science",true,true);
37

    
38
/*    let overview:Category =  new Category("Overview","","overview",true,true);
39
    topic.categories.push(overview);
40
    let overviewDefSub = new SubCategory(null, null,null,true, true);
41
    overview.subCategories.push(overviewDefSub);*/
42

    
43

    
44

    
45
    let pubCategory:Category =  new Category("Publications","","publications",true,true);
46
    topic.categories.push(pubCategory);
47
    let pubDefSub = new SubCategory(null, null,null,true, true);
48
    pubCategory.subCategories.push(pubDefSub);
49
/*    let pubOpenSub = new SubCategory("Openess","","openness",true,true);
50
    pubCategory.subCategories.push(pubOpenSub);
51
    let pubFundingSub = new SubCategory("Funding","","funding",true,true);
52
    pubCategory.subCategories.push(pubFundingSub);
53
    let pubDatasourceSub = new SubCategory("Content Providers","","content-providers",true,true);
54
    pubCategory.subCategories.push(pubDatasourceSub);
55
    let pubDocTypeSub = new SubCategory("Document Type","","doc-type",true,true);
56
    pubCategory.subCategories.push(pubDocTypeSub);
57
    let pubFindSub = new SubCategory("Findability","","dindability",true,true);
58
    pubCategory.subCategories.push(pubFindSub);*/
59

    
60

    
61
    let dataCategory:Category =  new Category("Research data","","data",true,true);
62
    topic.categories.push(dataCategory);
63
    let dataDefSub = new SubCategory(null, null,null,true, true);
64
    dataCategory.subCategories.push(dataDefSub);
65

    
66
    let softwareCategory:Category =  new Category("Software","","software",true,true);
67
    topic.categories.push(softwareCategory);
68
    let softDefSub = new SubCategory(null, null,null,true, true);
69
    softwareCategory.subCategories.push(softDefSub);
70

    
71
    let otherCategory:Category =  new Category("Other research products","","other",true,true);
72
    topic.categories.push(otherCategory);
73
    let otherDefSub = new SubCategory(null, null,null,true, true);
74
    otherCategory.subCategories.push(otherDefSub);
75

    
76
/*    let datasourceCategory:Category =  new Category("Content Providers","","content-providers",true,true);
77
    topic.categories.push(datasourceCategory);
78
    let datasourceDefSub = new SubCategory(null, null,null,true, true);
79
    datasourceCategory.subCategories.push(datasourceDefSub);*/
80

    
81
    let projectCategory:Category =  new Category("Projects","","projects",true,true);
82
    topic.categories.push(projectCategory);
83
    let projectDefSub = new SubCategory(null, null,null,true, true);
84
    projectCategory.subCategories.push(projectDefSub);
85

    
86
    //Numbers
87

    
88
    let n_total_pubs = new Indicator("Publications",null, "number","small",true, true, [new IndicatorPath(null, "statistics","/funders/"+stakeholder.id, ["statistics","publications"])]);
89
    let n_open_pubs = new Indicator("OA Publications",null, "number","small",true, true, [new IndicatorPath(null, "statistics","/funders/"+stakeholder.id, ["statistics","open_access"])]);
90
    let n_total_projects = new Indicator("Projects",null, "number","small",true, true, [new IndicatorPath(null, "statistics","/funders/"+stakeholder.id, ["statistics","total_projects"])]);
91
    let n_total_data = new Indicator("Reserach data",null, "number","small",true, true, [new IndicatorPath(null, "search",
92
      "/datasets/count?fq="+(encodeURIComponent("relfunderid exact "+stakeholder.index_id))+"&format=json", ["total"])]);
93
    let n_total_soft = new Indicator("Software",null, "number","small",true, true, [new IndicatorPath(null, "search",
94
      "/software/count?fq="+(encodeURIComponent("relfunderid exact "+stakeholder.index_id))+"&format=json", ["total"])]);
95
    let n_total_other = new Indicator("Other research products",null, "number","small",true, true, [new IndicatorPath(null, "search",
96
      "/other/count?fq="+(encodeURIComponent("relfunderid exact "+stakeholder.index_id))+"&format=json", ["total"])]);
97

    
98
    /*overviewDefSub.numbers.push(n_total_pubs);
99
    overviewDefSub.numbers.push(n_open_pubs);
100
    overviewDefSub.numbers.push(n_total_projects);
101
    overviewDefSub.numbers.push(n_total_data);
102
    overviewDefSub.numbers.push(n_total_soft);
103
    overviewDefSub.numbers.push(n_total_other);*/
104

    
105
    pubDefSub.numbers.push(n_total_pubs);
106
    pubDefSub.numbers.push(n_open_pubs);
107
    softDefSub.numbers.push(n_total_soft);
108
    dataDefSub.numbers.push(n_total_data);
109
    otherDefSub.numbers.push(n_total_other);
110

    
111
    projectDefSub.numbers.push(n_total_projects);
112

    
113
    //Charts
114

    
115
    let c_pubs_per_project = new Indicator("Which are the top "+stakeholder.index_shortName+" projects?",null, "chart","medium",true, true, [
116
      new IndicatorPath("bar", "old","chart.php?com=query&data="+encodeURIComponent('{"table":"result","fields":[{"fld":"number","agg":"count","type":"bar","yaxis":1,"c":false}],"xaxis":{"name":"result_projects-project-acronym","agg":"avg"},"group":"","color":"","type":"chart","size":30,"sort":"count-number","yaxisheaders":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"result_projects-project-funder","values":["'+stakeholder.index_name+'"],"to":"-1"},{"name":"type","values":["publication"],"to":"-1"}],"having":[],"xStyle":{"r":"-","s":"-","l":"-","ft":"-","wt":"-"},"title":"Publications per project (top 30)","subtitle":"","xaxistitle":"project","order":"d"}'), null)]);
117
    pubDefSub.charts.push(c_pubs_per_project);
118
//TO check
119
    let c_pubs_per_datasource = new Indicator("Which are the top repositories containing "+stakeholder.index_shortName+" research outputs?",null, "chart","medium",false,
120
      true, [new IndicatorPath("column", "old", "chart.php?com=query&data="+encodeURIComponent('{"table":"result","fields":[{"fld":"number","agg":"count","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"result_datasources-datasource-name","agg":"avg"},"group":"","color":"","type":"chart","size":"20","sort":"count-number","yaxisheaders":[""],"fieldsheaders":["publications"],"in":[],"filters":[{"name":"type","values":["publication"],"to":"-1"},{"name":"result_projects-project-funder","values":["'+stakeholder.index_name+'"],"to":"-1"},{"name":"result_datasources-datasource-type","exvalues":["Publication Catalogue"]}],"having":[],"xStyle":{"r":-90,"s":"-","l":"-","ft":10,"wt":"-"},"title":"Publications by content provider (top 20)","subtitle":"","xaxistitle":"content providers","order":"d"}'), null)]);
121
    pubDefSub.charts.push(c_pubs_per_datasource);
122

    
123
//TO check
124
    let c_pubs_per_doc_type = new Indicator("In what type of documents do your researchers used to publish?",null, "chart","medium",true, true,
125
      [new IndicatorPath("bar", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"colors":["#42a5f5","#26a69a","#90ed7d","#607d8b","#00838f","#689f38","#e4d354","#2b908f","#546e7a","#01579"],"queries":[{"name":"Data","type":"bar","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.classification","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},{"field":"result.type","type":"=","values":["publication"]}],"op":"AND"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"publications"},"subtitle":{"text":"per document type"},"yAxis":{"title":{"text":"Publications"}},"xAxis":{"title":{"text":"Document Type"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}'), null)]);
126
    pubDefSub.charts.push(c_pubs_per_doc_type);
127

    
128
    let c_pubs_funding_scheme = new Indicator("What is the percentage publications by funding scheme / programme?",null, "chart","medium",true,
129
      true, [new IndicatorPath("bar", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"colors":["#42a5f5","#26a69a","#90ed7d","#607d8b","#00838f","#689f38","#e4d354","#2b908f","#546e7a","#01579"],"queries":[{"name":"Open Access","type":"bar","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},{"field":"result.project.funding level 0","type":"=","values":["H2020"]},{"field":"result.type","type":"=","values":["publication"]},{"field":"result.access mode","type":"=","values":["Open Access"]}],"op":"AND"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}},{"name":"Total","type":"bar","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},{"field":"result.type","type":"=","values":["publication"]}],"op":"AND"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications"},"subtitle":{"text":"by funding scheme"},"yAxis":{"title":{"text":"Publications"}},"xAxis":{"title":{"text":"Funding scheme"}},"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)]);
130
    pubDefSub.charts.push(c_pubs_funding_scheme);
131

    
132
    let c_pubs_gg_funding_scheme = new Indicator("What is the percentage of green and gold publications by funding scheme / programme?",null, "chart","medium",true,
133
      true, [new IndicatorPath("bar", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"colors":["#42a5f5","#26a69a","#90ed7d","#607d8b","#00838f","#689f38","#e4d354","#2b908f","#546e7a","#01579"],"queries":[{"name":"Gold","color":"#f8b500","type":"bar","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},,{"field":"result.type","type":"=","values":["publication"]},{"field":"result.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"result.datasource.type","type":"=","values":["Journal"]},{"field":"result.datasource.type","type":"=","values":["Journal Aggregator/Publisher"]}],"op":"OR"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}},{"name":"Green","color":"#239d60","type":"bar","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.project.funding level 1","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},{"field":"result.project.funding level 0","type":"=","values":["H2020"]},{"field":"result.type","type":"=","values":["publication"]},{"field":"result.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"result.datasource.type","type":"=","values":["Institutional Repository"]},{"field":"result.datasource.type","type":"=","values":["Thematic Repository"]}],"op":"OR"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"H2020 green and gold publications"},"subtitle":{"text":"by funding scheme"},"yAxis":{"title":{"text":"Publications"}},"xAxis":{"title":{"text":"Funding scheme"}},"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)]);
134
    //pubDefSub.charts.push(c_pubs_gg_funding_scheme);
135

    
136
    let c_pubs_open = new Indicator("Open Access publications timeline",null, "chart","medium",true, true,
137
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"publication.year","type":">=","values":["2000"]},{"field":"publication.year","type":"<=","values":["2019"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Open Access Publications"},"subtitle":{},"yAxis":{"title":{"text":"publications"}},"xAxis":{"title":{"text":"year"}},"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"}}}'), null)]);
138
    pubDefSub.charts.push(c_pubs_open);
139

    
140
    let c_pubs_access_modes = new Indicator("How your Open Access publications are shaped over the years?",null, "chart","medium",true, true,
141
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null},{"field":"publication.access mode","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.year","type":">=","values":["2000"]},{"field":"publication.year","type":"<=","values":["2019"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"2000"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications by Access Mode"},"subtitle":{},"yAxis":{"title":{"text":"publications"}},"xAxis":{"title":{"text":"year"}},"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"}}}'), null)]);
142
    pubDefSub.charts.push(c_pubs_access_modes);
143

    
144
    let c_pubs_av_embargo = new Indicator("Average period of embargoed publications",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
145
    pubDefSub.charts.push(c_pubs_av_embargo);
146

    
147
    let c_pubs_OA_journals = new Indicator("Publications in OA Journals over time",null, "chart","medium",true, true,
148
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.year","type":">=","values":["2000"]},{"field":"publication.year","type":"<=","values":["2019"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"},{"groupFilters":[{"field":"publication.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"2000"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications by OA Journals"},"subtitle":{},"yAxis":{"title":{"text":"publications"}},"xAxis":{"title":{"text":"year"}},"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"}}}'), null)]);
149
    pubDefSub.charts.push(c_pubs_OA_journals);
150

    
151
    //from monitor
152
    let c_pubs_repo = new Indicator("OA publications in repositories by year",null, "chart","medium",true, true,
153
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"OA publications","type":"column","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"},{"groupFilters":[{"field":"publication.datasource.type","type":"contains","values":["repo"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"2000"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"Publications by OA Journals"},"subtitle":{},"yAxis":{"title":{"text":"publications"}},"xAxis":{"title":{"text":"year"}},"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"}}}'), null)]);
154
    pubDefSub.charts.push(c_pubs_repo);
155
    //
156
    // let c_pubs_repo = new Indicator("OA publications in repositories by year",null, "chart","medium",true, true,
157
    //   [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('), null)]);
158
    // pubDefSub.charts.push(c_pubs_repo);
159

    
160
    let c_pubs_green_year = new Indicator("How many OA publications have been submitted to repos per year?",null, "chart","medium",true, true,[new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png",  null)]);
161
    pubDefSub.charts.push(c_pubs_green_year);
162

    
163
    let c_pubs_datasource_country = new Indicator("What is the percentage of OA pubs by repositories over the years?",null, "chart","medium",true, true,
164
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA","type":"column","color":"#b8c91fff","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"},{"groupFilters":[{"field":"publication.year","type":">","values":["2010"]},{"field":"publication.year","type":"<","values":["2020"]}],"op":"AND"},{"groupFilters":[{"field":"publication.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Green OA","type":"column","color":"#0d9637ff","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.year","type":">","values":["2010"]},{"field":"publication.year","type":"<","values":["2020"]}],"op":"AND"},{"groupFilters":[{"field":"publication.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"publication.datasource.type","type":"starts_with","values":["Institu"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"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},"stacking":"percent"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}'), null)]);
165
    pubDefSub.charts.push(c_pubs_datasource_country);
166

    
167
    let c_pubs_funding_country = new Indicator("What is the percentage of OA pubs by projects over the years?",null, "chart","medium",true, true,
168
      [new IndicatorPath("column", "stats-tool", "chart?json="+encodeURIComponent('{"library":"HighCharts","chartDescription":{"queries":[{"name":"Gold OA","type":"column","color":"#b8c91fff","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.datasource.id","type":"starts_with","values":["doaj"]}],"op":"AND"},{"groupFilters":[{"field":"publication.year","type":">","values":["2010"]},{"field":"publication.year","type":"<","values":["2020"]}],"op":"AND"},{"groupFilters":[{"field":"publication.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}},{"name":"Green OA","type":"column","color":"#0d9637ff","query":{"select":[{"field":"publication","aggregate":"count"},{"field":"publication.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"publication.year","type":">","values":["2010"]},{"field":"publication.year","type":"<","values":["2020"]}],"op":"AND"},{"groupFilters":[{"field":"publication.access mode","type":"=","values":["Open Access"]}],"op":"AND"},{"groupFilters":[{"field":"publication.datasource.type","type":"starts_with","values":["Institu"]}],"op":"AND"},{"groupFilters":[{"field":"publication.project.funder","type":"=","values":["'+stakeholder.index_name+'"]}],"op":"AND"}],"entity":"publication","profile":"OpenAIRE All-inclusive","limit":"30"}}],"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},"stacking":"percent"}},"legend":{"enabled":true,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}'), null)]);
169
    pubDefSub.charts.push(c_pubs_funding_country);
170

    
171
    let c_data_year = new Indicator("How your Open research data are shaped over the years?",null, "chart","medium",true, true,
172
      [new IndicatorPath("column", "stats-tool",'/chart?json='+
173
        encodeURIComponent('{"library":"HighCharts","chartDescription":{"colors":["#42a5f5","#26a69a","#90ed7d","#607d8b","#00838f","#689f38","#e4d354","#2b908f","#546e7a","#01579"],"queries":[{"name":"Data","type":"column","query":{"select":[{"field":"result","aggregate":"count"},{"field":"result.year","aggregate":null}],"filters":[{"groupFilters":[{"field":"result.project.funder","type":"=","values":["'+stakeholder.index_name+'"]},{"field":"result.type","type":"=","values":["dataset"]},{"field":"result.year","type":">=","values":["2014"]},{"field":"result.year","type":"<=","values":["2019"]}],"op":"AND"}],"entity":"result","profile":"OpenAIRE original","limit":"0"}}],"chart":{"backgroundColor":"#FFFFFFFF","borderColor":"#335cadff","borderRadius":0,"borderWidth":0,"plotBorderColor":"#ccccccff","plotBorderWidth":0},"title":{"text":"'+stakeholder.index_shortName+' research data over time"},"subtitle":{},"yAxis":{"title":{"text":"Research data"}},"xAxis":{"title":{"text":"Year"}},"lang":{"noData":"No Data available for the Query"},"exporting":{"enabled":true},"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":false,"align":"center","verticalAlign":"bottom","layout":"horizontal"},"credits":{"href":null,"enabled":true,"text":"Created by OpenAIRE via HighCharts"}}}'), null)]);
174
    dataDefSub.charts.push(c_data_year);
175

    
176
    let c_other_year = new Indicator("How your Open research data are shaped over the years?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
177
    otherDefSub.charts.push(c_other_year);
178

    
179
    let c_datasources_access_modes = new Indicator("What is the number of research data repositories by access mode?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
180
    pubDefSub.charts.push(c_datasources_access_modes);
181

    
182
    let c_pub_nometa_year = new Indicator("How many publications lack of abstract per year?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
183
    pubDefSub.charts.push(c_pub_nometa_year);
184

    
185
    let c_pub_meta_linked_year = new Indicator("??",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
186
    pubDefSub.charts.push(c_pub_meta_linked_year);
187

    
188
    let c_pub_colocated_year = new Indicator("How many publications are submitted to more than one repos per year?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
189
    pubDefSub.charts.push(c_pub_colocated_year);
190

    
191
    let c_pub_pids = new Indicator("What is the most common PIDs by year?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
192
    pubDefSub.charts.push(c_pub_pids);
193

    
194
    let c_oai_pmh_datasources = new Indicator("What is the most common PIDs by year?",null, "chart","medium",true, true, [new IndicatorPath("?", "fake","https://visme.co/blog/wp-content/uploads/2017/03/Dogs-vs-Cats-How-much-they-miss-you-relative-to-the-time-you-are-gone.png", null)]);
195
    pubDefSub.charts.push(c_oai_pmh_datasources);
196

    
197
    return topic;
198
  }
199
  createImpactTopic():Topic{
200
    let topic = new Topic("Impact","Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do...","impact",true,true);
201

    
202
    let pubCategory:Category =  new Category("Publications","","publications",true,true);
203
    topic.categories.push(pubCategory);
204
    let pubDefSub = new SubCategory(null, null,null,true, true);
205
    pubCategory.subCategories.push(pubDefSub);
206

    
207
    let dataCategory:Category =  new Category("Research data","","data",true,true);
208
    topic.categories.push(dataCategory);
209
    let dataDefSub = new SubCategory(null, null,null,true, true);
210
    dataCategory.subCategories.push(dataDefSub);
211

    
212
    let softwareCategory:Category =  new Category("Software","","software",true,true);
213
    topic.categories.push(softwareCategory);
214
    let softDefSub = new SubCategory(null, null,null,true, true);
215
    softwareCategory.subCategories.push(softDefSub);
216

    
217
    let otherCategory:Category =  new Category("Other research products","","other",true,true);
218
    topic.categories.push(otherCategory);
219
    let otherDefSub = new SubCategory(null, null,null,true, true);
220
    otherCategory.subCategories.push(otherDefSub);
221

    
222

    
223
    return topic;
224
  }
225
}
226
export class Topic {
227
  name: string;
228
  alias: string;
229
  description: string;
230
  isActive: boolean;
231
  isPublic: boolean;
232
  categories: Category[];
233
  constructor(name: string, description: string, alias:string , isActive: boolean, isPublic: boolean){
234
    this.name =  name;
235
    this.description = description;
236
    this.alias = alias;
237
    this.isActive = isActive;
238
    this.isPublic = isPublic;
239
    this.categories = [];
240
  }
241
}
242
export class Category {
243
  name: string;
244
  alias: string;
245
  description: string;
246
  isActive: boolean;
247
  isPublic: boolean;
248
  isOverview: boolean;
249
  subCategories: SubCategory[];
250
  constructor(name: string, description: string, alias:string , isActive: boolean, isPublic: boolean){
251
    this.name =  name;
252
    this.description = description;
253
    this.alias = alias;
254
    this.isActive = isActive;
255
    this.isPublic = isPublic;
256
    this.subCategories = [];
257
  }
258
}
259

    
260
export class SubCategory {
261
  name: string;
262
  alias: string;
263
  description: string;
264
  isActive: boolean;
265
  isPublic: boolean;
266
  charts: Indicator[];
267
  numbers: Indicator[];
268
  constructor(name: string, description: string, alias:string , isActive: boolean, isPublic: boolean){
269
    this.name =  name;
270
    this.description = description;
271
    this.alias = alias;
272
    this.isActive = isActive;
273
    this.isPublic = isPublic;
274
    this.charts = [];
275
    this.numbers = [];
276
  }
277

    
278
}
279
export class Indicator {
280
  id:string;
281
  name: string;
282
  description: string;
283
  type:string; //number,chart
284
  width:string; //small,medium,large
285
  tags:string[];
286
  isActive: boolean;
287
  isPublic: boolean;
288
  indicatorPaths:IndicatorPath[];
289
  constructor(name: string, description: string, type:string , width:string,  isActive: boolean, isPublic: boolean, indicatorPaths:IndicatorPath[]){
290
    this.name =  name;
291
    this.description = description;
292
    this.type =  type;
293
    this.width = width;
294
    this.isActive = isActive;
295
    this.isPublic = isPublic;
296
    this.indicatorPaths = indicatorPaths;
297
  }
298

    
299
}
300

    
301
export class IndicatorPath {
302
  type: string;  // for charts is type of chart {table, bar, column, etc}
303
  source:string;// for numbers is the service {statistics, search, metrics} for charts is the tool {stats-tool,old,metrics, fake}
304
  url: string;
305
  jsonPath:string[];
306
  constructor(type: string,  source:string, url: string, jsonPath:string[]){
307
    this.type =  type;
308
    this.url = url;
309
    this.source = source;
310
    this.jsonPath = jsonPath;
311
  }
312

    
313
}
    (1-1/1)