Jump to content

Media Informatics Msc: Difference between revisions

IvanDR200 (talk | contribs)
No edit summary
IvanDR200 (talk | contribs)
Line 67: Line 67:
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
# Select all relevant variables for the graph visualization:
# - position & positionLabel: the module position (e.g. compulsory, elective)
# - module & moduleLabel: the module itself
# - rgb: color coding (yellow = has dependencies, green = no dependencies)
# - module2 & module2Label: a dependency of a module (if any)
# - term & termLabel: the recommended semester for the module
SELECT DISTINCT
SELECT DISTINCT
?position ?positionLabel
?position ?positionLabel
?module ?moduleLabel ?rgb ?module2 ?module2Label  
?module ?moduleLabel ?rgb ?module2 ?module2Label  
?course ?courseLabel
?term ?termLabel
# ?tag ?tagLabel
WHERE {
?term ?termLabel # show relation to terms
 
WHERE { # Module -> Moduleposition -> Course
 
    
  # Handles modules that have MORE THAN ONE position (e.g. listed under both
   # compulsory and elective). For these, we show the position nodes explicitly
  # in the graph, since the position itself carries meaning.
   {
   {
  # Structure: module -> positions -> course
   { SELECT * WHERE {
   { SELECT * WHERE {
     wd:Q2886 wdt:P14 ?module.
     wd:Q2886 wdt:P14 ?module.
     ?module wdt:P3 wd:Q791.
     ?module wdt:P3 wd:Q791.
     ?module wdt:P14 ?position.
     ?module wdt:P14 ?position.
     ?position wdt:P14 ?course.
     ?position wdt:P3 wd:Q792.
    ?course wdt:P3 wd:Q170.
     OPTIONAL {?position wdt:P34 ?term.}
     OPTIONAL {?position wdt:P34 ?term.} # term
   
    # Use "Kürzel" as labels for ?position
    ?position skos:altLabel ?pAlias.
    FILTER regex(?pAlias, "BA", "i").
    BIND(IF(BOUND(?pAlias), ?pAlias, ?positionLabel) as ?positionLabel).
      
      
     # Only show a module position, if there are >1 included in a module.
     # Count how many positions each module has
     { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
     { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
       ?module wdt:P14 ?position.
       ?module wdt:P14 ?position.
     } GROUP BY ?module ?moduleLabel
     } GROUP BY ?module ?moduleLabel
     }
     }
    # Re-join to get the actual position triples (needed after the subquery)
     ?module wdt:P14 ?position.
     ?module wdt:P14 ?position.
    # Only keep modules that appear in more than one position
     FILTER (?pCount > 1).
     FILTER (?pCount > 1).
   } }
   } }
   } UNION {
   }
   # Structure: module -> course
 
   { SELECT ?module ?moduleLabel ?course ?courseLabel ?module2 ?module2Label ?term ?termLabel
  UNION
   WHERE { # module -> course
 
 
  # Handles modules that have EXACTLY ONE position. For these, the position is
  # less visually interesting, so we skip it and instead show dependencies and
   # the recommended semester directly on the module node.
  {
   { SELECT ?module ?moduleLabel ?module2 ?module2Label ?term ?termLabel
   WHERE {
     wd:Q2886 wdt:P14 ?module.
     wd:Q2886 wdt:P14 ?module.
     ?module wdt:P3 wd:Q791.
     ?module wdt:P3 wd:Q791.
     ?module wdt:P14 ?position.
     ?module wdt:P14 ?position.
     ?position wdt:P14 ?course.
     ?position wdt:P3 wd:Q792.
    ?course wdt:P3 wd:Q170.
     ?module wdt:P34 ?term.
     ?module wdt:P34 ?term. # term
      
      
     # Filter out all module positions for modules with only one position
     # Count how many positions each module has
     { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
     { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
       ?module wdt:P14 ?position.
       ?module wdt:P14 ?position.
     } GROUP BY ?module ?moduleLabel
     } GROUP BY ?module ?moduleLabel
     }
     }
    # Re-join positions after subquery
     ?module wdt:P14 ?position.
     ?module wdt:P14 ?position.
    # Only keep modules that appear in exactly one position
     FILTER (?pCount = 1).  
     FILTER (?pCount = 1).  
      
      
     # Show the dependencies according to their importance (=qualifier), currently only "Mandatory" (Q324)
     # Optionally fetch dependencies: module -> P1 (depends on) -> module2
    # The statement/ps pattern allows access to qualifiers if needed later
     OPTIONAL {
     OPTIONAL {
         ?module p:P1 ?statement.
         ?module p:P1 ?statement.
         ?statement ps:P1 ?module2.  
         ?statement ps:P1 ?module2.  
        ?statement pq:P13 wd:Q324. # exclude this line to show dependencies of diff importance
       }  
       }  
   } }
   } }
   }
   }
    
    
   # OPTIONAL {?module wdt:P35 ?tag.} # hängt an module
   # ─── COLOR CODING ───────────────────────────────────────────────────────────
  # Assign a background color to each module node in the graph:
  # - "ffeec2" (yellow) if the module has a dependency (module2 is bound)
  # - "e3ffd9" (green)  if the module has no dependency
   BIND (IF(BOUND(?module2), "ffeec2","e3ffd9") as ?rgb)
   BIND (IF(BOUND(?module2), "ffeec2","e3ffd9") as ?rgb)
    
    
   # Use alias for courses -> e.g. OOP
   # ─── LABELS ─────────────────────────────────────────────────────────────────
  OPTIONAL {
    ?course skos:altLabel ?cAlias.
   service wikibase:label { bd:serviceParam wikibase:language "en".}
    BIND(IF(BOUND(?cAlias), ?cAlias, ?courseLabel) as ?courseLabel).
  } # REMOVE to show FULL COURSE LABELS
 
  # Only show exemplary courses -> no ~ WS/SS23
  FILTER(!regex(?courseLabel, "[0-9]{2}", "i"))
 
 
   service wikibase:label { bd:serviceParam wikibase:language "de".}
} LIMIT 50
}}  


{{QA|question=Alternativ|answer=
Zeigt Module und deren Kurse in Abhängigkeit an.
{{SPARQL2|query=
#defaultView:Graph
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
SELECT DISTINCT
?module ?moduleLabel ?rgb
# ?mPos ?mPosLabel
?depend ?dependLabel
?course ?courseLabel
WHERE {
  wd:Q2886 wdt:P14 ?module.
  ?module wdt:P3 wd:Q791.
  ?module wdt:P14+ ?course. # Module -> (Modulepos) -> Course
  ?course wdt:P3 wd:Q170.
 
  # Show the dependencies according to their importance (=qualifier), currently only "Mandatory" (Q324)
  OPTIONAL {
    ?module p:P1 ?statement.
    ?statement ps:P1 ?depend.
    ?statement pq:P13 wd:Q324. # exclude this line to show dependencies of diff importance
  }
 
  BIND (IF(BOUND(?depend), "ffeec2","e3ffd9") as ?rgb)
  service wikibase:label { bd:serviceParam wikibase:language "de".}
} LIMIT 50
} LIMIT 50
}}
}}

Revision as of 14:39, 5 May 2026

Dies ist Übersicht für den Studiengang Medieninformatik (Master of Science) an der Universität Regensburg.

{{#switch: info | warn = ⚠️ | info = ℹ️ | #default = ✒️ }} Für direkte Informationen nutzen Sie die offizielle Homepage



Modulplan

Zeigt die Abhängigkeiten zwischen Modulen, sowie deren relevanten Modulpositionen {{#if: M. Sc. Media Informatics (Q2886), Module (Q791), Mandatory (Q324) | Items used: M. Sc. Media Informatics (Q2886), Module (Q791), Mandatory (Q324) | }}

{{#if: includes (P14), instance of (P3), depends on (P1), importance (P13) | Properties used: includes (P14), instance of (P3), depends on (P1), importance (P13) | }}

{{#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/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>
select distinct ?module ?moduleLabel ?rgb ?module2 ?module2Label
?position ?positionLabel 
# ?pCount
?course ?courseLabel
where {
  wd:Q2886 wdt:P14 ?module.
  ?module wdt:P3 wd:Q791.
  
  {
    
    # Only show a module position, if there are >1 included in a module.
    { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
       ?module wdt:P14 ?position.
    } GROUP BY ?module ?moduleLabel
    }
    ?module wdt:P14 ?position.
    FILTER (?pCount > 1). 
  
  } UNION {
    
    # Select all other module normally
    { SELECT ?module ?moduleLabel ?module2 ?module2Label ?course ?courseLabel 
    WHERE {
      wd:Q2886 wdt:P14 ?module.
      ?module wdt:P3 wd:Q791.
      ?module wdt:P14 ?position.
      
      # Show the dependencies according to their importance (=qualifier), currently only "Mandatory" (Q324)
      OPTIONAL {
        ?module p:P1 ?statement.
        ?statement ps:P1 ?module2. 
        ?statement pq:P13 wd:Q324. # exclude this line to show dependencies of diff importance
      } 
      #OPTIONAL {?position wdt:P14 ?course}
    }
    }
    
  }
 
  BIND (IF(BOUND(?module2), "ffeec2","e3ffd9") as ?rgb)
  
  service wikibase:label { bd:serviceParam wikibase:language "de".}
} LIMIT 50

Try it!


Detailansicht

Zeigt die Module, Modulpositionen und Kurse abhängig von Semester {{#if: M. Sc. Media Informatics (Q2886), Module (Q791), Module position (Q792) | Items used: M. Sc. Media Informatics (Q2886), Module (Q791), Module position (Q792) | }}

{{#if: includes (P14), instance of (P3), in term (P34), depends on (P1) | Properties used: includes (P14), instance of (P3), in term (P34), 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/>
PREFIX p: <https://graphit.ur.de/prop/>
PREFIX ps: <https://graphit.ur.de/prop/statement/>
PREFIX pq: <https://graphit.ur.de/prop/qualifier/>

# Select all relevant variables for the graph visualization:
# - position & positionLabel: the module position (e.g. compulsory, elective)
# - module & moduleLabel: the module itself
# - rgb: color coding (yellow = has dependencies, green = no dependencies)
# - module2 & module2Label: a dependency of a module (if any)
# - term & termLabel: the recommended semester for the module
SELECT DISTINCT
?position ?positionLabel
?module ?moduleLabel ?rgb ?module2 ?module2Label 
?term ?termLabel
WHERE {


  # Handles modules that have MORE THAN ONE position (e.g. listed under both
  # compulsory and elective). For these, we show the position nodes explicitly
  # in the graph, since the position itself carries meaning.
  {
  { SELECT * WHERE {
    wd:Q2886 wdt:P14 ?module.
    ?module wdt:P3 wd:Q791.
    ?module wdt:P14 ?position.
    ?position wdt:P3 wd:Q792.
    OPTIONAL {?position wdt:P34 ?term.}
    
    # Count how many positions each module has
    { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
       ?module wdt:P14 ?position.
    } GROUP BY ?module ?moduleLabel
    }
    # Re-join to get the actual position triples (needed after the subquery)
    ?module wdt:P14 ?position.
    # Only keep modules that appear in more than one position
    FILTER (?pCount > 1).
  } }
  }

  UNION


  # Handles modules that have EXACTLY ONE position. For these, the position is
  # less visually interesting, so we skip it and instead show dependencies and
  # the recommended semester directly on the module node.
  {
  { SELECT ?module ?moduleLabel ?module2 ?module2Label ?term ?termLabel
  WHERE {
    wd:Q2886 wdt:P14 ?module.
    ?module wdt:P3 wd:Q791.
    ?module wdt:P14 ?position.
    ?position wdt:P3 wd:Q792.
    ?module wdt:P34 ?term.
    
    # Count how many positions each module has
    { SELECT ?module ?moduleLabel (COUNT(?position) as ?pCount) WHERE {
       ?module wdt:P14 ?position.
    } GROUP BY ?module ?moduleLabel
    }
    # Re-join positions after subquery
    ?module wdt:P14 ?position.
    # Only keep modules that appear in exactly one position
    FILTER (?pCount = 1). 
    
    # Optionally fetch dependencies: module -> P1 (depends on) -> module2
    # The statement/ps pattern allows access to qualifiers if needed later
    OPTIONAL {
        ?module p:P1 ?statement.
        ?statement ps:P1 ?module2. 
      } 
  } }
  }
  
  # ─── COLOR CODING ───────────────────────────────────────────────────────────
  # Assign a background color to each module node in the graph:
  # - "ffeec2" (yellow) if the module has a dependency (module2 is bound)
  # - "e3ffd9" (green)  if the module has no dependency
  BIND (IF(BOUND(?module2), "ffeec2","e3ffd9") as ?rgb)
  
  # ─── LABELS ─────────────────────────────────────────────────────────────────
 
  service wikibase:label { bd:serviceParam wikibase:language "en".}

} LIMIT 50

Try it!


}}

Empfohlene Fachsemester

{{#widget:SPARQLquery|code=

  1. defaultView:BarChart

PREFIX wdt: <https://graphit.ur.de/prop/direct/> PREFIX wd: <https://graphit.ur.de/entity/> SELECT DISTINCT ?term ?termLabel ?alias ?alias2 ?module ?moduleLabel WHERE {

 wd:Q2886 wdt:P14 ?module.
 ?module wdt:P3 wd:Q791.
 ?module wdt:P34 ?term.
 
 # Modulkürzel als ALIAS
 ?module skos:altLabel ?alias.
 FILTER regex(?alias, "BA", "i") # works
 service wikibase:label { bd:serviceParam wikibase:language "de".}

} LIMIT 50 | caption=Empfohlene Fachsemester für die Module }}

Zusätzliche Queries

Studiengangsmetriken
Gibt zurück Anzahl der Module, Modulpositionen(=Kurse) und Semester.

{{#if: M. Sc. Media Informatics (Q2886), Module (Q791), Course (Q170) | Items used: M. Sc. Media Informatics (Q2886), Module (Q791), Course (Q170) | }}

{{#if: includes (P14), instance of (P3), in term (P34) | Properties used: includes (P14), instance of (P3), in term (P34) | }}

{{#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 wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
SELECT DISTINCT ?modules ?positions ?terms 
WHERE {
  { Select (COUNT (DISTINCT ?position) as ?positions) WHERE {
  wd:Q2886 wdt:P14 ?module.
  ?module wdt:P3 wd:Q791.
  ?module wdt:P14 ?position.
  ?position wdt:P14 ?course.
  ?course wdt:P3 wd:Q170.
  } } 
  { Select (COUNT (DISTINCT ?module) as ?modules) WHERE {
  wd:Q2886 wdt:P14 ?module.
  ?module wdt:P3 wd:Q791.
  } }
  { Select (COUNT (DISTINCT ?term) as ?terms) WHERE {
  wd:Q2886 wdt:P14 ?module.
  ?module wdt:P3 wd:Q791.
  ?module wdt:P34 ?term.
  } }
  service wikibase:label { bd:serviceParam wikibase:language "de".}
}

Try it!