Wikidata:Synia:taxon-index

From Wikidata
Jump to navigation Jump to search

Synia: taxon

[edit]

Individuals

[edit]
SELECT 
  ?individuals

  ?taxon ?taxonLabel
  (CONCAT("#taxon/", SUBSTR(STR(?taxon), 32)) AS ?taxonUrl)
  ?taxonDescription  

  ?example_individual ?example_individualLabel
WITH {
  SELECT 
    (COUNT(DISTINCT ?individual) AS ?individuals)
    ?taxon
    (SAMPLE(?individual) AS ?example_individual)
  WHERE {
    ?taxon wdt:P31 wd:Q16521 .

    # wdt:P31 could also be considered 
    ?individual wdt:P10241 ?taxon .
  }
  GROUP BY ?taxon
} AS %taxons
WHERE {
  INCLUDE %taxons
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?individuals)
Try it!

Map of individuals

[edit]
#defaultView:Map
SELECT 
  ?geo

  ?individual ?individualLabel

  ?taxon ?taxonLabel
  ?taxonDescription  
WHERE {
  ?taxon wdt:P31 wd:Q16521 .

  # wdt:P31 could also be considered 
  ?individual wdt:P10241 ?taxon ; 
              wdt:P625 ?geo
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!