Project

General

Profile

« Previous | Next » 

Revision 61005

Added by Antonis Lempesis 5 months ago

adapted mooore queries

View differences:

modules/open-science-observatory-ui/branches/querie_names/src/app/services/data-handler.service.ts
771 771
    for (const series of rawData.datasets) {
772 772

  
773 773
      if ((series.series.query.name === 'oso.results.oa_percentage.country')
774
        && series.series.query.parameters && series.series.query.parameters[0] === 'publication'
774
        && series.series.query.parameters && series.series.query.parameters[1] === 'publication'
775 775
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
776 776

  
777 777
        countryPageOverviewData.name = series.series.result[0].row[3];
......
797 797
        countryPageOverviewData.publicationsDeposited = publicationsDepositedIndicator;
798 798

  
799 799
      } else if ((series.series.query.name === 'oso.results.oa_percentage.country')
800
        && series.series.query.parameters && series.series.query.parameters[0] === 'dataset'
800
        && series.series.query.parameters && series.series.query.parameters[1] === 'dataset'
801 801
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
802 802

  
803 803
        countryPageOverviewData.name = series.series.result[0].row[3];
......
886 886
    for (const series of rawData.datasets) {
887 887

  
888 888
      if ((series.series.query.name === 'oso.results.oa_percentage.country')
889
        && series.series.query.parameters && series.series.query.parameters[0] === 'publication'
889
        && series.series.query.parameters && series.series.query.parameters[1] === 'publication'
890 890
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
891 891

  
892 892
        countryPageOverviewData.name = series.series.result[0].row[3];
......
899 899
        countryPageOverviewData.publicationsAffiliated = publicationsAffiliatedIndicator;
900 900

  
901 901
      } else  if ((series.series.query.name === 'oso.results.oa_percentage.country')
902
        && series.series.query.parameters && series.series.query.parameters[0] === 'dataset'
902
        && series.series.query.parameters && series.series.query.parameters[1] === 'dataset'
903 903
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
904 904

  
905 905
        countryPageOverviewData.name = series.series.result[0].row[3];
......
912 912
        countryPageOverviewData.datasetsAffiliated = datasetsAffiliatedIndicator;
913 913

  
914 914
      } else if ((series.series.query.name === 'oso.results.oa_percentage.country')
915
        && series.series.query.parameters && series.series.query.parameters[0] === 'software'
915
        && series.series.query.parameters && series.series.query.parameters[1] === 'software'
916 916
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
917 917

  
918 918
        countryPageOverviewData.name = series.series.result[0].row[3];
......
925 925
        countryPageOverviewData.software = softwareIndicator;
926 926

  
927 927
      } else if ((series.series.query.name === 'oso.results.oa_percentage.country')
928
        && series.series.query.parameters && series.series.query.parameters[0] === 'other'
928
        && series.series.query.parameters && series.series.query.parameters[1] === 'other'
929 929
        && series.series.result && series.series.result.length > 0 && series.series.result[0].row) {
930 930

  
931 931
        countryPageOverviewData.name = series.series.result[0].row[3];
modules/open-science-observatory-ui/branches/querie_names/src/app/services/data.service.ts
37 37
  }
38 38

  
39 39
  public getCountryOAData(countryCode: string): Observable<RawData> {
40
    const countryOADataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["software","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["other","${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
40
    const countryOADataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","software"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","other"],"profile":"${this.profileName}"}}],"verbose":true}`;
41 41
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryOADataQuery), headerOptions);
42 42
  }
43 43

  
......
85 85
  }
86 86

  
87 87
  public getCountryPageOverviewData(countryCode: string): Observable<RawData> {
88
    const countryPageOverviewDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.rnd.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funder.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funding_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.ec_funded_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
88
    const countryPageOverviewDataQuery = `{"series":[{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","publication"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["publication","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.country", "parameters":["${countryCode}","dataset"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.oa_percentage.deposited.country", "parameters":["dataset","${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.repositories.doar_re3data.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.journals.doaj.validated.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.oa_policies.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.rnd.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funder.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.funding_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.ec_funded_organizations.country", "parameters":["${countryCode}"],"profile":"${this.profileName}"}}],"verbose":true}`;
89 89
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(countryPageOverviewDataQuery), headerOptions);
90 90
  }
91 91

  
......
135 135
    if (content === 'affiliated') {
136 136
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.affiliated.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
137 137
    } else if (content === 'affiliated_peer_reviewed') {
138
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
138
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.affiliated.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
139 139
    } else if (content === 'deposited') {
140
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
140
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
141 141
    } else if (content === 'deposited_peer_reviewed') {
142
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}","${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
142
      indicatorsTableDataQuery = `{"series":[{"query":{"name":"oso.results.pid_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.licence_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.green_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}},{"query":{"name":"oso.results.gold_percentage.deposited.peer_reviewed.bycountry","parameters":["${type}"],"profile":"${this.profileName}"}}],"verbose":true}`;
143 143
    }
144 144
    return this.httpClient.get<RawData>(this.apiURL + encodeURIComponent(indicatorsTableDataQuery), headerOptions);
145 145
  }
modules/open-science-observatory-ui/branches/querie_names/src/environments/environment.ts
6 6
  production: false,
7 7
  // API_ENDPOINT: '/uoa-repository-manager-service',
8 8
  environmentName: 'dev',
9
  API_ENDPOINT: 'http://stats.madgik.di.uoa.gr:8080/stats-api/',
9
  //API_ENDPOINT: 'http://stats.madgik.di.uoa.gr:8080/stats-api/',
10
  API_ENDPOINT: 'http://stats.madgik.di.uoa.gr:8180/',
10 11
  // API_ENDPOINT: 'https://beta.services.openaire.eu/stats-tool/',
11 12
  FAQ_ENDPOINT: 'http://audrey.athenarc.gr:5555/api',
12 13
  FAQ_HOMEPAGE: 'http://audrey.athenarc.gr:5555',
13
  profileName: 'openaire'
14
  profileName: 'observatory'
14 15
};
15 16

  
16 17
/*

Also available in: Unified diff