WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
220 stars 78 forks source link

Reviewer statistics panel on author aspect could include program committee work #2490

Closed fnielsen closed 4 months ago

fnielsen commented 4 months ago

Reviewer statistics panel on author aspect could include program committee work

Example:

# Venue statistics for a specific reviewer
PREFIX target: <http://www.wikidata.org/entity/Q20980928>

SELECT
  ?count (SAMPLE(?short_name_) AS ?short_name)
  ?venue ?venueLabel
  ?topics ?topicsUrl
WITH {
  SELECT
    (COUNT(DISTINCT ?work) as ?count)
    ?venue
    (GROUP_CONCAT(DISTINCT ?topic_label; separator=", ") AS ?topics)
    (CONCAT("../topics/", GROUP_CONCAT(DISTINCT SUBSTR(STR(?topic), 32); separator=",")) AS ?topicsUrl)
  WHERE {
    {
      ?work wdt:P4032 target: ;
            wdt:P1433 ?venue .
    }
    UNION
    {
      # program committee member for event in a series (work is here the event)
      ?work wdt:P179 ?venue ;
            wdt:P5804 target: 
    }
    UNION
    {
      # program committee member for event not in a series
      ?venue wdt:P5804 target: .
      MINUS { ?venue wdt:P179 [] }
      BIND("dummy" AS ?work)
    }
    OPTIONAL {
      ?venue wdt:P921 ?topic .
      ?topic rdfs:label ?topic_label . FILTER(LANG(?topic_label) = 'en')
    }
  }
  GROUP BY ?venue
} AS %result
WHERE {
  INCLUDE %result
  OPTIONAL { ?venue wdt:P1813 ?short_name_ . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh". }  
} 
GROUP BY ?count ?venue ?venueLabel ?topics ?topicsUrl
ORDER BY DESC(?count)