Graph Statistics: Difference between revisions
→Simple Metrics: added StudentCount |
added: Path |
||
| Line 228: | Line 228: | ||
ORDER BY DESC(?item) | ORDER BY DESC(?item) | ||
LIMIT 50 # change as needed | LIMIT 50 # change as needed | ||
}} | |||
= Path = | |||
Returns the amount of items included in a path between two items. | |||
This count does include these two items. | |||
{{SPARQL2|query= | |||
#defaultView:Table | |||
# via: https://stackoverflow.com/a/18991480 | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
select distinct ?subject ?subjectLabel ?item ?itemLabel | |||
(COUNT(DISTINCT ?mid) as ?PathItems) | |||
{ | |||
BIND(wd:Q149 as ?subject). | |||
BIND(wd:Q106 as ?item). | |||
?subject wdt:P1* ?mid. | |||
?mid wdt:P1+ ?item. | |||
service wikibase:label { bd:serviceParam wikibase:language "en" } | |||
} GROUP BY ?subject ?subjectLabel ?item ?itemLabel | |||
LIMIT 5 | |||
}} | }} | ||
Revision as of 12:53, 30 November 2023
A page to help show the structure of the graph using metrics and statistics. For similar pages reference:
Simple Metrics
ItemCount
Gives a count of all items in the Wikibase-instance. {{#if: | Items used: | }}
{{#if: | Properties used: | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT (COUNT(*) as ?items)
WHERE {
?item wikibase:identifiers ?i. # get only items
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Make inline
PropertyCount
Gives a count of all properties in the Wikibase-instance {{#if: | Items used: | }}
{{#if: | Properties used: | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT (COUNT(*) as ?property)
WHERE {
?property a wikibase:Property.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} LIMIT 28
Make inline
ResourceCount
Gives the amount of Resources in the Wikibase-instance {{#if: | Items used: | }}
{{#if: resource (P21) | Properties used: resource (P21) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT (COUNT(*) as ?resources)
WHERE {
?item wdt:P21 ?resources.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Make inline
Course ResourceCount
Gives back the amount of Resources used in a specific course.
{{#switch: {{{type}}} | warn = ⚠️ | info = ℹ️ | #default = ✒️ }} This query works with the "included in" dependencies
{{#if: Wissenschaftliches Arbeiten 23/24WS (Q468) | Items used: Wissenschaftliches Arbeiten 23/24WS (Q468) | }}
{{#if: includes (P14), resource (P21) | Properties used: includes (P14), resource (P21) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT (COUNT(DISTINCT ?resource) as ?resources)
WHERE {
BIND (wd:Q468 as ?course).
?course wdt:P14 / wdt:P14 ?item.
OPTIONAL {?item wdt:P21 ?resource.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Make inline
StudentCount
Gives the amount of Students using GraphIT.
{{#if: Student (Q167) | Items used: Student (Q167) | }}
{{#if: instance of (P3) | Properties used: instance of (P3) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT (COUNT (DISTINCT ?student) as ?students)
WHERE {
?student wdt:P3 wd:Q167
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
SessionCount
Gives back the amount of Sessions that exist for every course and the sum of topics used in the sessions.
{{#if: Course (Q170), Session (Q427) | Items used: Course (Q170), Session (Q427) | }}
{{#if: instance of (P3), includes (P14) | Properties used: instance of (P3), includes (P14) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT ?course ?courseLabel
(COUNT (DISTINCT ?session) as ?sessions)
# ?session ?sessionLabel
(COUNT (DISTINCT ?topic) as ?topics)
WHERE {
?course wdt:P3 wd:Q170. # def course
?course wdt:P14 ?session.
?session wdt:P3 wd:Q427. # def session
?session wdt:P14 ?topic.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?course ?courseLabel
TopicCount
Gives the count of topics from every existing session.
{{#if: Course (Q170), Session (Q427) | Items used: Course (Q170), Session (Q427) | }}
{{#if: instance of (P3), includes (P14) | Properties used: instance of (P3), includes (P14) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT ?session ?sessionLabel (COUNT (DISTINCT ?topic) as ?topics)
WHERE {
?course wdt:P3 wd:Q170. # def course
?course wdt:P14 ?session.
?session wdt:P3 wd:Q427. # def session
?session wdt:P14 ?topic.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?session ?sessionLabel
Degree of an Item
Gives back the indegree and outdegree of a specific item.
- InDegree = all dependencies (P1) going in to the item
- OutDegree = all dependencies (P1) comming out of an item
To get all edges coming out of an item, change wdt:P1 to ?p. This will include things such as resources and dates.
{{#if: Matrix Multiplication (Q93) | Items used: Matrix Multiplication (Q93) | }}
{{#if: depends on (P1) | Properties used: depends on (P1) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
Select ?item ?itemLabel
(count(DISTINCT ?inItem) as ?indegree)
(count(DISTINCT ?outItem) as ?outdegree)
((?indegree + ?outdegree ) AS ?degree)
WHERE {
BIND (wd:Q93 as ?item).
OPTIONAL {
?inItem wdt:P1 ?item. # inDegree
?item wdt:P1 ?outItem. # outDegree
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel
Change harcoded item to parameter
Highest Degrees
{{#widget:SPARQLquery|code=
- defaultView:ScatterChart
PREFIX wd: <https://graphit.ur.de/entity/> PREFIX wdt: <https://graphit.ur.de/prop/direct/> Select (count(DISTINCT ?inItem) as ?indegree) (count(DISTINCT ?outItem) as ?outdegree) ((?indegree + ?outdegree ) AS ?degree) ?item ?itemLabel WHERE {
OPTIONAL {
?inItem wdt:P1 ?item. # inDegree
?item wdt:P1 ?outItem. # outDegree
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?item ?itemLabel ORDER BY DESC(?degree) LIMIT 15 }} Query currently limited to 15 items + items can overlap in the chart, for further information use the table-view'
Sinks
Returns sinks, items with 0 indegrees. These items can be regarded as destinations to a path.
{{#if: Student (Q167), Category (Q169), Session (Q427) | Items used: Student (Q167), Category (Q169), Session (Q427) | }}
{{#if: depends on (P1), instance of (P3), resource (P21) | Properties used: depends on (P1), instance of (P3), resource (P21) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
Select ?item ?itemLabel
(count(DISTINCT ?inItem) as ?indegree)
(count(DISTINCT ?outItem) as ?outdegree)
WHERE {
?item wikibase:identifiers ?i. # get only items
# filter out...
MINUS {?inItem wdt:P1 ?item.} # all items with 1+ indegree
MINUS {?item wdt:P3 wd:Q167.} # all students
MINUS {?item wdt:P3 wd:Q169.} # all categories
MINUS {?item wdt:P3 wd:Q427.} # all sessions
MINUS {?inItem wdt:P21 ?item.} # all resources
# show 0+ outdegrees of the items
OPTIONAL {?item wdt:P1 ?outItem.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
group by ?item ?itemLabel
ORDER BY DESC(?item)
LIMIT 50 # change as needed
Sources
Returns sources, items with 0 outdegrees. These items can be regarded as origins to a path.
{{#if: Student (Q167), Category (Q169), Session (Q427) | Items used: Student (Q167), Category (Q169), Session (Q427) | }}
{{#if: depends on (P1), instance of (P3), resource (P21) | Properties used: depends on (P1), instance of (P3), resource (P21) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
Select ?item ?itemLabel
(count(DISTINCT ?outItem) as ?outdegree)
(count(DISTINCT ?inItem) as ?indegree)
WHERE {
?item wikibase:identifiers ?i. # get only items
# filter out...
MINUS {?item wdt:P1 ?outItem.} # all items with 1+ outdegree
MINUS {?item wdt:P3 wd:Q167.} # all students
MINUS {?item wdt:P3 wd:Q169.} # all categories
MINUS {?item wdt:P3 wd:Q427.} # all sessions
MINUS {?inItem wdt:P21 ?item.} # all resources
# show 0+ outdegrees of the items
OPTIONAL {
?inItem wdt:P1 ?item.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
group by ?item ?itemLabel
ORDER BY DESC(?item)
LIMIT 50 # change as needed
Path
Returns the amount of items included in a path between two items. This count does include these two items.
{{#if: Virtual Cameras (Q149), Points and Vectors (Q106) | Items used: Virtual Cameras (Q149), Points and Vectors (Q106) | }}
{{#if: depends on (P1) | Properties used: depends on (P1) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
# via: https://stackoverflow.com/a/18991480
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?subject ?subjectLabel ?item ?itemLabel
(COUNT(DISTINCT ?mid) as ?PathItems)
{
BIND(wd:Q149 as ?subject).
BIND(wd:Q106 as ?item).
?subject wdt:P1* ?mid.
?mid wdt:P1+ ?item.
service wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?subject ?subjectLabel ?item ?itemLabel
LIMIT 5
Overlap
Returns the items that are used in more than one course, session, etc.
SessionOverlap
Gives the amount of times an item has been used in a session in descending order
{{#if: Course (Q170), Session (Q427) | Items used: Course (Q170), Session (Q427) | }}
{{#if: instance of (P3), includes (P14) | Properties used: instance of (P3), includes (P14) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Table
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
SELECT
?topic ?topicLabel
(COUNT (?topic) as ?used)
WHERE {
?course wdt:P3 wd:Q170. # def course
?session wdt:P3 wd:Q427. # def session
?course wdt:P14 ?session.
?session wdt:P14 ?topic.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?topic ?topicLabel
ORDER BY DESC(?used)
LIMIT 10
Circularity
Returns items who point toward each other to create a circle. {{#if: | Items used: | }}
{{#if: depends on (P1) | Properties used: depends on (P1) | }}
{{#if:|
{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX p: <https://graphit.ur.de/prop/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX p: <https://graphit.ur.de/prop/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX q: <https://graphit.ur.de/prop/qualifier/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
PREFIX v: <https://graphit.ur.de/prop/statement/>|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
PREFIX v: <https://graphit.ur.de/prop/statement/>|}}}}{{ safesubst:p{{ safesubst:#ifeq:|eq|1|2}}|{{ safesubst:p{{ safesubst:#ifeq:|
|1|2}}||}}|{{ safesubst:p{{ safesubst:#if:|1|2}}|
|}}}}
}}#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
select distinct ?item ?itemLabel ?dependency ?dependencyLabel {
?item wdt:P1 ?dependency.
?dependency wdt:P1 ?item.
service wikibase:label { bd:serviceParam wikibase:language "en" }
}
See also DebugQueries#Circular_Dependencies