ExampleStudent: Difference between revisions

(added: Learnpath to interests)
(→‎A complete overview: update query (-username edgeLabel))
 
(11 intermediate revisions by the same user not shown)
Line 13: Line 13:




The item itself needs '''further specifications'', such as a declaration that it is an [[Property:P3|instance of]] the [[Item:Q167|Student]], which Course a student [[Property:P25|participates in]], what items a student is [[Property:P23|interested in]] or [[Property:P12|has completed]]. As seen below:
The item itself needs '''further specifications''', such as a declaration that it is an [[Property:P3|instance of]] the [[Item:Q167|Student]]-Item, which course a student [[Property:P25|participates in]], and what items a student is [[Property:P23|interested in]] or [[Property:P12|has completed]].


{| class="wikitable" style="margin:auto; text-align:center;"
{| class="wikitable" style="margin:auto; text-align:center;"
| <Name> || — [[Property:P3|instance of]] &rarr; || [[Item:Q167|Student]]
| Student-Item || — [[Property:P3|instance of]] &rarr; || [[Item:Q167|Student]]
|-
|-
| Student-Item || — [[Property:P23|interested in]] &rarr; || Item
| Student-Item || — [[Property:P23|interested in]] &rarr; || Item
Line 36: Line 36:
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wd: <https://graphit.ur.de/entity/>


SELECT ?item1 ?image ?item1Label ?item2 ?image2 ?item2Label ?edgeLabel WHERE {
SELECT ?item1 ?image ?item1Label ?item2 ?image2 ?item2Label ?edgeLabel ?rgb WHERE {
   VALUES ?item1 {wd:Q157}
   VALUES ?item1 {wd:Q157}
    
    
   ?item1 ?prop ?item2.
   ?item1 ?prop ?item2.
   ?edge ?dummy ?prop ; rdf:type wikibase:Property  
   ?edge ?dummy ?prop ; rdf:type wikibase:Property.
 
  # Minus username in edgeLabel
  FILTER (?prop != wdt:P28)
 
  # Color Coding:
    bind (if(?prop = wdt:P25, "e8fcff", # participates in (blue)  f3fdff
          if(?prop = wdt:P12, "e3ffd9", # has completed (green)
          if(?prop = wdt:P23, "ffeec2", # interested in (orange)
      "FFFFFF" ))) as ?rgb).
    
    
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?prop
} ORDER BY ?prop
}}.
}}


== Learnpath to interests ==
== Learnpath to interests ==
Line 68: Line 77:
} ORDER BY ?prop
} ORDER BY ?prop
}}
}}
== Completed Items ==
Returns all items, that have been completed. And shows those who have been completed on a specified date in a timeline. (The rest is visible via the table-option of the graph widget.)
{{#widget:SPARQLquery|code=
#defaultView:Timeline
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wds: <https://graphit.ur.de/entity/statement/>
PREFIX wdv: <https://graphit.ur.de/value/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
SELECT ?topic ?topicLabel ?image ?date WHERE {
  BIND(wd:Q157 as ?user).
  ?user p:P12 ?statement.
  ?statement ps:P12 ?topic.
  OPTIONAL {?statement pq:P19 ?date.}
  OPTIONAL {?topic wdt:P11 ?image.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} |captio=A timeline of when an item was completed |height=30vh
}}
== Completed Course Work ==
Returns all items, that are [[Item:Q463|Course Work]], i.e need to be completed in order to pass the course. Completed items are marked <span style="color: green">green</span> and work, that is mandatory but has not been completed yet is marked <span style="color: red">red</span>. ''(Completed items are items that a student links to using the [[Property:P12|has completed]]-Property.)''
{{#widget:SPARQLquery|code=
#defaultView:Graph
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?course ?courseLabel ?user ?userLabel ?work ?workLabel ?rgb ?prof # ?course ?courseLabel
where {
  values (?user) { (wd:Q157) }.
 
  # get courses ?user participates in
  ?user wdt:P25 ?course.
 
  # get all course Work from courses that ?user participates in
  ?course wdt:P14 ?work.
  ?work wdt:P3 wd:Q463.
 
  # Mark completed Items in green.
  optional {
    ?user wdt:P12 ?work.
    bind (if(bound(?work), "B2FF7B", "FFFFFF") as ?rgb).  # work "
  }
 
  # TODO: Mark certified completed items differently
 
  # Mark Mandatory Items in red
  optional {
    ?work wdt:P13 ?importance.
    bind (if(?importance = wd:Q324, "FF5F5C", "FFFFFF") as ?rgb).
  }
 
  service wikibase:label { bd:serviceParam wikibase:language "en" }
}
}}
'''NOTE:''' Currently works without specific courses, meaning that the Course Works has not yet been attributed to a specific course. There is also no certification by a lecturer.
== Prerequisites for a course ==
Gives an overview of all items, that are prerequisites to items that are included in a course.
Those items themselves are not part of the course and can be seen as fundamental knowledge to be known before taking to course in question.
{{#widget:SPARQLquery|code=
#defaultView:Graph
# All items that are prereqs for items included in a course
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT ?pre ?preLabel ?course ?courseLabel #?content ?contentLabel
WHERE {
  BIND (wd:Q171 as ?course).
  ?course wdt:P14 ?item.
  MINUS {?item wdt:P3 wd:Q463}. # exclude coursework
 
  OPTIONAL {?item wdt:P1 ?pre.} # get all prereqs of included content
  OPTIONAL { # get all prereqs of items included in sessions/categories
    ?item wdt:P14 ?item2.
    ?item2 wdt:P1 ?pre.
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} |caption= Fundamental knowledge to know before taking a couse.
}}
NOTE: The definition of what is included in a course is currently not fully completed, but in theory the query should work.


= 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 <span style="color:dodgerblue">Try it!</span> 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 '''
== A complete overview ==


{{SPARQL2|query=
{{SPARQL2|query=
Line 91: Line 184:




''' Learnpath to interests '''
== Learnpath to interests ==
{{SPARQL2|query=
{{SPARQL2|query=
#defaultView:Graph
#defaultView:Graph
Line 97: Line 190:
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wd: <https://graphit.ur.de/entity/>


SELECT DISTINCT #?item1 ?item1Label ?edgeLabel ?item2 ?item2Label ?dependency ?dependencyLabel
SELECT DISTINCT ?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel
?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel
WHERE {
WHERE {
   VALUES ?item1 {wd:Q157}
   VALUES ?item1 {wd:Q157}
   VALUES ?prop {wdt:P23}
   VALUES ?prop {wdt:P23}
   ?item1 ?prop ?item2.
   ?item1 ?prop ?item2.
 
   OPTIONAL {?item2 wdt:P1 ?dependency.} # Select first dependencies
  # Select all dependencies for every item2
   OPTIONAL {?item2 wdt:P1 ?dependency.}
 
   ?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels
   ?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels
    
    
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?prop
} ORDER BY ?prop
}}
== Completed Items ==
{{SPARQL2|query=
#defaultView:Timeline
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wds: <https://graphit.ur.de/entity/statement/>
PREFIX wdv: <https://graphit.ur.de/value/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
SELECT ?topic ?topicLabel ?image ?date WHERE {
  BIND(wd:Q157 as ?user).
  ?user p:P12 ?statement.
  ?statement ps:P12 ?topic.
  OPTIONAL {?statement pq:P19 ?date.}
  OPTIONAL {?topic wdt:P11 ?image.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}}
== Completed Course Works ==
{{SPARQL2|query=
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?user ?userLabel ?work ?workLabel ?rgb ?prof
{
  values (?user) {(wd:Q157)}
  #values (?course) {(wd:Q171)}
  ?work wdt:P3 wd:Q463. # get all course Work
 
  # Mark completed Items in green.
  optional {
    ?user wdt:P12 ?work.
    bind (if(bound(?work), "79b965", "FFFFFF") as ?rgb).  # work
  }
 
  # TODO: Mark certified completed items differently
 
  # Mark Mandatory Items in red
  optional {
    ?work wdt:P13 ?importance.
    bind (if(?importance = wd:Q324, "e53935", "FFFFFF") as ?rgb).
  }
 
  service wikibase:label { bd:serviceParam wikibase:language "en" }
}
}}
}}

Latest revision as of 16:00, 9 November 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-Item, which course a student participates in, and what items a student is interested in or has completed.

Student-Item 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.

Completed Items

Returns all items, that have been completed. And shows those who have been completed on a specified date in a timeline. (The rest is visible via the table-option of the graph widget.)

Completed Course Work

Returns all items, that are Course Work, i.e need to be completed in order to pass the course. Completed items are marked green and work, that is mandatory but has not been completed yet is marked red. (Completed items are items that a student links to using the has completed-Property.)

NOTE: Currently works without specific courses, meaning that the Course Works has not yet been attributed to a specific course. There is also no certification by a lecturer.

Prerequisites for a course

Gives an overview of all items, that are prerequisites to items that are included in a course. Those items themselves are not part of the course and can be seen as fundamental knowledge to be known before taking to course in question.

Fundamental knowledge to know before taking a couse.

NOTE: The definition of what is included in a course is currently not fully completed, but in theory the query should work.

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

Try it!

.


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 ?item2 ?item2Label ?dependency ?dependencyLabel ?item1 ?item1Label ?edgeLabel
WHERE {
  VALUES ?item1 {wd:Q157}
  VALUES ?prop {wdt:P23}
  ?item1 ?prop ?item2.
  OPTIONAL {?item2 wdt:P1 ?dependency.} # Select first dependencies
  ?edge ?dummy ?prop ; rdf:type wikibase:Property. # edge labels
  
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?prop

Try it!


Completed Items

Items used: Max Mustermann (Q157)

Properties used: image (P11), has completed (P12), on date (P19)

#defaultView:Timeline
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wds: <https://graphit.ur.de/entity/statement/>
PREFIX wdv: <https://graphit.ur.de/value/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
SELECT ?topic ?topicLabel ?image ?date WHERE {
  BIND(wd:Q157 as ?user).
  ?user p:P12 ?statement.
  ?statement ps:P12 ?topic.
  OPTIONAL {?statement pq:P19 ?date.}
  OPTIONAL {?topic wdt:P11 ?image.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!


Completed Course Works

Items used: Max Mustermann (Q157), CGBV 23SS (Q171), Coursework (Q463), Mandatory (Q324)

Properties used: instance of (P3), has completed (P12), importance (P13)

#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?user ?userLabel ?work ?workLabel ?rgb ?prof
{ 
  values (?user) {(wd:Q157)}
  #values (?course) {(wd:Q171)}
  ?work wdt:P3 wd:Q463. # get all course Work
  
  # Mark completed Items in green.
  optional { 
    ?user wdt:P12 ?work.
    bind (if(bound(?work), "79b965", "FFFFFF") as ?rgb).  # work
  }
  
  # TODO: Mark certified completed items differently
  
  # Mark Mandatory Items in red
  optional {
    ?work wdt:P13 ?importance. 
    bind (if(?importance = wd:Q324, "e53935", "FFFFFF") as ?rgb).
  }
  
  service wikibase:label { bd:serviceParam wikibase:language "en" }
}

Try it!