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

Co-author graph for "Type 2 diabetes" does not render #472

Closed
Daniel-Mietchen opened this issue Aug 24, 2018 · 3 comments
Closed

Co-author graph for "Type 2 diabetes" does not render #472

Daniel-Mietchen opened this issue Aug 24, 2018 · 3 comments

Comments

@Daniel-Mietchen Daniel-Mietchen added this to To do in Meta via automation Aug 24, 2018
@Daniel-Mietchen Daniel-Mietchen added this to To do in Diseases via automation Aug 24, 2018
@Daniel-Mietchen Daniel-Mietchen added this to To do in Authors via automation Aug 24, 2018
@Daniel-Mietchen

This comment has been minimized.

Copy link
Collaborator Author

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

Just tested it again — same issue.

@fnielsen

This comment has been minimized.

Copy link
Owner

@fnielsen fnielsen commented Jan 4, 2019

#defaultView:Graph
SELECT ?author1 ?author1Label ?rgb ?author2 ?author2Label
WITH {
  # Find works with the topic
  SELECT ?work WHERE {
    ?work wdt:P921 / (wdt:P31* / wdt:P279* | wdt:P361+ | wdt:P1269+) wd:Q3025883 .
  }
} AS %works
WITH {
  # Limit the number of authors to the most prolific ones
  SELECT (COUNT(?work) AS ?count) ?author1 WHERE {
    INCLUDE %works
    ?work wdt:P50 ?author1 .
  }
  GROUP BY ?author1
  ORDER BY DESC(?count)
  LIMIT 25
} AS %authors
WITH {
  # Limit the number of coauthorships
  SELECT (COUNT(*) AS ?coauthorships) ?author1 ?author2 WHERE {
    INCLUDE %works
    INCLUDE %authors
    ?work wdt:P50 ?author1 , ?author2 .
    FILTER (?author1 != ?author2) 
  } 
  GROUP BY ?author1 ?author2
  ORDER BY DESC(?coauthorships)
  LIMIT 500
} AS %coauthorships
WHERE {
  # Color and label the nodes
  INCLUDE %coauthorships
  OPTIONAL { ?author1 wdt:P21 ?gender1 . }
  BIND( IF(?gender1 = wd:Q6581097, "3182BD", "E6550D") AS ?rgb)
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en,fr,de,ru,es,zh,jp".
  }
}

http://tinyurl.com/yccs6r48

@Daniel-Mietchen

This comment has been minimized.

Copy link
Collaborator Author

@Daniel-Mietchen Daniel-Mietchen commented Dec 9, 2019

Works fine now with the simplification introduced in bb2ee21#diff-04a29c3a9ff21a4d023f710f69057842 .

Authors automation moved this from To do to Done Dec 9, 2019
Meta automation moved this from To do to Done Dec 9, 2019
Robustifying Scholia automation moved this from UX to Done Dec 9, 2019
1. Back-end development and testing with pilot corpora automation moved this from To do to Done Dec 9, 2019
@Daniel-Mietchen Daniel-Mietchen moved this from To do to Done in Diseases Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.