Courses/CGBV SS24/Graph: Difference between revisions
→All Categories: add link to query (better loading) |
→Resources: add query |
||
| Line 30: | Line 30: | ||
Returns a graph with all '''included in''' the course. | Returns a graph with all '''included in''' the course. | ||
See the query '''[https://tinyurl.com/yorv5zu2 here]''' | See the query '''[https://tinyurl.com/yorv5zu2 here]''' | ||
== Items == | |||
=== Resources === | |||
Returns a table with all resources that are linked to from inside the course. | |||
{{#widget:SPARQLquery|code= | |||
#defaultView:Table | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT ?item ?itemLabel ?resource ?resourceLabel ?alias ?url ?type ?typeLabel # ?resLabelLength | |||
WHERE { | |||
wd:Q932 wdt:P14/wdt:P14 ?item. | |||
?item wdt:P21 ?resource. | |||
OPTIONAL {?resource wdt:P20 ?link. | |||
BIND("true" as ?url) } | |||
OPTIONAL {?resource wdt:P3 ?type.} | |||
OPTIONAL {?resource skos:altLabel ?alias.} | |||
service wikibase:label { bd:serviceParam wikibase:language "en" } | |||
} ORDER BY ASC(?resourceLabel) | |||
}} | |||
Revision as of 09:32, 2 May 2024
Contains queries about the graph of the "CGBV SS24" course to help debug and structure it.
All Sessions
Returns a graph containing all sessions included in the course, as well as all included topics. {{#widget:SPARQLquery|code=
- defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/> select distinct ?session ?sessionLabel ?rgb ?shape ?date ?item ?itemLabel ?image # ?res ?resLabel where {
wd:Q932 wdt:P14 ?session.
?session wdt:P3 wd:Q427.
?session wdt:P19 ?date.
OPTIONAL {?session wdt:P14 ?item.
OPTIONAL {?item wdt:P11 ?image } }
# styling
BIND("ECEDFF" as ?rgb)
BIND("box" as ?shape)
service wikibase:label { bd:serviceParam wikibase:language "en".}
} |caption=All existing CGBV SS24 sessions with included topics }}
All Categories
Returns a graph with all included in the course. See the query here
Items
Resources
Returns a table with all resources that are linked to from inside the course. {{#widget:SPARQLquery|code=
- defaultView:Table
PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/> SELECT DISTINCT ?item ?itemLabel ?resource ?resourceLabel ?alias ?url ?type ?typeLabel # ?resLabelLength WHERE {
wd:Q932 wdt:P14/wdt:P14 ?item.
?item wdt:P21 ?resource.
OPTIONAL {?resource wdt:P20 ?link.
BIND("true" as ?url) }
OPTIONAL {?resource wdt:P3 ?type.}
OPTIONAL {?resource skos:altLabel ?alias.}
service wikibase:label { bd:serviceParam wikibase:language "en" }
} ORDER BY ASC(?resourceLabel) }}