Jump to content

Quick Overview: Difference between revisions

Leonie (talk | contribs)
Leonie (talk | contribs)
→Using the Graph: update with queries
Line 33: Line 33:
The graph itself is more a database, than a tool. In order to make it usable several ideas have been devised and implemented. Here's a quick example of what is possible on site.
The graph itself is more a database, than a tool. In order to make it usable several ideas have been devised and implemented. Here's a quick example of what is possible on site.


== Timeline of Course Sessions ==
{{#widget:SPARQLquery|code=
#defaultView:Timeline
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?item ?itemLabel ?date ?image #?dependency ?dependencyLabel
where {
 
  ?session wdt:P14 ?item.
  MINUS {?item wdt:P20 ?url.}
  MINUS {?session wdt:P3 wd:Q162.}
  # OPTIONAL {?item wdt:P1 ?dependency.}
  OPTIONAL {?item wdt:P11 ?image.}
  ?session wdt:P19 ?date.


  service wikibase:label { bd:serviceParam wikibase:language "en".}
}
}}


'''TODO: Use Example Student to explain use of graph'''
== Overview of Student ==
Shows what items a Student is has linked their item to. Can be used to track progress.
{{#widget:SPARQLquery|code=
#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 ?rgb WHERE {
  VALUES ?item1 {wd:Q157}
 
  ?item1 ?prop ?item2.
  ?edge ?dummy ?prop ; rdf:type wikibase:Property.
 
  # 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". }
} ORDER BY ?prop
}}
 
== Learning path ==
The complete path to an item (here: [[Item:Q149|Virtual Cameras]]) and what's next.
{{#widget:SPARQLquery|code=
#defaultView:Graph
# prerequisite -> topic -> postrequisite
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
#SELECT distinct ?topic ?topicLabel ?pre ?preLabel ?post ?postLabel  ?level ?rgb
SELECT ?topic ?topicLabel ?pre ?preLabel ?post ?postLabel ?rgb
WHERE {
{
  { SELECT * WHERE {
  { SELECT ?goal ?goalLabel ?topic ?topicLabel ?rgb WHERE {
    {
    BIND (wd:Q149 as ?goal).
    ?goal wdt:P1+ ?topic.
    } UNION {
      VALUES ?topic { wd:Q149 } # we also want to include the root node itself
    }
   
  }
  }
  ?topic wdt:P1 ?pre.
  }
  }
 
  Union
 
  { SELECT * WHERE {
  { SELECT ?topic ?topicLabel ?goal ?goalLabel ?rgb WHERE {
    {
      BIND (wd:Q149 as ?topic).
      ?goal wdt:P1+ ?topic. 
    }
  }
  }
  ?post wdt:P1 ?topic.
  }
  }
 
  # CC (only works in Table not GraphView)
  #bind (if(bound(?post), "FAB86C",
          #if(?topic = wd:Q149, "FDD3A2", "FFEDD8")) as ?rgb).
 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
}}
NOTE: Color coding was currently not possible for this specific case.
 
== Course Work ==
What items are used in a mandatory coursework:
{{Learnpath|quiz=wd:Q451}}

Revision as of 14:21, 25 September 2023

?? LINKS TO ALL interesting pages ??

The Dependency Graph

At the lowest level the graph is structured by linking learning contents to its prerequisite(s) and useful resources. A student can now use these links to determine how items depend on each other, and what knowledge is required to understand a specific item.

Error creating thumbnail: File missing
The dependencies between items


In the end the graph turns into a big interconnected structure:

{{#widget:SPARQLquery|code=

  1. defaultView:Graph

PREFIX wdt: <https://graphit.ur.de/prop/direct/> SELECT ?item ?itemLabel ?class ?classLabel ?image ?dependency ?dependencyLabel WHERE {

 ?item wdt:P1 ?dependency.
 ?item wdt:P2 ?class
 OPTIONAL{ ?item wdt:P9 ?image.}
 OPTIONAL{ ?class wdt:P9 ?image.}
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} }}


In order to make this amount of data useable, several Structure-Items have been defined to help group items into abstract categories.

For a more detailed explanation of the entire underlying structure go to GraphStructure or take a quick look at these following diagrams:

Using the Graph

The graph itself is more a database, than a tool. In order to make it usable several ideas have been devised and implemented. Here's a quick example of what is possible on site.

Timeline of Course Sessions

{{#widget:SPARQLquery|code=

  1. defaultView:Timeline

PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/> select distinct ?item ?itemLabel ?date ?image #?dependency ?dependencyLabel where {

 ?session wdt:P14 ?item.
 MINUS {?item wdt:P20 ?url.}
 MINUS {?session wdt:P3 wd:Q162.}
 # OPTIONAL {?item wdt:P1 ?dependency.}
 OPTIONAL {?item wdt:P11 ?image.}
 ?session wdt:P19 ?date.
 service wikibase:label { bd:serviceParam wikibase:language "en".}

} }}

Overview of Student

Shows what items a Student is has linked their item to. Can be used to track progress. {{#widget:SPARQLquery|code=

  1. 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 ?rgb WHERE {

 VALUES ?item1 {wd:Q157}
 
 ?item1 ?prop ?item2.
 ?edge ?dummy ?prop ; rdf:type wikibase:Property.
 # 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". } } ORDER BY ?prop }}

Learning path

The complete path to an item (here: Virtual Cameras) and what's next. {{#widget:SPARQLquery|code=

  1. defaultView:Graph
  2. prerequisite -> topic -> postrequisite

PREFIX wd: <https://graphit.ur.de/entity/> PREFIX wdt: <https://graphit.ur.de/prop/direct/>

  1. SELECT distinct ?topic ?topicLabel ?pre ?preLabel ?post ?postLabel ?level ?rgb

SELECT ?topic ?topicLabel ?pre ?preLabel ?post ?postLabel ?rgb WHERE { {

 { SELECT * WHERE {
 { SELECT ?goal ?goalLabel ?topic ?topicLabel ?rgb WHERE {
   {
   BIND (wd:Q149 as ?goal).
   ?goal wdt:P1+ ?topic.
   } UNION {
     VALUES ?topic { wd:Q149 } # we also want to include the root node itself
   }
   
 }
 }
 ?topic wdt:P1 ?pre.
 }
 }
 Union
 
 { SELECT * WHERE {
 { SELECT ?topic ?topicLabel ?goal ?goalLabel ?rgb WHERE {
   {
     BIND (wd:Q149 as ?topic).
     ?goal wdt:P1+ ?topic.  
   }
 }
 }
 ?post wdt:P1 ?topic.
 }
 }
 
 # CC (only works in Table not GraphView)
 #bind (if(bound(?post), "FAB86C", 
          #if(?topic = wd:Q149, "FDD3A2", "FFEDD8")) as ?rgb).
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} } }} NOTE: Color coding was currently not possible for this specific case.

Course Work

What items are used in a mandatory coursework: {{#widget:SPARQLquery|code=

  1. defaultView:Graph

PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/> select distinct ?item ?itemLabel ?quiz ?quizLabel ?dependency ?dependencyLabel where {

 BIND (wd:wd:Q451 AS ?quiz).
 ?quiz wdt:P1 ?item.
 OPTIONAL {?item wdt:P1 ?dependency.}
 service wikibase:label { bd:serviceParam wikibase:language "en" }

}|caption=The learning path to wd:Q451 }}