Userpage: Difference between revisions
(fix query (optional) + add legend) |
(update queries) |
||
Line 6: | Line 6: | ||
{{#widget:SPARQLquery|code= | {{#widget:SPARQLquery|code= | ||
#defaultView:Graph | #defaultView:Graph | ||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT ?student ?studentLabel ?item ?itemLabel ?edgeLabel ?rgb1 ?shape1 WHERE { | |||
BIND (wd:{{{2|Q157}}} as ?student) | |||
?student ?prop ?item. | |||
# ?edge ?dummy ?prop ; rdf:type wikibase:Property. | |||
MINUS {?student wdt:P3 ?item}. # remove self-reference | |||
# 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 ?rgb1). | |||
bind("ellipse" as ?shape1). | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} LIMIT 100 | |||
|caption=An Overview of (all) linked items for {{{1|Max Mustermann}}} | |||
}} | |||
{| class="wikitable" | |||
! '''Interested Items''' !! '''Completed Items''' | |||
|- | |||
<!-- Linke Spalte --> | |||
| style="width: 50%" | {{#widget:SPARQLquery|code= | |||
#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 | SELECT DISTINCT | ||
?interest ?interestLabel | |||
?interest ?interestLabel | |||
WHERE { | WHERE { | ||
BIND (wd:{{{2|Q157}}} as ?student). | BIND (wd:{{{2|Q157}}} as ?student). | ||
?student wdt:P23 ?interest. | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} | |||
|height=30vh | |||
}} | |||
<!-- Rechte Spalte --> | |||
| style="width: 50%" | {{#widget:SPARQLquery|code= | |||
#defaultView:Table | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT | |||
?complete ?completeLabel | |||
WHERE { | |||
BIND (wd:{{{2|Q157}}} as ?student). | |||
?student wdt:P12 ?complete. | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | ||
} | | } | ||
|height=30vh | |||
}} | }} | ||
|} | |||
<noinclude> | <noinclude> | ||
Autmatically included in a somebodies Userpage via a sign-in script | |||
* param 1 == Username | * param 1 == Username | ||
* param 2 == QID | * param 2 == QID | ||
</noinclude> | </noinclude> |
Revision as of 12:56, 27 November 2024
This is the user page for {{{1}}}.
The user's node (Item) in the graph is [[Item:{{{2}}}]]
Interested Items | Completed Items |
---|---|
Autmatically included in a somebodies Userpage via a sign-in script
- param 1 == Username
- param 2 == QID