Sandbox: Difference between revisions
(test for ExternalData-Extension) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Note|type=warn|text=A test text}} | {{Note|type=warn|text=A test text}} | ||
<imagemap> | |||
File:Graph-simple.png|400px|alt=Test | |||
default [[Main Page|Go home]] | |||
</imagemap> | |||
Line 23: | Line 28: | ||
via: https://discoursedb.org/wiki/Wikidata_querying_demo | via: https://discoursedb.org/wiki/Wikidata_querying_demo | ||
{{#get_web_data:url=http://query.graphit.ur.de/proxy/wdqs/bigdata/namespace/wdq/sparql?query=%23defaultView%3ATable%0APREFIX%20wd%3A%20%20%3Chttps%3A%2F%2Fgraphit.ur.de%2Fentity%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fgraphit.ur.de%2Fprop%2Fdirect%2F%3E%0ASELECT%20(COUNT(*)%20as%20%3Fitems)%20%0AWHERE%20%7B%0A%20%20%3Fitem%20wikibase%3Aidentifiers%20%3Fi.%20%23%20get%20only%20items%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D&format=json | |||
|format=json | |||
|use jsonpath | |||
|data=items=$.results.bindings[0].items.value | |||
}} | |||
Anzahl Items: {{#external_value:items}} | |||
== Course Query == | == Course Query == |
Latest revision as of 14:49, 7 May 2024
⚠️ Warning! A test text
External Data
Info for Q654:
- Name: neon
- Symbol: Ne
- Atomic number: 10
- Year discovered: 1898
- Discoverers: Morris Travers, William Ramsay,
via: https://discoursedb.org/wiki/Wikidata_querying_demo
Anzahl Items: 1779
Course Query
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)
Properties used: includes (P14), instance of (P3), depends on (P1)
#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". }
}
}
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)
Properties used: includes (P14), instance of (P3)
#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
Follow https://graphit.ur.de/wiki/Special:RunQuery/Learning_Path?Learning_Path[quiz]=Q444&_run for preloaded query
Embedded RunQuery
Full Graph
Run this query to get the full graph