query-6af704db6a7befd1a7f30c70080f2a5a

rq turtle/ttl

Synia: Scientific event

Use at

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#>
PREFIX target: <http://www.wikidata.org/entity/Q119153957>

SELECT
  ?description ?descriptionLabel ?descriptionUrl

  ?value ?valueLabel ?valueUrl

  ?wikidata ?wikidataLabel ?wikidataUrl

  ?scholia ?scholiaUrl
WHERE {
  {
    BIND(1 AS ?order)
    BIND(wd:Q52260246 AS ?description)
    BIND("#scientificevent/" AS ?descriptionUrl)

    BIND(target: AS ?value)

    BIND(target: AS ?wikidata)
    BIND(CONCAT(SUBSTR(STR(target:), 32), "&nbsp;↗") AS ?wikidataLabel)
    BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)

    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/event/", SUBSTR(STR(target:), 32)) AS ?scholiaUrl)
  } 
  UNION
  {
    BIND(2 AS ?order)
    BIND(wd:P1813 AS ?description)
    target: wdt:P1813 ?value .
  }
  UNION
  {
    BIND(3 AS ?order)
    BIND(wd:Q125391566 AS ?description)
    BIND("#scientificeventseries/" AS ?descriptionUrl)
    target: wdt:P179 ?value .
    BIND(CONCAT("#scientificeventseries/", SUBSTR(STR(?value), 32)) AS ?valueUrl)
  }
  UNION
  {
    BIND(4 AS ?order)
    BIND(wd:P11633 AS ?description)
    target: wdt:P11633 | ^wdt:P11633 ?value .
    BIND(CONCAT("#scientificevent/", SUBSTR(STR(?value), 32)) AS ?valueUrl)
  }
  UNION
  {
    BIND(5 AS ?order)
    BIND(wd:Q34770 AS ?description)
    BIND("#language" AS ?descriptionUrl)

    target: wdt:P2936 ?value .
    BIND(CONCAT("#language/", SUBSTR(STR(?value), 32)) AS ?valueUrl)

    BIND(?value AS ?wikidata)
    BIND(CONCAT(SUBSTR(STR(?value), 32), "&nbsp;↗") AS ?wikidataLabel)
    BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(?value), 32)) AS ?wikidataUrl)

    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/language/", SUBSTR(STR(?value), 32)) AS ?scholiaUrl)

  }
  UNION
  {
    SELECT
      (10 AS ?order)
      ("Organizers" AS ?description)
      (GROUP_CONCAT(?value_; separator=", ") AS ?value)
    {
      BIND(1 AS ?dummy)
      target: wdt:P664 ?iri .
      BIND(SUBSTR(STR(?iri), 32) AS ?q) 
      ?iri rdfs:label ?value_string .
      FILTER (LANG(?value_string) = 'en')
      BIND(COALESCE(?value_string, ?q) AS ?value_)
    }
    GROUP BY ?dummy
  }
  UNION
  {
    # number of participants
    BIND(20 AS ?order)
    BIND(wd:P1132  AS ?description)

    target: wdt:P1132 ?value .
  }
  UNION
  {
    # number of submissions
    BIND(21 AS ?order)
    BIND("number of submissions"  AS ?description)

    target: p:P12655 ?value_statement .
    ?value_statement ps:P12655 ?submissions.
    OPTIONAL {
      ?value_statement  pq:P518 / rdfs:label ?track .
      FILTER (LANG(?track) = "en")
    }
    BIND(IF(BOUND(?track), CONCAT(STR(?submissions), " (", ?track, ")"), STR(?submissions)) AS ?value)
  }
  UNION
  {
    # number of accepted contributions
    BIND(22 AS ?order)
    BIND("number of accepted contributions"  AS ?description)

    target: p:P12649 ?value_statement .
    ?value_statement ps:P12649 ?accepted .
    OPTIONAL {
      ?value_statement  pq:P518 / rdfs:label ?track .
      FILTER (LANG(?track) = "en")
    }
    BIND(IF(BOUND(?track), CONCAT(STR(?accepted), " (", ?track, ")"), STR(?accepted)) AS ?value)
  }
  UNION
  {
    # acceptance rate
    BIND(23 AS ?order)
    BIND("Acceptance&nbsp;rate" AS ?description)

    target: p:P5822 ?value_statement .
    ?value_statement ps:P5822 ?acceptance_rate .
    OPTIONAL {
      ?value_statement  pq:P518 / rdfs:label ?track .
      FILTER (LANG(?track) = "en")
    }
    BIND(IF(BOUND(?track), CONCAT(STR(?acceptance_rate * 100), " % (", ?track, ")"), CONCAT(STR(?acceptance_rate * 100), " %")) AS ?value)
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY ?order

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v20("?acceptance_rate") v19("?accepted") v20("?description"):::projected v11("?descriptionUrl"):::projected v12("?dummy") v13("?iri") v20("?order") v14("?q") v11("?scholia"):::projected v11("?scholiaUrl"):::projected v18("?submissions") v16("?track") v21("?value"):::projected v11("?valueUrl"):::projected v15("?value_") v17("?value_statement") v11("?value_string") v11("?wikidata"):::projected v11("?wikidataLabel"):::projected v11("?wikidataUrl"):::projected a1((" ")) a2((" ")) a3((" ")) c1(["wd:Q119153957"]):::iri c18(["bd:serviceParam"]):::iri c20(["#91;AUTO_LANGUAGE#93;,en"]):::literal 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; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; subgraph union6[" Union "] subgraph union6l[" "] style union6l fill:#abf,stroke-dasharray: 3 3; subgraph union7[" Union "] subgraph union7l[" "] style union7l fill:#abf,stroke-dasharray: 3 3; subgraph union8[" Union "] subgraph union8l[" "] style union8l fill:#abf,stroke-dasharray: 3 3; bind0[/"'23^^xsd:integer'"/] bind0 --as--o v20 bind1[/"'Acceptance&nbsp;rate'"/] bind1 --as--o v20 c1 --"p:P5822"--> v17 v17 --"p:statement/P5822"--> v20 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:qualifier/P518".-> a3 a3 --"rdfs:label"--> v16 end bind2[/"if(bound(?track),concat(str(?acceptance_rate * '100^^xsd:integer'),' % (',?track,')'),concat(str(?acceptance_rate * '100^^xsd:integer'),' %'))"/] v16 --o bind2 v20 --o bind2 bind2 --as--o v21 end subgraph union8r[" "] style union8r fill:#abf,stroke-dasharray: 3 3; bind3[/"'22^^xsd:integer'"/] bind3 --as--o v20 bind4[/"'number of accepted contributions'"/] bind4 --as--o v20 c1 --"p:P12649"--> v17 v17 --"p:statement/P12649"--> v19 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:qualifier/P518".-> a2 a2 --"rdfs:label"--> v16 end bind5[/"if(bound(?track),concat(str(?accepted),' (',?track,')'),str(?accepted))"/] v16 --o bind5 v19 --o bind5 bind5 --as--o v21 end union8r <== or ==> union8l end end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; bind6[/"'21^^xsd:integer'"/] bind6 --as--o v20 bind7[/"'number of submissions'"/] bind7 --as--o v20 c1 --"p:P12655"--> v17 v17 --"p:statement/P12655"--> v18 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v17 -."p:qualifier/P518".-> a1 a1 --"rdfs:label"--> v16 end bind8[/"if(bound(?track),concat(str(?submissions),' (',?track,')'),str(?submissions))"/] v16 --o bind8 v18 --o bind8 bind8 --as--o v21 end union7r <== or ==> union7l end end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; bind9[/"'20^^xsd:integer'"/] bind9 --as--o v20 bind10[/"'wd:P1132'"/] bind10 --as--o v20 c1 --"p:direct/P1132"--> v21 end union6r <== or ==> union6l end end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; f11[["?value_string = 'en'"]] f11 --> v11 bind12[/"'1^^xsd:integer'"/] bind12 --as--o v12 c1 --"p:direct/P664"--> v13 bind13[/"substring(str(?iri),'32^^xsd:integer')"/] v13 --o bind13 bind13 --as--o v14 v13 --"rdfs:label"--> v11 bind14[/"?value_string?q"/] v11 --o bind14 v14 --o bind14 bind14 --as--o v15 bind16[/"'10^^xsd:integer'"/] bind16 --as--o v20 bind17[/"'Organizers'"/] bind17 --as--o v20 bind18[/"?value_"/] v15 --o bind18 bind18 --as--o v21 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; bind19[/"'5^^xsd:integer'"/] bind19 --as--o v20 bind20[/"'wd:Q34770'"/] bind20 --as--o v20 bind21[/"'#language'"/] bind21 --as--o v11 c1 --"p:direct/P2936"--> v21 bind22[/"concat('#language/',substring(str(?value),'32^^xsd:integer'))"/] v21 --o bind22 bind22 --as--o v11 bind23[/"?value"/] v21 --o bind23 bind23 --as--o v11 bind24[/"concat(substring(str(?value),'32^^xsd:integer'),'&nbsp;↗')"/] v21 --o bind24 bind24 --as--o v11 bind25[/"concat('https://www.wikidata.org/wiki/',substring(str(?value),'32^^xsd:integer'))"/] v21 --o bind25 bind25 --as--o v11 bind26[/"'Scholia&nbsp;↗'"/] bind26 --as--o v11 bind27[/"concat('https://scholia.toolforge.org/language/',substring(str(?value),'32^^xsd:integer'))"/] v21 --o bind27 bind27 --as--o v11 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; bind28[/"'4^^xsd:integer'"/] bind28 --as--o v20 bind29[/"'wd:P11633'"/] bind29 --as--o v20 subgraph union9[" Union "] subgraph union9l[" "] style union9l fill:#abf,stroke-dasharray: 3 3; v21 --"p:direct/P11633"--> c1 end subgraph union9r[" "] style union9r fill:#abf,stroke-dasharray: 3 3; c1 --"p:direct/P11633"--> v21 end union9r <== or ==> union9l end bind30[/"concat('#scientificevent/',substring(str(?value),'32^^xsd:integer'))"/] v21 --o bind30 bind30 --as--o v11 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; bind31[/"'3^^xsd:integer'"/] bind31 --as--o v20 bind32[/"'wd:Q125391566'"/] bind32 --as--o v20 bind33[/"'#scientificeventseries/'"/] bind33 --as--o v11 c1 --"p:direct/P179"--> v21 bind34[/"concat('#scientificeventseries/',substring(str(?value),'32^^xsd:integer'))"/] v21 --o bind34 bind34 --as--o v11 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; bind35[/"'2^^xsd:integer'"/] bind35 --as--o v20 bind36[/"'wd:P1813'"/] bind36 --as--o v20 c1 --"p:direct/P1813"--> v21 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind37[/"'1^^xsd:integer'"/] bind37 --as--o v20 bind38[/"'wd:Q52260246'"/] bind38 --as--o v20 bind39[/"'#scientificevent/'"/] bind39 --as--o v11 bind40[/"'wd:Q119153957'"/] bind40 --as--o v21 bind41[/"'wd:Q119153957'"/] bind41 --as--o v11 bind42[/"concat(substring(str('wd:Q119153957'),'32^^xsd:integer'),'&nbsp;↗')"/] bind42 --as--o v11 bind43[/"concat('https://www.wikidata.org/wiki/',substring(str('wd:Q119153957'),'32^^xsd:integer'))"/] bind43 --as--o v11 bind44[/"'Scholia&nbsp;↗'"/] bind44 --as--o v11 bind45[/"concat('https://scholia.toolforge.org/event/',substring(str('wd:Q119153957'),'32^^xsd:integer'))"/] bind45 --as--o v11 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c18 --"wikibase:language"--> c20 end