User:Christian Ferrer/miscellaneous

From Wikispecies
Jump to navigation Jump to search

Various links[edit]

Cover Acta Phytopathologica et Entomologica Hungarica Acta Phytopathologica et Entomologica Hungarica] some articles CC BY

Queries[edit]

Genera of Echinodermata showing potential Wikispecies links and synonymy[edit]

#genera of Echinodermata showing potential Wikispecies links and synonymy

SELECT DISTINCT ?item ?itemLabel ?rankLabel ?speciessitelink ?synonym ?synonymLabel
WHERE
{
  ?item wdt:P171+ wd:Q44631 .
  ?item wdt:P105 ?rank .
  ?item wdt:P105 wd:Q34740 .
  OPTIONAL { ?speciessitelink schema:about ?item ; schema:isPartOf <https://species.wikimedia.org/> . }
  OPTIONAL { ?item wdt:P1420 | ^wdt:P1420 ?synonym . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
order by ?rankLabel ?itemLabel

Try it!

Same thing as above (+authors and first descrptions) but showing synonymy only for the item that are "taxon synonyms"[edit]

#genera of Echinodermata showing potential: authors, fisrt description, Wikispecies links and synonymy (each should either have a link to wikispecies or be the synonym of another taxon)

SELECT DISTINCT ?item ?itemLabel ?author ?firstDescription ?speciesSitelink ?isSynonymOf ?isSynonymOfLabel
WHERE
{
  ?item wdt:P171+ wd:Q44631 .
  ?item wdt:P105 ?rank .
  ?item wdt:P105 wd:Q34740 .
  OPTIONAL { ?item p:P225 ?st . 
    ?st pq:P405 ?author . }
  OPTIONAL { ?item p:P225 ?statement .
    ?statement prov:wasDerivedFrom ?reference .
    ?reference pr:P248 ?firstDescription .
    ?reference pr:P6184 wd:Q1361864 . }
  OPTIONAL { ?speciesSitelink schema:about ?item ; schema:isPartOf <https://species.wikimedia.org/> . }
  OPTIONAL { ?item ^wdt:P1420 ?isSynonymOf . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
order by ?itemLabel

Try it!

SELECT * WHERE {
  ?item wdt:P105 wd:Q7432;
        wdt:P171+ wd:Q59256 .
  ?article schema:about ?item; schema:isPartOf <https://species.wikimedia.org/>; schema:name ?title .
}

Try it!

Taxa with author in Wikidata, but no Wikispecies sitelink[edit]

#taxa with author, but no Wikispecies sitelink
#by Jura1, August 28, 2020


SELECT ?author ?authorLabel ?taxa ?count
WITH
{
  SELECT ?author
         (GROUP_CONCAT(DISTINCT ?taxon; separator=", ") as ?taxa)
         (COUNT(?taxon) as ?count)
  WHERE
  {
    ?st pq:P405 ?author .
    FILTER NOT EXISTS { [] schema:about ?author ; schema:isPartOf <https://species.wikimedia.org/> }
    ?st ps:P225 ?taxon .
  }
  GROUP BY ?author
} as %new
WHERE
{
  INCLUDE %new
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
LIMIT 100

Try it!

Taxa of Ophiuroidea with author in Wikidata, but no Wikispecies sitelink[edit]

#taxa of wd:Q59256 with author, but no Wikispecies sitelink
#by Jura1, August 29, 2020

SELECT ?author ?authorLabel ?taxa ?count
WITH
{
  SELECT ?author
         (GROUP_CONCAT(DISTINCT ?taxon; separator=", ") as ?taxa)
         (COUNT(?taxon) as ?count)
  WHERE
  {
    hint:Query hint:optimizer "None".
    ?taxonitem wdt:P171+ wd:Q59256 .
    ?taxonitem p:P225 ?st . 
    ?st pq:P405 ?author .
    FILTER NOT EXISTS { [] schema:about ?author ; schema:isPartOf <https://species.wikimedia.org/> }
    ?st ps:P225 ?taxon .
  }
  GROUP BY ?author
} as %new
WHERE
{
  INCLUDE %new
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)
LIMIT 100

Try it!

All taxa with the same author (exemple with Theodore Lyman)[edit]

#all taxa with the same author 
#by Jura1, Aug 29, 2020

SELECT (YEAR(?date) as ?year) ?taxonitem ?taxonitemLabel ?taxonitemDescription ?rank ?rankLabel ?img ?wikispecies
WHERE
{
    ?st pq:P405 wd:Q2418660 . 
    ?st ps:P225 ?taxon .
    ?taxonitem p:P225 ?st . 
    OPTIONAL { ?st pq:P574 ?date }
    OPTIONAL { ?taxonitem wdt:P105 ?rank }
    OPTIONAL { ?taxonitem wdt:P18 ?img }
    OPTIONAL { ?wikispecies schema:about ?taxonitem ; schema:isPartOf <https://species.wikimedia.org/> }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Images in Wikimedia Commons depicting items of type specimens[edit]

#Images in Wikimedia Commons depicting items of type specimens
#defaultView:ImageGrid

SELECT ?file ?image ?stype ?stypeLabel ?collec ?collecLabel ?role ?roleLabel ?de ?deLabel
with {
  select ?stype ?stypeLabel ?collec ?collecLabel ?role ?de ?roleLabel ?deLabel {
   service <https://query.wikidata.org/sparql> {
     select ?stype ?stypeLabel ?collec ?collecLabel ?role ?de ?roleLabel ?deLabel { 
       ?stype wdt:P31/wdt:P279* wd:Q51255340 
       SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
       optional {
         ?stype wdt:P195 ?collec .
       }
       ?stype p:P2868 [ps:P2868 ?role ; pq:P642 ?de] .
       #remove the # below to specify one or more collections
       #values ?collec {
       # wd:Q122945 # example with the Yale Peabody Museum of Natural History 
       #}
       #?de wdt:P171* wd:Q15711568 . # choose a taxon whose types are sought, including the types of its sub-taxa
     }
   }
  }
} as %types
WHERE {
  ?file wdt:P180 ?stype ; schema:contentUrl ?url .
  
  bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", replace(substr(str(?url),53),"_","%20"))) AS ?image) .
  
  #?file wdt:P180  wd:Q105607273  .
  include %types
}

Try it!

Stuff[edit]

to check :

Thetis Expedition: {{Whitelegge, 1906}} {{Whitelegge, 1907}} {{Clark, 1909a}}{{Stebbing, 1910a}} {{Clark, 1911a}} {{Thomson & Mackinnon, 1911}} {{Coleman, 1911}} {{Ritchie, 1911}}
to upload https://doi.org/10.15560/12.1.1836
[6]
  • Look at last image [7], not yet uploaded
  • How to display a specific page from a PDF:

[[File:Actes de la société d'histoire naturelle de Paris - tome premier, premiere partie (IA actesdelasociete1117soci).pdf|page=175|thumb]]

Unclear WoRMS quotes[edit]