Difference between revisions of "Project:Adtech"

From Wikibase Personal data
Jump to navigation Jump to search
Line 14: Line 14:
 
     bd:serviceParam wikibase:language "en" .  
 
     bd:serviceParam wikibase:language "en" .  
 
   }
 
   }
 
 
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
}
 
}
Line 26: Line 25:
 
     ?item rdfs:label ?label
 
     ?item rdfs:label ?label
 
   }
 
   }
 
 
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
}
 
}
Line 37: Line 35:
 
     ?item rdfs:label ?label
 
     ?item rdfs:label ?label
 
   }
 
   }
 
 
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
}
 
}
Line 48: Line 45:
 
     ?item rdfs:label ?label
 
     ?item rdfs:label ?label
 
   }
 
   }
 
 
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
OPTIONAL { ?item pdiot:P47 ?_image. }
 
}
 
}

Revision as of 10:56, 21 May 2019

This is a placeholder for the adtech project

Relevant items

  1. defaultView:Graph

SELECT ?item1 ?item1Label ?rgb ?item2 ?item2Label WITH {

 SELECT ?predicateFilterValue ?predicateFilterValueRGB WHERE {
   VALUES (?predicateFilterValue ?predicateFilterValueRGB) {
      (pdio:Q401 "EEEEEE")(pdio:Q646 "222288")
   }  
 }

} AS %predicateFilterValues WITH {

 SELECT ?predicate ?subjectValue ?objectValue ?predicateRGB  WHERE {
   VALUES (?predicate ?subjectValue ?objectValue ?predicateRGB) {
    (pdiot:P111 pdio:Q401 pdio:Q646 "EEEEEE")(pdiot:P111 pdio:Q646 pdio:Q401 "222288")
   }
 }

} AS %predicates WITH {SELECT ?node ?nodeRGB WHERE {

   ?node pdiot:P3 ?predicateFilterValue.
   INCLUDE %predicateFilterValues.
   BIND(?predicateFilterValueRGB AS ?nodeRGB)
 }

} AS %nodes WITH {SELECT ?subject ?object ?edgeRGB WHERE {

   INCLUDE %predicates.
   ?subject pdiot:P3 ?subjectValue.
   ?object pdiot:P3 ?objectValue.
   ?subject ?predicate ?object.
   # This is filtering for each edge twice, potentially a huge waste: |E|*|V| instead of |V|
   
   
   BIND(?predicateRGB as ?edgeRGB)
 }

} AS %edges WHERE { { # The caption's nodes:

    INCLUDE %predicateFilterValues.
    BIND(?predicateFilterValue AS ?item1).
    BIND(?predicateValueRGB AS ?rgb).
 } 
 UNION
 { # The caption's edges: 
    INCLUDE %predicates.
    BIND(?subjectValue AS ?item1).
    BIND(?objectValue AS ?item2).
    BIND(?predicateRGB AS ?rgb).
 }
 UNION
 {  
    INCLUDE %nodes.
    BIND(?node AS ?item1).
    BIND(?nodeRGB AS ?rgb).
 }
 UNION
 {  
    INCLUDE %edges.
    BIND(?subject AS ?item1).
    BIND(?object AS ?item2).
    BIND(?edgeRGB AS ?rgb).
 }
 SERVICE wikibase:label {
   bd:serviceParam wikibase:language "en" . 
 }

} LIMIT 10000 actors]

  • [
  1. defaultView:Graph

SELECT ?item1 ?item1Label ?rgb ?item2 ?item2Label WITH {

 SELECT ?predicateFilterValue ?predicateFilterValueRGB WHERE {
   VALUES (?predicateFilterValue ?predicateFilterValueRGB) {
      (pdio:Q401 "EEEEEE")(pdio:Q646 "222288")
   }  
 }

} AS %predicateFilterValues WITH {

 SELECT ?predicate ?subjectValue ?objectValue ?predicateRGB  WHERE {
   VALUES (?predicate ?subjectValue ?objectValue ?predicateRGB) {
    (pdiot:P111 pdio:Q401 pdio:Q646 "EEEEEE")(pdiot:P111 pdio:Q646 pdio:Q401 "222288")
   }
 }

} AS %predicates WITH {SELECT ?node ?nodeRGB WHERE {

   ?node pdiot:P3 ?predicateFilterValue.
   INCLUDE %predicateFilterValues.
   BIND(?predicateFilterValueRGB AS ?nodeRGB)
 }

} AS %nodes WITH {SELECT ?subject ?object ?edgeRGB WHERE {

   INCLUDE %predicates.
   ?subject pdiot:P3 ?subjectValue.
   ?object pdiot:P3 ?objectValue.
   ?subject ?predicate ?object.
   # This is filtering for each edge twice, potentially a huge waste: |E|*|V| instead of |V|
   
   
   BIND(?predicateRGB as ?edgeRGB)
 }

} AS %edges WHERE { { # The caption's nodes:

    INCLUDE %predicateFilterValues.
    BIND(?predicateFilterValue AS ?item1).
    BIND(?predicateValueRGB AS ?rgb).
 } 
 UNION
 { # The caption's edges: 
    INCLUDE %predicates.
    BIND(?subjectValue AS ?item1).
    BIND(?objectValue AS ?item2).
    BIND(?predicateRGB AS ?rgb).
 }
 UNION
 {  
    INCLUDE %nodes.
    BIND(?node AS ?item1).
    BIND(?nodeRGB AS ?rgb).
 }
 UNION
 {  
    INCLUDE %edges.
    BIND(?subject AS ?item1).
    BIND(?object AS ?item2).
    BIND(?edgeRGB AS ?rgb).
 }
 SERVICE wikibase:label {
   bd:serviceParam wikibase:language "en" . 
 }

} LIMIT 10000 placeholder graph]