ExampleStudent: Difference between revisions
(created page) |
(added: Learnpath to interests) |
||
Line 45: | Line 45: | ||
} ORDER BY ?prop | } ORDER BY ?prop | ||
}}. | }}. | ||
== Learnpath to interests == | |||
Returns the immediate dependencies for all items that Max is interested in. | |||
{{#widget:SPARQLquery|code= | |||
#defaultView:Graph | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT #?item1 ?item1Label ?edgeLabel ?item2 ?item2Label ?dependency ?dependencyLabel | |||
?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel | |||
WHERE { | |||
VALUES ?item1 {wd:Q157} | |||
VALUES ?prop {wdt:P23} | |||
?item1 ?prop ?item2. | |||
# Select all dependencies for every item2 | |||
OPTIONAL {?item2 wdt:P1 ?dependency.} | |||
?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} ORDER BY ?prop | |||
}} | |||
= Using the Graph yourself = | = Using the Graph yourself = | ||
If you want to visualize your own usage of the graph, try the queries down below. After clicking ''Try it'' all you need to do is swap out the Item: Q157 with your own item's number Q... and query the graph (or press CTRL+ENTER). | If you want to visualize your own usage of the graph, try the queries down below. After clicking ''Try it'' all you need to do is swap out the Item: Q157 with your own item's number Q... and query the graph (or press CTRL+ENTER). | ||
''' A complete overview ''' | |||
{{SPARQL2|query= | |||
#defaultView:Graph | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT ?item1 ?image ?item1Label ?item2 ?image2 ?item2Label ?edgeLabel WHERE { | |||
VALUES ?item1 {wd:Q157} | |||
?item1 ?prop ?item2. | |||
?edge ?dummy ?prop ; rdf:type wikibase:Property | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} ORDER BY ?prop | |||
}}. | |||
''' Learnpath to interests ''' | |||
{{SPARQL2|query= | |||
#defaultView:Graph | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT #?item1 ?item1Label ?edgeLabel ?item2 ?item2Label ?dependency ?dependencyLabel | |||
?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel | |||
WHERE { | |||
VALUES ?item1 {wd:Q157} | |||
VALUES ?prop {wdt:P23} | |||
?item1 ?prop ?item2. | |||
# Select all dependencies for every item2 | |||
OPTIONAL {?item2 wdt:P1 ?dependency.} | |||
?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} ORDER BY ?prop | |||
}} |
Revision as of 13:58, 19 September 2023
This is an examplatory page for student Max Mustermann's course of study. Max Mustermann is a prototype of a student-item and can be used to view a possible approach to use GraphIT.
A Student
A Student in the graph is defined as an item, that uses a students name or prefered alias/nickname as a label, as seen below.
Language | Label | Description |
---|---|---|
English | <Name> | Student at University of Regensburg (<Name>) |
The item itself needs 'further specifications, such as a declaration that it is an instance of the Student, which Course a student participates in, what items a student is interested in or has completed. As seen below:
<Name> | — instance of → | Student |
Student-Item | — interested in → | Item |
Student-Item | — has completed → | Item |
Student-Item | — participates in → | Course, Session |
Using the Graph
Here are visual examples of how Max uses the graph. All used queries are made accessible in the next section.
A complete overview
Returns an entire overview of all items connected to Max.
.Learnpath to interests
Returns the immediate dependencies for all items that Max is interested in.
Using the Graph yourself
If you want to visualize your own usage of the graph, try the queries down below. After clicking Try it all you need to do is swap out the Item: Q157 with your own item's number Q... and query the graph (or press CTRL+ENTER).
A complete overview
Items used: Max Mustermann (Q157)
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
SELECT ?item1 ?image ?item1Label ?item2 ?image2 ?item2Label ?edgeLabel WHERE {
VALUES ?item1 {wd:Q157}
?item1 ?prop ?item2.
?edge ?dummy ?prop ; rdf:type wikibase:Property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?prop
.
Learnpath to interests
Items used: Max Mustermann (Q157)
Properties used: interested in (P23), depends on (P1)
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
SELECT DISTINCT #?item1 ?item1Label ?edgeLabel ?item2 ?item2Label ?dependency ?dependencyLabel
?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel
WHERE {
VALUES ?item1 {wd:Q157}
VALUES ?prop {wdt:P23}
?item1 ?prop ?item2.
# Select all dependencies for every item2
OPTIONAL {?item2 wdt:P1 ?dependency.}
?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?prop