Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upIn topic aspect, add panel on organizations associated with authors publishing on the topic #625
Comments
This comment has been minimized.
This comment has been minimized.
An alternative option would be a map, though I don't know how the co-authorship could be usefully visualized there. Anyway, first try: # #defaultView:Map
SELECT DISTINCT ?citing_organization ?citing_organizationLabel ?citing_geo ?cited_organization ?cited_organizationLabel ?cited_geo
WITH {
SELECT DISTINCT ?citing_organization ?cited_organization WHERE {
?citing_author (wdt:P108|wdt:P1416) ?citing_organization .
?cited_author (wdt:P108|wdt:P1416) ?cited_organization .
?citing_work wdt:P50 ?citing_author .
?citing_work wdt:P921 wd:Q183368 .
?cited_work wdt:P921 wd:Q183368 .
?citing_work wdt:P2860 ?cited_work .
?cited_work wdt:P50 ?cited_author .
FILTER (?citing_work != ?cited_work)
FILTER NOT EXISTS {
?citing_work wdt:P50 ?author .
?citing_work wdt:P2860 ?cited_work .
?cited_work wdt:P50 ?author .
}
}
} AS %results
WHERE {
INCLUDE %results
?citing_organization wdt:P625 ?citing_geo .
?cited_organization wdt:P625 ?cited_geo .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
|
This comment has been minimized.
This comment has been minimized.
Here is a simpler version, simply listing organizations by number of affiliatd authors known to have published on the target topic: SELECT ?count ?institution ?institutionLabel
WITH {
SELECT (COUNT(DISTINCT ?researcher) AS ?count) ?institution WHERE {
?researcher ( wdt:P108 | wdt:P463 | wdt:P1416 ) / wdt:P361* ?institution .
?institution wdt:P2427 ?grid .
?item wdt:P50 ?researcher ;
wdt:P921 wd:Q202864 .
}
GROUP BY ?institution
} AS %result
WHERE {
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,ep,fr,jp,nl,no,ru,sv,zh" . }
}
ORDER BY DESC(?count)
LIMIT 200 |
This comment has been minimized.
This comment has been minimized.
I played around a bit more with the map variants of this query. This version works fine: #defaultView:Map
SELECT ?organization ?organizationLabel ?geo ?count ?layer
WITH {
SELECT DISTINCT ?work WHERE {
# Works on the topic
?work wdt:P921 / (wdt:P361+ | wdt:P1269+ | (wdt:P31* / wdt:P279*) ) wd:Q202864 .
}
LIMIT 20000
} AS %works
WITH {
SELECT DISTINCT ?organization ?geo (COUNT(DISTINCT ?work) AS ?count) WHERE {
INCLUDE %works
# Authors who have published works on the topic
?work wdt:P50 ?author .
?author ( wdt:P108 | wdt:P463 | wdt:P1416 ) / wdt:P361* ?organization .
?organization wdt:P625 ?geo .
}
GROUP BY ?organization ?geo
ORDER BY DESC (?count)
LIMIT 500
} AS %organizations
WHERE {
INCLUDE %organizations
BIND(IF( (?count < 1), "No results", IF((?count < 10), "1 ≤ results < 10 ", IF((?count < 100), "10 ≤ results < 100 results", IF((?count < 1000), "100 ≤ results < 1000", IF((?count < 10000), "1000 ≤ results < 10000", IF((?count < 100000), "10000 ≤ results < 100000", "100000 or more results") ) ) ) )) AS ?layer )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?count) However, when I tried to include this in #996 by way of adding
to topics.html, the embedded map would not show. Not sure what the problem is here. |
This comment has been minimized.
This comment has been minimized.
The problem mentioned above was a missing |
This comment has been minimized.
This comment has been minimized.
Fixed with f8664d2 . |
Daniel-Mietchen commentedJan 15, 2019
•
edited
Here we go for Zika:
Probably worth thinking about encoding the frequency of interaction in the colour of the arrows, and defining some cut-offs.