GraphStructure: Difference between revisions

(→‎Category: change default query to table)
 
(9 intermediate revisions by 2 users not shown)
Line 34: Line 34:


== Resources ==
== Resources ==
A Resource is an item that is defined by the Properties [[Property:P20|url]] to '''link''' to an external site and [[Property:P3|instance of]] a '''structure-item''', as seen below.  
A Resource is an item that contains a link to some resource (property: [[Property:P20|url]]) hosted on the Wiki or on another platform.
It usually is an [[Property:P3|instance of]] a '''Resource Class''', as seen below.  
{{#widget:SPARQLquery|code=
{{#widget:SPARQLquery|code=
#defaultView:Graph
#defaultView:Graph
Line 44: Line 45:
   ?item wdt:P3 ?category.
   ?item wdt:P3 ?category.
   service wikibase:label { bd:serviceParam wikibase:language "en".}
   service wikibase:label { bd:serviceParam wikibase:language "en".}
}
} |caption=All classes that a resource can be an instance of
}}  
}}  


Line 52: Line 53:
| Resource || — [[Property:P20|url]] → || URL
| Resource || — [[Property:P20|url]] → || URL
|-
|-
| Resource ||  — [[Property:P3|instance of]] → || Structure-Item
| Resource ||  — [[Property:P3|instance of]] → || Resource Class
|-
|-
|}
|}
Line 61: Line 62:
A general category, such as "Mathematical Foundations"; used to group topics.  
A general category, such as "Mathematical Foundations"; used to group topics.  
{{#widget:SPARQLquery|code=
{{#widget:SPARQLquery|code=
#defaultView:Graph
#defaultView:Table
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?item ?itemLabel ?category ?categoryLabel ?edgeLabel
select distinct ?item ?itemLabel ?category ?categoryLabel #?edgeLabel
where {
where {
   bind (wd:Q169 as ?category).
   bind (wd:Q169 as ?category).
Line 110: Line 111:
{| class="wikitable" style="margin:auto; text-align:center;"
{| class="wikitable" style="margin:auto; text-align:center;"
|-
|-
| Course-Item || — [[Property:P3|instance of]] &rarr; || [[Item:Q170|Course]]
| Course || — [[Property:P3|instance of]] &rarr; || [[Item:Q170|Course]]
|-
|-
| Course-Item || — [[Property:P24|taught by]] &rarr; || Educator
| Course || — [[Property:P24|taught by]] &rarr; || Educator
|-
|-
| Course-Item || — [[Property:P14|includes]] &rarr; || Session-Item
| Course || — [[Property:P14|includes]] &rarr; || Session item
|-
|-
| Course-Item || — [[Property:P14|includes]] &rarr; || Learning Content
| Course || — [[Property:P14|includes]] &rarr; || Learning Content
|-
|-
| Course-Item || — [[Property:P14|includes]] &rarr; || Category-Item
| Course || — [[Property:P14|includes]] &rarr; || Category item
|}
|}
See: [[Item:Q171]] as an example.
See: [[Item:Q171]] as an example.
Line 139: Line 140:
}}
}}


A course can include a [[Item:Q427|Session]], as seen below:
A course can include multiple [[Item:Q427|Session]]s, as seen below.
These may be used to structure the course contents.


=== Session ===
=== Session ===
A [[Item:Q427|Session]] acts as a possibility to group several items that will be discussed during an actual course session.
A [[Item:Q427|Session]] allows grouping multiple items that are discussed within an actual course session.
{{#widget:SPARQLquery|code=
{{#widget:SPARQLquery|code=
#defaultView:Graph
#defaultView:Graph
# via: https://phabricator.wikimedia.org/T168715
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?item ?itemLabel ?session ?sessionLabel ?rgb
select distinct ?item ?itemLabel?rgb ?session ?sessionLabel
#?course ?courseLabel ?edgeLabel ?rgb
where {
where {
    
    
Line 159: Line 159:
   Optional {  
   Optional {  
     ?session wdt:P3 ?var.
     ?session wdt:P3 ?var.
     bind (if(?var = wd:Q170, "e8fcff", # course (blue)  f3fdff
     bind (if(?var = wd:Q170, "e8fcff", # session (blue)   
           if(?var = wd:Q427 , "e3ffd9", # session (green)  
           if(?var = wd:Q427 , "f0ffeb", # topics (green)  
      "FFFFFF" )) as ?rgb).
          "FFFFFF" )) as ?rgb). # course (white)
    # Note: Session color is not displayed, for som reason (but does exist in table)
   }
   }
   service wikibase:label { bd:serviceParam wikibase:language "en".}
   service wikibase:label { bd:serviceParam wikibase:language "en".}
}
} LIMIT 50
|caption=The Sessions and their topics for the CGBV-course
}}
}}
See: [[Item:Q248]] as an example.
See: [[Item:Q248]] as an example.


Line 182: Line 181:


=== Coursework ===
=== Coursework ===
Defines work that is to be done for a course, such as mandatory exercises or exams. An item is as course work by linking it as an [[Property:P3|instance of]] [[Item:Q464|Coursework]].
Defines work that is to be done for a course, such as mandatory exercises or exams.  
An item is marked as coursework by making it an [[Property:P3|instance of]] [[Item:Q464|Coursework]].


It can be used to create a [[Template:Learnpath]] using syntax like: <pre>{{Learnpath|quiz=wd:Q451}}.</pre>
It can be used to create a [[Template:Learning Path]] using syntax like: <pre>{{Learning Path|quiz=wd:Q451}}.</pre>


'''A short overview:'''
'''A short overview:'''
Line 278: Line 278:
|-
|-
| [[Property:P14]] || includes || Making a list of items || Learning Contents, Sessions
| [[Property:P14]] || includes || Making a list of items || Learning Contents, Sessions
|-
| [[Property:P37]] || properties for this type || List of properties that apply || Property
|-
|-
|
|
Line 315: Line 317:
| [[Property:P26]] || language || Declare the language || Items
| [[Property:P26]] || language || Declare the language || Items
|-
|-
|}




|}
Items using '''[[Property:P37|property for this type]]''' and what properties they link to:
 
{{#widget:SPARQLquery|code=
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?item ?itemLabel ?property ?propertyLabel ?rgb ?shape
where {
  ?item wdt:P37 ?property.
  BIND("box" as ?shape).
  BIND("E0EFFF" as ?rgb).
  service wikibase:label { bd:serviceParam wikibase:language "en".}
}
}}


= Useful Pages =
= Useful Pages =
* [[DebugQueries]]
* [[DebugQueries]]
* [https://query.graphit.ur.de/| Query Service]
* [https://query.graphit.ur.de/| Query Service]

Latest revision as of 09:02, 29 October 2024

A Documentation of the structure behind the Graph.

Graph Structure

Simple overview of the graph structure

Topic

A topic describes a learning content. (As most items in the graph are topics, their type/class is not explicitly defined.) It uses subclass of to link to a defined Category, that is used to group topics. A depends on link from one topic to another indicates that the other topic is necessary prerequisite knowledge. A related to link indicates a similar topic. Additionally for each topic, resources can be associated with resource.

A short overview of possible links:

Topic subclass of Category
Topic depends on Prerequisite (another item)
Topic related to Equivalent (another item)
Topic resource Resource
Topic instance of Application

Additionally an item can be defined further by linking an importance-item using importance. This can be done as simple link or as an added value to a property. See Section: Importance

Resources

A Resource is an item that contains a link to some resource (property: url) hosted on the Wiki or on another platform. It usually is an instance of a Resource Class, as seen below.

All classes that a resource can be an instance of

A short overview:

Resource url URL
Resource instance of Resource Class

See: Item:Q280 as an example and Resource to reference a dummy element

Category

A general category, such as "Mathematical Foundations"; used to group topics.

A short overview:

Category-Item instance of Category

Course of Study

This item describes the course of a study path and bundles the set of courses that are included in that path. This is used for example to display the path through a major that a student is enrolled in and what lectures or courses are part of the program.


A specific Course of Study is declared by making it an instance of the Course of Study-Item and then linking a course to it using the includes-property.

Course of Study-Item instance of Course of Study
Course of Study-Item includes Course-Item


Connecting items to a course (of study)

TODO: example

Course

A course encompasses a collection of learning contents. To declare an item as a Course use instance of. It is the equivalent of a course officially taught by the university that a student enrolls in.


Futhermore a course can include several other items, such as a Session-Item, a Category-Item or any learning content-Item directly. This structure can later be used to help classify which course an item can belong to.


The diagram on the left gives a simple illustration of how this graph structure works.


A short overview:

Course instance of Course
Course taught by Educator
Course includes Session item
Course includes Learning Content
Course includes Category item

See: Item:Q171 as an example.

A course can include multiple Sessions, as seen below. These may be used to structure the course contents.

Session

A Session allows grouping multiple items that are discussed within an actual course session.

The Sessions and their topics for the CGBV-course

See: Item:Q248 as an example.

A short overview:

Session-Item instance of Session
Session-Item includes Item
Course-Item on date Date

Coursework

Defines work that is to be done for a course, such as mandatory exercises or exams. An item is marked as coursework by making it an instance of Coursework.

It can be used to create a Template:Learning Path using syntax like:

{{Learning Path|quiz=wd:Q451}}.

A short overview:

Course Work-Item url URL
Course Work-Item instance of Course Work
Course Work-Item importance Importance-Item
Course Work-Item includes Item
Course Work-Item language Language-Item

See: Item:Q451 as an example.

People

Student

The role of a student is declared by linking from an item to Student using instance of. The student then can link their item to others using interested in and has completed to organize their interests and progress.

A short overview:

Student-Item instance of Student
Student-Item interested in Item
Student-Item has completed Item
Student-Item participates in Course, Session

See: Item:Q157 as an example.

Educator

The role of an educator is declared by linking from an item to Educator using instance of.

See: Item:Q158 as an example.

Importance

An items that describes an importance to learn a learning content. It's linked to using importance.

Item importance Mandatory
Item importance Essential
Item importance Recommended
Item importance Optional

Properties

List of Properties

Important Properties:

Property Name Used for Links to →
Property:P1 depends on Prerequisites Learning contents
Property:P2 subclass of Grouping items into Topics Categories
Property:P3 instance of Abstract Classes Category
Property:P4 related to Equivalents Learning contents
Property:P14 includes Making a list of items Learning Contents, Sessions
Property:P37 properties for this type List of properties that apply Property
Property:P21 resource Link to a resource Resources
Property:P20 url save a URL URL
Property:P11 image declare images for items Image (from Wikimedia Commons)
Property:P12 has completed Completion Learning Contents, (Sessions, Courses)
Property:P23 interested in Declare interests Learning contents
Property:P25 participates in Participation Courses, Sessions
Property:P13 importance Declaring importance Learning contents
Property:P16 created by Author Person
Property:P17 modified by Author Person
Property:P22 certified by Author Educator
Property:P24 taught by Author Educator
Property:P19 on date Timeliness Date
Property:P15 comment Note something String
Property:P26 language Declare the language Items


Items using property for this type and what properties they link to:

Useful Pages