query-35234c2d6a0b5b13bf51ed3f58af73dd

rq turtle/ttl

Bar chart displaying the number of taxa described by scientists from a given institution along time with authors identified (induces duplicates when two persons co-describe the same taxon)

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:BarChart
SELECT ?year (COUNT(?taxon) AS ?number_of_new_taxa) ?author (SAMPLE(?authorLabel) AS ?authorLabel)
WHERE 
{
  {?taxon wdt:P31 wd:Q16521 } UNION {?taxon wdt:P31 wd:Q310890} UNION {?taxon wdt:P31 wd:Q23038290} UNION {?taxon wdt:P31 wd:Q47487597 } UNION {?taxon wdt:P31 wd:Q98961713} UNION {?taxon wdt:P31 wd:Q2568288} .
  MINUS { ?taxon p:P1403 ?status. }
  ?taxon p:P225 ?name .
  ?name ps:P225 []; pq:P574 ?date FILTER (?date > "1819-12-31T00:00:00Z"^^xsd:dateTime) .
  ?name ps:P225 []; pq:P405 ?author .
  BIND(STR(YEAR(?date)) AS ?year) .
  {?author wdt:P108 wd:Q663025 } UNION {?author wdt:P937 wd:Q663025} .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                         ?author rdfs:label ?authorLabel.}
}
GROUP BY ?year ?author
ORDER BY ?authorLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?author"):::projected v9("?authorLabel"):::projected v2("?date") v5("?name") v8("?number_of_new_taxa") v4("?status") v3("?taxon"):::projected v7("?year"):::projected a1((" ")) a2((" ")) c15(["wd:Q663025"]):::iri c5(["wd:Q23038290"]):::iri c4(["wd:Q310890"]):::iri c6(["wd:Q47487597"]):::iri c8(["wd:Q2568288"]):::iri c18(["bd:serviceParam"]):::iri c20(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q16521"]):::iri c7(["wd:Q98961713"]):::iri f0[["?date > '1819-12-31T00:00:00Z^^xsd:dateTime'"]] f0 --> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c8 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c7 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c6 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c5 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"p:direct/P31"--> c3 end union0r <== or ==> union0l end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"p:P1403"--> v4 end v3 --"p:P225"--> v5 v5 --"p:statement/P225"--> a1 v5 --"p:qualifier/P574"--> v2 v5 --"p:statement/P225"--> a2 v5 --"p:qualifier/P405"--> v6 bind2[/"str(year-from-dateTime(?date))"/] v2 --o bind2 bind2 --as--o v7 subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; v6 --"p:direct/P937"--> c15 end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; v6 --"p:direct/P108"--> c15 end union5r <== or ==> union5l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c18 --"wikibase:language"--> c20 v6 --"rdfs:label"--> v9 end bind5[/"count(?taxon)"/] v3 --o bind5 bind5 --as--o v8 bind6[/"sample(?authorLabel)"/] v9 --o bind6 bind6 --as--o v9