|
|
| (9 intermediate revisions by the same user not shown) |
| Line 119: |
Line 119: |
| 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 ?Datum ?Session ?SessionLabel # ?Inhalte ?InhalteLabel | | select distinct ?Datum ?Lecture ?LectureLabel # ?Inhalte ?InhalteLabel |
| where { | | where { |
| wd:Q2943 wdt:P14 ?Session. | | wd:Q2943 wdt:P14 ?Lecture. |
| ?Session wdt:P3 wd:Q427. | | ?Lecture wdt:P3 wd:Q421. |
| ?Session wdt:P19 ?Datum. | | ?Lecture wdt:P19 ?Datum. |
| # OPTIONAL {?Session wdt:P14 ?Inhalte.} | | # OPTIONAL {?Session wdt:P14 ?Inhalte.} |
|
| | |
| # Get the amount of eng alias found for an item
| |
| {SELECT ?Session (COUNT(?alias) AS ?aliasCount) WHERE {
| |
| ?Session skos:altLabel ?alias. | |
| FILTER (LANG(?alias) = "en").
| |
| } GROUP BY ?Session
| |
| }
| |
|
| |
| # re-get the alias as ?SessionLabel (for the links)
| |
| ?Session skos:altLabel ?SessionLabel.
| |
| FILTER (LANG(?SessionLabel) = "de").
| |
|
| |
| # Filter out all descriptive alias (aka. don't use a "[Course] - 01a"-type label)
| |
| OPTIONAL {
| |
| ?Session skos:altLabel ?alt.
| |
| FILTER (!regex(?alt, "MMT", "i"))
| |
| FILTER (LANG(?alt) = "en") # Ensure the alias is in English
| |
| } # and save them in a different var
| |
|
| |
| # Default to the normal alias, but use the descriptiv one if it exists
| |
| BIND(IF (?aliasCount > 1, ?alt, ?alias) as ?SessionLabel)
| |
|
| |
| service wikibase:label { bd:serviceParam wikibase:language "en".} | | service wikibase:label { bd:serviceParam wikibase:language "en".} |
| } ORDER BY DESC(?SessionLabel) | | } |
| LIMIT 50 | | LIMIT 50 |
| | height=64em | | | height=64em |
| Line 161: |
Line 140: |
| 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 ?Datum ?Session ?SessionLabel # ?Inhalte ?InhalteLabel | | select distinct ?Datum ?Lecture ?LectureLabel # ?Inhalte ?InhalteLabel |
| where { | | where { |
| wd:Q2943 wdt:P14 ?Session. | | wd:Q2943 wdt:P14 ?Lecture. |
| ?Session wdt:P3 wd:Q427. | | ?Lecture wdt:P3 wd:Q421. |
| ?Session wdt:P19 ?Datum. | | ?Lecture wdt:P19 ?Datum. |
| # OPTIONAL {?Session wdt:P14 ?Inhalte.} | | # OPTIONAL {?Session wdt:P14 ?Inhalte.} |
|
| | |
| # Get the amount of eng alias found for an item
| |
| {SELECT ?Session (COUNT(?alias) AS ?aliasCount) WHERE {
| |
| ?Session skos:altLabel ?alias. | |
| FILTER (LANG(?alias) = "en").
| |
| } GROUP BY ?Session
| |
| }
| |
|
| |
| # re-get the alias as ?SessionLabel (for the links)
| |
| ?Session skos:altLabel ?SessionLabel.
| |
| FILTER (LANG(?SessionLabel) = "de").
| |
| FILTER (!contains(str(?SessionLabel), "Ü:")). # nur VL
| |
|
| |
| # Filter out all descriptive alias (aka. don't use a "[Course] - 01a"-type label)
| |
| OPTIONAL {
| |
| ?Session skos:altLabel ?alt.
| |
| FILTER (!regex(?alt, "MMT", "i"))
| |
| FILTER (LANG(?alt) = "en") # Ensure the alias is in English
| |
| } # and save them in a different var
| |
|
| |
| # Default to the normal alias, but use the descriptiv one if it exists
| |
| BIND(IF (?aliasCount > 1, ?alt, ?alias) as ?SessionLabel)
| |
|
| |
| service wikibase:label { bd:serviceParam wikibase:language "en".} | | service wikibase:label { bd:serviceParam wikibase:language "en".} |
| } ORDER BY DESC(?SessionLabel) | | } |
| LIMIT 50 | | LIMIT 50 |
| |height=35em | | |height=35em |
| Line 204: |
Line 161: |
| 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 ?Datum ?Session ?SessionLabel # ?Inhalte ?InhalteLabel | | select distinct ?Datum ?Lab ?LabLabel # ?Inhalte ?InhalteLabel |
| where { | | where { |
| wd:Q2943 wdt:P14 ?Session. | | wd:Q2943 wdt:P14 ?Lab. |
| ?Session wdt:P3 wd:Q427. | | ?Lab wdt:P3 wd:Q2939. |
| ?Session wdt:P19 ?Datum. | | ?Lab wdt:P19 ?Datum. |
| # OPTIONAL {?Session wdt:P14 ?Inhalte.} | | # OPTIONAL {?Session wdt:P14 ?Inhalte.} |
|
| | |
| # Get the amount of eng alias found for an item
| |
| {SELECT ?Session (COUNT(?alias) AS ?aliasCount) WHERE {
| |
| ?Session skos:altLabel ?alias. | |
| FILTER (LANG(?alias) = "en").
| |
| } GROUP BY ?Session
| |
| }
| |
|
| |
| # re-get the alias as ?SessionLabel (for the links)
| |
| ?Session skos:altLabel ?SessionLabel.
| |
| FILTER (LANG(?SessionLabel) = "de").
| |
| FILTER (contains(str(?SessionLabel), "Ü:")). # nur Übungen
| |
|
| |
| # Filter out all descriptive alias (aka. don't use a "[Course] - 01a"-type label)
| |
| OPTIONAL {
| |
| ?Session skos:altLabel ?alt.
| |
| FILTER (!regex(?alt, "MMT", "i"))
| |
| FILTER (LANG(?alt) = "en") # Ensure the alias is in English
| |
| } # and save them in a different var
| |
|
| |
| # Default to the normal alias, but use the descriptiv one if it exists
| |
| BIND(IF (?aliasCount > 1, ?alt, ?alias) as ?SessionLabel)
| |
| | | |
| service wikibase:label { bd:serviceParam wikibase:language "en".} | | service wikibase:label { bd:serviceParam wikibase:language "en".} |
| } ORDER BY DESC(?SessionLabel) | | } |
| LIMIT 50 | | LIMIT 50 |
| | height=35em | | | height=35em |
| Line 241: |
Line 177: |
| </div> | | </div> |
|
| |
|
| {{Note|type=info|text=[https://tinyurl.com/2b734b8r Query], die anzeigt, wie viele Items jede Session enthält}} | | {{Note|type=info|text=[https://query.graphit.ur.de/embed.html#%23defaultView%3ATable%0A%23title%3ANumber%20of%20Items%20in%20Sessions%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fgraphit.ur.de%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fgraphit.ur.de%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20DISTINCT%20%3Fsession%20%3FsessionLabel%20%3Fitems%20%20%0AWHERE%20%7B%0A%20%20wd%3AQ2943%20wdt%3AP14%20%3Fsession.%0A%20%20%3Fsession%20wdt%3AP3%20wd%3AQ427.%0A%20%20%3Fsession%20wdt%3AP19%20%3Fdate%0A%20%20%0A%0A%20OPTIONAL%20%0A%20%7B%20%7B%20SELECT%20%3Fsession%20%3FsessionLabel%20%28COUNT%28DISTINCT%20%3Fitem%29%20as%20%3Fitems%29%20WHERE%20%7B%0A%20%20%20%20%20%20%3Fsession%20wdt%3AP14%20%3Fitem.%0A%20%20%20%20%7D%20GROUP%20BY%20%3Fsession%20%3FsessionLabel%0A%20%20%7D%20%7D%0A%20%20%0A%20%20BIND%28IF%28BOUND%28%3Fitems%29%2C%20%3Fitems%2C%200%29%20as%20%3Fitems%29.%0A%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%20ORDER%20BY%20ASC%28%3Fdate%29%20 Query], die anzeigt, wie viele Items jede Session enthält}} |
| | |
| === Interessen & Kenntnisse ===
| |
| Ein Diagramm, das Items zeigt, die Studierende als "interessant" oder "bekannt" markiert haben.
| |
| <div style="border: solid 5px #d2d6e0; background-color:#eaecf0;">
| |
| {{#widget:SPARQLquery| code=
| |
| #defaultView:SwarmScatterChart
| |
| PREFIX wd: <https://graphit.ur.de/entity/>
| |
| PREFIX wdt: <https://graphit.ur.de/prop/direct/>
| |
| | |
| SELECT DISTINCT ?known ?interests ?itemLabel
| |
| WHERE {
| |
| wd:Q2943 wdt:P14/wdt:P14 ?item.
| |
| OPTIONAL {
| |
| SELECT ?item ?itemLabel (COUNT(DISTINCT ?student) as ?known) WHERE {
| |
| ?student wdt:P25 wd:Q2943.
| |
| ?student wdt:P12 ?item.
| |
| ?student rdfs:label ?studentLabel.
| |
| FILTER (!contains(str(?studentLabel), "Demo")). # rm Demo Students
| |
| } GROUP BY ?item ?itemLabel
| |
| }
| |
| OPTIONAL {
| |
| SELECT ?item ?itemLabel (COUNT(DISTINCT ?student) as ?interests) WHERE {
| |
| ?student wdt:P25 wd:Q2943.
| |
| ?student wdt:P23 ?item.
| |
| ?student rdfs:label ?studentLabel.
| |
| FILTER (!contains(str(?studentLabel), "Demo")). # rm Demo Students
| |
| } GROUP BY ?item ?itemLabel
| |
| }.
| |
| BIND (IF(!BOUND(?interests), 0, ?interest) as ?interests).
| |
| BIND (IF(!BOUND(?known), 0, ?known) as ?known).
| |
| SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
| |
| }
| |
| }}
| |
| </div>
| |
| | |
| === Preview ===
| |
| Eine Liste an Themen, die im nächten Termin behandelt werden.
| |
| | |
| <div style="border: solid 5px #d2d6e0; background-color:#eaecf0;">
| |
| {{#widget:SPARQLquery| code=
| |
| #defaultView:Table
| |
| PREFIX wdt: <https://graphit.ur.de/prop/direct/>
| |
| PREFIX wd: <https://graphit.ur.de/entity/>
| |
| select distinct ?today ?sessionDate ?interested ?completed
| |
| ?item ?itemLabel
| |
| ?resource ?resourceLabel ?url ?type ?typeLabel
| |
| where {
| |
| { # subquery: get the session for next week
| |
| SELECT ?session ?today ?sessionDate
| |
| WHERE {
| |
| # get all sessions, that are "bigger" than today
| |
| # BIND("2024-04-29"^^xsd:dateTime as ?today) # for test
| |
| BIND(now() as ?today) # for real
| |
|
| |
| wd:Q2943 wdt:P14 ?session.
| |
| ?session wdt:P3 wd:Q427.
| |
| ?session wdt:P19 ?sessionDate.
| |
| # FILTER(?sessionDate > ?today).
| |
| FILTER(xsd:date(?sessionDate) >= xsd:date(?today)).
| |
| } ORDER BY ASC(?sessionDate)
| |
| LIMIT 1 # limit to 1 session
| |
| } # end of subquery
| |
|
| |
| # limit to 1 session (from subquery)
| |
| ?session wdt:P14 ?item.
| |
| OPTIONAL {?item wdt:P21 ?resource.
| |
| ?resource wdt:P20 ?url.
| |
| ?resource wdt:P3 ?type}
| |
|
| |
| { # start of union
| |
| { # get all items user is interested in
| |
| SELECT ?item ?itemLabel
| |
| WHERE {
| |
| ?user rdfs:label "{{#username:Max Mustermann}}"@en.
| |
| ?user wdt:P23 ?item.
| |
| } }
| |
| BIND(IF(BOUND(?item), "true", "false") as ?interested)
| |
| } UNION {
| |
| { # get all items user has completed
| |
| SELECT ?item ?itemLabel
| |
| WHERE {
| |
| ?user rdfs:label "{{#username:Max Mustermann}}"@en.
| |
| ?user wdt:P12 ?item.
| |
| } }
| |
| BIND(IF(BOUND(?item), "true", "false") as ?completed)
| |
| } UNION { # union: get all other items
| |
| ?session wdt:P14 ?item.
| |
| ?user rdfs:label "{{#username:Max Mustermann}}"@en.
| |
| # Remove all item user is interested in / has completed -> otherwise duplicates
| |
| MINUS {?user wdt:P23 ?item}
| |
| MINUS {?user wdt:P12 ?item}
| |
| } # end of union
| |
|
| |
| service wikibase:label { bd:serviceParam wikibase:language "en".}
| |
| } ORDER BY DESC(?resource)
| |
| LIMIT 80
| |
| | caption=A Todolist for {{#username:Max Mustermann}}
| |
| | height=30em
| |
| }}
| |
| </div>
| |
| | |
| ==Erste Schritte mit GraphIT==
| |
| # '''GraphIT-Account einrichten'''
| |
| ## Account einrichten via: [https://graphit.ur.de/register Registrierung]
| |
| ### Der Benutzername wird öffentlich angezeigt, also gerne auch ein Pseudonym wählen
| |
| ### Den Kurs "HCI 26SS" für die Teilnahme wählen
| |
| # ''' Benutzer-Item überprüfen'''
| |
| ## Logge dich bei GraphIT ein (Menüpunkt ganz rechts oben)
| |
| ## Dein Benutzer-Item findest du einfach über die Suchleiste (über deinen Benutzernamen)
| |
| ## oder über deine Nutzerseite: [[User:{{#username:Max Mustermann}}]] (bist du nicht eingeloggt, wird auf eine Beispiel-Nutzerseite von "Max Mustermann" verlinkt).
| |
| ## Hier sieht du alle Verknüpfungen die von oder auf dein Item zeigen. Aktuell sollten hier 3 Statements sein (siehe z.B. das Item Q630: [[Item:Q630|Markus Mustermann]])
| |
| ### '[[Property:P3|instance of]]' (P3) + '[[Item:Q167|Student]]' (Q167)
| |
| ### '[[Property:P28|username]]' (P28) + Benutzernamen (siehe Schritt 1)
| |
| ### '[[Property:P25|participates in]]' (P25) + [[Item:Q2943|MMT 25/26WS]] (Q2943)
| |
| ### → fehlt eines dieser Statements, füge es mit dem '+ <span style="color:#008CBA">add statement</span>' Button hinzu
| |
| # '''Vorkenntnisse und Interessen angeben'''
| |
| ## Auf https://graph.graphit.ur.de/app/src/pages/selectionTools/ einmal mit Benutzername und Passwort (aus Schritt 1) anmelden.
| |
| ## Oben rechts die Lehrveranstaltung "MMT 25WS" auswählen.
| |
| ## Im angezeigten Graph die damit verbundenen Themen anschauen.
| |
| ## Alle Themen als "completed" markieren, mit denen man sich schon befasst hat (auswählen und Taste '1' drücken bzw. den Button auf der rechten Seite).
| |
| ## Mindestens fünf Themen als Interessen markieren (auswählen und Taste '2' drücken bzw. den Button auf der rechten Seite).
| |
| ## '''Änderungen speichern über den 'save'-Button unten rechts!'''
| |
| ## Auf der eigenen Item-Seite überprüfen ob die Interessen und Vorkenntnisse korrekt dokumentiert wurden.
| |
| Als ein Beispiel kann [[Item:Q157|Max Mustermann]] angesehen werden. Für eine detailiertere Übersicht kann die Seite [[ExampleStudent]] besucht werden.
| |