Skip to content
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

In topic comparison, add panel on relevant institutions #1140

Open
Daniel-Mietchen opened this issue May 29, 2020 · 0 comments
Open

In topic comparison, add panel on relevant institutions #1140

Daniel-Mietchen opened this issue May 29, 2020 · 0 comments

Comments

@Daniel-Mietchen
Copy link
Collaborator

@Daniel-Mietchen Daniel-Mietchen commented May 29, 2020

e.g. as per this query:

SELECT
  ?score
  ?institution ?institutionLabel
  ?example_work ?example_workLabel
WITH {
  SELECT (COUNT(DISTINCT ?author) AS ?score) ?institution (SAMPLE(?work_) AS ?example_work)
    WHERE {
    VALUES ?topic {  wd:Q5227350  wd:Q95612615  wd:Q1331926  wd:Q4417999  wd:Q84263196  wd:Q202864  wd:Q88434121  wd:Q87745177  wd:Q10538943  wd:Q88835036  wd:Q1149776  wd:Q309901  wd:Q29032648  wd:Q45933174  wd:Q1460420  wd:Q1252988  wd:Q50410669  wd:Q1128437  wd:Q29056927  wd:Q12184  wd:Q182672  wd:Q901464  wd:Q45881698  wd:Q525512  wd:Q192995  wd:Q764527  wd:Q609748  wd:Q2725393  wd:Q59485450  wd:Q59163040  }
    
    # A broad query including "(wdt:P361+ | wdt:P1269+ | (wdt:P31* / wdt:P279*) )" seems to take
    # long time and time out.
    ?work wdt:P921 ?topic  .
    ?work wdt:P2860 ?cited_work .
    { ?cited_work wdt:P50 ?author . BIND(?cited_work AS ?work_) }
    UNION
    { ?work wdt:P50 ?author . BIND(?work AS ?work_) }

    {?author wdt:P108 ?institution .}
    UNION
    {?author wdt:P1416 ?institution .}
    UNION
    {?author wdt:P69 ?institution .}
  }
  GROUP BY ?institution
  ORDER BY DESC(?score)
  LIMIT 200
} AS %results
WHERE {
  INCLUDE %results
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh". }
}
ORDER BY DESC(?score)

There should probably be an additional column that gives the link to the organization/ topic aspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Topics
  
Awaiting triage
Organizations
  
Awaiting triage
Comparisons
  
Awaiting triage
Robustifying Scholia
  
Awaiting triage
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.