Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have professions in the University perspective #908

Open
GerardMeijssen opened this issue Nov 2, 2019 · 1 comment

Comments

@GerardMeijssen
Copy link

@GerardMeijssen GerardMeijssen commented Nov 2, 2019

When there is a sum of the professions for a university, it is not only informative, it also helps projects like women in red to choose candidate for new articles.

@Daniel-Mietchen

This comment has been minimized.

Copy link
Collaborator

@Daniel-Mietchen Daniel-Mietchen commented Nov 4, 2019

Here is a SPARQL query that surfaces the occupation of folks affiliated/ employed/ educated at a given institution.

SELECT ?count ?occupation ?occupationLabel ?list
WITH {
  SELECT (COUNT(?researcher) AS ?count) ?occupation (GROUP_CONCAT(?researcher_label; separator=", ") AS ?list) WHERE {
    hint:Query hint:optimizer "None" .
    { 
      SELECT DISTINCT ?researcher WHERE {
        ?researcher ( wdt:P108 | wdt:P463 | wdt:P1416 ) / wdt:P361* wd:Q213439 .
      } 
    }
    ?researcher wdt:P106 ?occupation .
    ?researcher rdfs:label ?researcher_label . FILTER (LANG(?researcher_label) = 'en')
  }
  GROUP BY ?occupation 
} AS %result
WHERE {
  INCLUDE %result
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh" . } 
}
ORDER BY DESC(?count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Organizations
  
To do
2 participants
You can’t perform that action at this time.