Sandbox
{{#switch: warn | warn = ⚠️ | info = ℹ️ | #default = ✒️ }} A test text
External Data
{{#get_web_data:url=https://query.wikidata.org/sparql?query=SELECT%20%3Fitem%20%3FitemLabel%20%3Fsymbol%20%3FatomicNumber%20%28%20YEAR%28%20%3FdiscoveryDate%20%29%20AS%20%3FdiscoveryYear%20%29%20%3Fdiscoverer%20%3FdiscovererLabel%0AWHERE%20%7B%0A%20%20VALUES%20%3Fitem%20%7B%20wd%3AQ654%20%7D%20.%0A%20%20%3Fitem%20wdt%3AP246%20%3Fsymbol%20.%0A%20%20%3Fitem%20wdt%3AP1086%20%3FatomicNumber%20.%0A%20%20%3Fitem%20wdt%3AP575%20%3FdiscoveryDate%20.%0A%20%20%3Fitem%20wdt%3AP61%20%3Fdiscoverer%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20"en".%20%7D%0A%7D&format=json |format=json |use jsonpath |data=itemLabel=$.results.bindings[0].itemLabel.value, symbol=$.results.bindings[0].symbol.value, atomicNumber=$.results.bindings[0].atomicNumber.value, discoveryYear=$.results.bindings[0].discoveryYear.value, discovererURL=$.results.bindings[*].discoverer.value, discovererLabel=$.results.bindings[*].discovererLabel.value, }} Info for Q654:
- Name: {{#external_value:itemLabel}}
- Symbol: {{#external_value:symbol}}
- Atomic number: {{#external_value:atomicNumber}}
- Year discovered: {{#external_value:discoveryYear}}
- Discoverers: {{#for_external_table:[{{{discovererURL}}} {{{discovererLabel}}}], }}
via: https://discoursedb.org/wiki/Wikidata_querying_demo
Course Query
{{#if: Wissenschaftliches Arbeiten 23/24WS (Q468), Session (Q427), Instrumente und Methoden (Q472), Was ist Wissenschaft (Q473), Ablauf Bachelorarbeit (Q474), Statistik (Q475), Wissenschaftliches Schreiben (Q476), Studiendesign und -durchführung (Q477), Literaturrecherche (Q478) | Items used: Wissenschaftliches Arbeiten 23/24WS (Q468), Session (Q427), Instrumente und Methoden (Q472), Was ist Wissenschaft (Q473), Ablauf Bachelorarbeit (Q474), Statistik (Q475), Wissenschaftliches Schreiben (Q476), Studiendesign und -durchführung (Q477), Literaturrecherche (Q478) | }}
{{#if: includes (P14), instance of (P3), depends on (P1) | Properties used: includes (P14), instance of (P3), depends on (P1) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Graph
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT distinct ?topic ?topicLabel ?rgb ?dependency ?dependencyLabel ?category ?categoryLabel
WHERE {
{
# get all categories of the course
BIND (wd:Q468 as ?course).
?course wdt:P14 ?category.
Minus {?category wdt:P3 wd:Q427}
{ SELECT ?category ?categoryLabel ?topic ?topicLabel WHERE {
{
?category wdt:P14 ?topic.
}
}
}
Union
# get all dependencies of the topics
{ SELECT ?topic ?topicLabel ?dependency ?dependencyLabel WHERE {
{
?topic wdt:P1 ?dependency.
}
}
}
?category wdt:P14 ?topic.
?topic wdt:P1 ?dependency.
bind (if(?category = wd:Q472, "e8fcff", # (blue) f3fdff
if(?category = wd:Q473, "e3ffd9", # (green)
if(?category = wd:Q474, "ffeec2", # (orange)
if(?category = wd:Q475, "DCCDE0", # (purple)
if(?category = wd:Q476, "F9DCDF", # (pink)
if(?category = wd:Q477, "E7DEDA", # (brown)
if(?category = wd:Q478, "ECEDFF", # (lavender)
"FFFFFF" ))))))) as ?rgb).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
{{#if: Wissenschaftliches Arbeiten 23/24WS (Q468), Session (Q427), Instrumente und Methoden (Q472), Was ist Wissenschaft (Q473), Ablauf Bachelorarbeit (Q474), Statistik (Q475), Wissenschaftliches Schreiben (Q476), Studiendesign und -durchführung (Q477), Literaturrecherche (Q478) | Items used: Wissenschaftliches Arbeiten 23/24WS (Q468), Session (Q427), Instrumente und Methoden (Q472), Was ist Wissenschaft (Q473), Ablauf Bachelorarbeit (Q474), Statistik (Q475), Wissenschaftliches Schreiben (Q476), Studiendesign und -durchführung (Q477), Literaturrecherche (Q478) | }}
{{#if: includes (P14), instance of (P3) | Properties used: includes (P14), instance of (P3) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Graph
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT distinct
?category ?categoryLabel ?topic ?topicLabel ?rgb
WHERE {
BIND (wd:Q468 as ?course).
?course wdt:P14 ?category.
Minus {?category wdt:P3 wd:Q427}
BIND (rdf:type as ?id)
?category wdt:P14 ?topic.
# Color coding
bind (if(?category = wd:Q472, "e8fcff", # (blue) f3fdff
if(?category = wd:Q473, "e3ffd9", # (green)
if(?category = wd:Q474, "ffeec2", # (orange)
if(?category = wd:Q475, "DCCDE0", # (purple)
if(?category = wd:Q476, "F9DCDF", # (pink)
if(?category = wd:Q477, "E7DEDA", # (brown)
if(?category = wd:Q478, "ECEDFF", # (lavender)
"FFFFFF" ))))))) as ?rgb).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Linked RunQuery
{{#queryformlink:form=Learning Path|link text=Try running the query :D|link type=button|tooltip=This is a test}}
Follow https://graphit.ur.de/wiki/Special:RunQuery/Learning_Path?Learning_Path[quiz]=Q444&_run for preloaded query
{{#queryformlink:form=Learning Path|query string=Learning_Path[quiz]=Q444&_run}}
Embedded RunQuery
Special:RunQuery/Learning Path2
Full Graph
Run this query to get the full graph Special:RunQuery/FullGraph