query-02e1d0668b0d2605ba3dabf5cd070217

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
#defaultView:BarChart
#From https://scientometrics2017.ai.wu.ac.at/wp-content/uploads/2017/06/Nielsen2017Scholia_slides
# Inspired from LEGOLAS - http://abel.lis.illinois.edu/legolas/
# Shubhanshu Mishra, Vetle Torvik
select ?year (count(?work) as ?number_of_publications) ?role where {
  {
    select (str(?year_) as ?year) (0 as ?pages) ("_" as ?role) where {
      # default values = 0
      ?year_item wdt:P31 wd:Q577 . 
      ?year_item wdt:P585 ?date .
      bind(year(?date) as ?year_)
      {
        select (min(?year_) as ?earliest_year)  (max(?year_) as ?latest_year) where {
          ?work wdt:P50 wd:Q20980928 .
          ?work wdt:P577 ?publication_date . 
          bind(year(?publication_date) as ?year_)
        }
      }
      bind(year(now())+1 as ?next_year)
      filter (?year_ >= ?earliest_year && ?year_ <= ?latest_year)
    }
  }
  union {
  {
    select ?work (min(?years) as ?year) (count(?coauthors) as ?number_of_authors) ?author_number where {
      ?work (p:P50|p:P2093) ?author_statement . 
      ?author_statement ps:P50 wd:Q20980928 .
      optional { ?author_statement pq:P1545 ?author_number . }
      ?work (wdt:P50

Query found at