Project

General

Profile

« Previous | Next » 

Revision 61544

Finished the changes in the home page

View differences:

modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/pages/continent/open-science/publications/continent-os-publications-indicators.component.ts
76 76

  
77 77
  loadingPublicationsAbsoluteTable: boolean = true;
78 78
  loadingPublicationsPercentageTable: boolean = true;
79
  publicationsTableContentSelection: string = 'affiliated';
79
  publicationsTableContentSelection: string = 'affiliated_peer_reviewed';
80 80
  publicationsAbsoluteTableData: CountryTableData[];
81 81
  publicationsPercentageTableData: CountryTableData[];
82 82

  
modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/pages/home/data-view.component.html
28 28
      <div class="uk-margin-bottom">
29 29
        <label class="uk-margin-right">Show: </label>
30 30
        <select class="md-input" #selectContentAbsolute (change)="getContentAbsolute(selectContentAbsolute.value)" style="width: 230px; display: inline-block">
31
          <option value="affiliated">affiliated</option>
32
          <option value="affiliated_peer_reviewed">affiliated peer reviewed</option>
33
          <option value="deposited">deposited</option>
34
          <option value="deposited_peer_reviewed">deposited peer reviewed</option>
31
          <option value="affiliated_peer_reviewed">affiliated</option>
32
          <option value="affiliated">affiliated (incl. non-peer reviewed publications)</option>
33
          <option value="deposited_peer_reviewed">deposited</option>
34
          <option value="deposited">deposited (incl. non-peer reviewed publications)</option>
35 35
        </select>
36 36
        <!--<span class="md-input-bar"></span>-->
37 37
      </div>
......
45 45
      <div class="uk-margin-bottom">
46 46
        <label class="uk-margin-right">Show: </label>
47 47
        <select class="md-input" #selectContentPercentage (change)="getContentPercentage(selectContentPercentage.value)" style="width: 230px; display: inline-block">
48
          <option value="affiliated">affiliated</option>
49
          <option value="affiliated_peer_reviewed">affiliated peer reviewed</option>
50
          <option value="deposited">deposited</option>
51
          <option value="deposited_peer_reviewed">deposited peer reviewed</option>
48
          <option value="affiliated_peer_reviewed">affiliated</option>
49
          <option value="affiliated">affiliated (incl. non-peer reviewed publications)</option>
50
          <option value="deposited_peer_reviewed">deposited</option>
51
          <option value="deposited">deposited (incl. non-peer reviewed publications)</option>
52 52
        </select>
53 53
        <!--<span class="md-input-bar"></span>-->
54 54
      </div>
modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/pages/home/data-view.component.ts
28 28
  private resultColor = resultColor;
29 29

  
30 30
  activeView: string = 'absolute';
31
  contentAbsoluteSelection: string = 'affiliated';
32
  contentPercentageSelection: string = 'affiliated';
31
  contentAbsoluteSelection: string = 'affiliated_peer_reviewed';
32
  contentPercentageSelection: string = 'affiliated_peer_reviewed';
33 33

  
34 34
  tableAbsoluteData: CountryTableData[];
35 35
  tablePercentageData: CountryTableData[];
......
118 118
    if (view === 'graph') {
119 119

  
120 120
      if (!this.oaNoaPublicationsTimelineURL) {
121
        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('","')}\"]}}`));
121
        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('","')}\"]}}`));
122 122
      }
123 123
      if (!this.oaNoaDatasetsTimelineURL) {
124
        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('","')}\"]}}`));
124
        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('","')}\"]}}`));
125 125
      }
126 126
      if (!this.oaNoaSoftwareTimelineURL) {
127
        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('","')}\"]}}`));
127
        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('","')}\"]}}`));
128 128
      }
129 129
      if (!this.oaNoaOtherTimelineURL) {
130
        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('","')}\"]}}`));
130
        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('","')}\"]}}`));
131 131
      }
132 132
    }
133 133
  }
modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/services/data-handler.service.ts
34 34

  
35 35
    for (const series of rawData.datasets) {
36 36

  
37
      if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('publication')) {
37
      if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated') {
38 38
        overviewMapData.publications = this.rawResultToCountryMapData(series.series.result);
39 39
      } else if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('dataset')) {
40 40
        overviewMapData.datasets = this.rawResultToCountryMapData(series.series.result);
......
57 57
    const joinedPublicationsMap = new Map();
58 58

  
59 59
    for (const series of rawData.datasets) {
60
      if (series.series.query.name === 'oso.results.affiliated' && series.series.query.parameters.includes('publication')) {
60
      if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated') {
61 61

  
62 62
        for (const rowResult of series.series.result) {
63 63
          if (joinedPublicationsMap.has(rowResult.row[1])) {
......
71 71
          }
72 72
        }
73 73

  
74
      } else if (series.series.query.name === 'oso.results.deposited' && series.series.query.parameters.includes('publication')) {
74
      } else if (series.series.query.name === 'new.oso.publications.peer_reviewed.deposited') {
75 75

  
76 76
        for (const rowResult of series.series.result) {
77 77
          if (joinedPublicationsMap.has(rowResult.row[1])) {
......
209 209

  
210 210
    for (const series of rawData.datasets) {
211 211

  
212
      if (series.series.query.name === 'oso.results.affiliated.country' && series.series.query.parameters.includes('publication')) {
212
      if (series.series.query.name === 'new.oso.publications.peer_reviewed.affiliated.country') {
213 213
        countryData.publicationsAffiliated = Number(series.series.result[0].row[0]);
214
      } else if (series.series.query.name === 'oso.results.deposited.country' && series.series.query.parameters.includes('publication')) {
214
      } else if (series.series.query.name === 'new.oso.publications.peer_reviewed.deposited.country') {
215 215
        countryData.publicationsDeposited = Number(series.series.result[0].row[0]);
216 216
      } else if (series.series.query.name === 'oso.results.affiliated.country' && series.series.query.parameters.includes('dataset')) {
217 217
        countryData.datasetsAffiliated = Number(series.series.result[0].row[0]);
......
588 588
    const tableData: CountryTableData[] = [];
589 589

  
590 590
    mapTableData.forEach((value: CountryTableData, key: string) => {
591
      // console.log(key, value);
591
      console.log(key, value);
592 592
      tableData.push(value);
593 593
    });
594 594

  
modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/services/data.service.ts
27 27
  }
28 28

  
29 29
  public getOverviewMapData(): Observable<RawData> {
30
    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}`;
30
    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}`;
31 31
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(mapDataQuery), headerOptions);
32 32
  }
33 33

  
34 34
  public getCountryOverviewData(countryCode: string): Observable<RawData> {
35
    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}`;
35
    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}`;
36 36
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryOverviewDataQuery), headerOptions);
37 37
  }
38 38

  
......
75 75
  }
76 76

  
77 77
  public getLeadingOpenScienceMobileData(): Observable<RawData> {
78
    const leadingOpenScienceMobileDataQuery = `{"series":[{"query":{"name":"oso.mobile.overview","profile":"${this.profileName}"}}],"verbose":true}`;
78
    const leadingOpenScienceMobileDataQuery = `{"series":[{"query":{"name":"new.oso.mobile.overview","profile":"${this.profileName}"}}],"verbose":true}`;
79 79
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(leadingOpenScienceMobileDataQuery), headerOptions);
80 80
  }
81 81

  
modules/open-science-observatory-ui/branches/new-indicators-and-graphs-osfair-2021/src/app/chart-palettes.ts
37 37
// export const otherResearchProductsColor = '#00b8d0';
38 38
export const otherResearchProductsColor = '#00B086';
39 39

  
40
export const nonOAColor = '#787878';
40
// export const nonOAColor = '#787878';
41
export const nonOAColor = '#c3cad2';
41 42
export const noIndicatorColor = '#c3cad2';
42 43

  
43 44
// export const resultColor = '#072AE6';

Also available in: Unified diff