PREFIX target: <http://www.wikidata.org/entity/Q212>
SELECT ?count ?topic ?topicLabel ?example_work ?example_workLabel
WITH {
SELECT (COUNT(?work) AS ?count) ?topic (SAMPLE(?work) AS ?example_work) WHERE {
# Find works for the specific queried topic
?work wdt:P921/( wdt:P31*/wdt:P279* | wdt:P361+ | wdt:P1269+) target: .
# Find co-occuring topics
?work wdt:P921 ?topic .
?topic wdt:P225 ?taxonname .
# Avoid listing the queried topic
FILTER (target: != ?topic)
}
GROUP BY ?topic
} AS %result
WHERE {
# Label the results
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,da,de,es,fr,jp,nl,no,ru,sv,zh" . }
}
ORDER BY DESC(?count)
LIMIT 200
Which Wikidata entries would be good candidates to explore such visualizations?
Most countries should work (the example above is for Ukraine), as should other rather large geographic entities, or taxa or natural products or habitats.
Anything else?
For cases when the target is a taxon, we should perhaps link to a taxon comparison (which we do not have yet).
What kind of panel would you like to add to which Scholia aspect?
A table listing taxa that co-occur with the target topic.
What kind of information should the panel provide, and which of the visualization options (e.g. table, bubble chart, map) should it use?
Here is a first draft for a query:
Which Wikidata entries would be good candidates to explore such visualizations?
Most countries should work (the example above is for Ukraine), as should other rather large geographic entities, or taxa or natural products or habitats.
Anything else?
For cases when the target is a taxon, we should perhaps link to a taxon comparison (which we do not have yet).