Quick

edit

TUHH Metdadata notes

edit

Interesting properties/qualifiers

edit
edit

Google Maps CIDS

edit

NICHT EINGETRAGEN

EINGETRAGEN (Andere)

Eingetragen (Special)

EINGETRAGEN (Institute)

Queries

edit

TUHH

edit

Campus (broken)

#defaultView:Map
SELECT ?Bereich ?BereichLabel ?Institut ?InstitutLabel ?Adresse ?Web ?Lage ?GoogleMaps WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de". }
  # FILTERS
  ?Bereich wdt:P361 wd:Q1060.
  # Bibliothek, Fablab, AStA etc.
  OPTIONAL { ?Bereich wdt:P856 ?Web. }
  OPTIONAL { ?Bereich wdt:P625 ?Lage. }
  OPTIONAL { ?Bereich wdt:P969 ?Adresse. }
  #Institute
  OPTIONAL {
    ?Bereich wdt:P31 wd:Q180958.
    ?Bereich wdt:P527 ?Institut.
    OPTIONAL { ?Institut wdt:P856 ?Web. }
    OPTIONAL { ?Institut wdt:P625 ?Lage. }
    OPTIONAL { ?Institut wdt:P969 ?Adresse. }
    OPTIONAL { ?Institut wdt:P3749 ?Google_Maps_CID. BIND(CONCAT("https://maps.google.com/?cid=", ?Google_Maps_CID) AS ?GoogleMaps).}
  }
  OPTIONAL { ?Bereich wdt:P3749 ?Google_Maps_CID. BIND(CONCAT("https://maps.google.com/?cid=", ?Google_Maps_CID) AS ?GoogleMaps).}
}
LIMIT 100

Campus - Lesson learned: queries might break when data is added; currently ok with web view...

#defaultView:Map
SELECT ?Bereich ?BereichLabel ?WebEinrichtung ?Institut ?InstitutLabel ?Adresse ?WebInstitut ?Lage ?GoogleMaps WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de". }
  # FILTERS
  ?Bereich wdt:P361 wd:Q1060.
  # Bibliothek, Fablab, AStA etc.
  OPTIONAL { ?Bereich wdt:P856 ?WebEinrichtung. }
  OPTIONAL { ?Bereich wdt:P625 ?Lage. }
  OPTIONAL { ?Bereich wdt:P969 ?Adresse. }
  #Institute
  OPTIONAL {
    ?Bereich wdt:P31 wd:Q180958.
    ?Bereich wdt:P527 ?Institut.
    OPTIONAL { ?Institut wdt:P856 ?WebInstitut. }
    OPTIONAL { ?Institut wdt:P625 ?Lage. }
    OPTIONAL { ?Institut wdt:P969 ?Adresse. }
    OPTIONAL { ?Institut wdt:P3749 ?Google_Maps_CID. BIND(CONCAT("https://maps.google.com/?cid=", ?Google_Maps_CID) AS ?GoogleMaps).}
  }
  OPTIONAL { ?Bereich wdt:P3749 ?Google_Maps_CID. BIND(CONCAT("https://maps.google.com/?cid=", ?Google_Maps_CID) AS ?GoogleMaps).}
}
LIMIT 100

Institutes with address details for further processing

SELECT DISTINCT ?DekanatLabel ?Institut ?Institut_de ?Institut_en ?Kurz ?StrasseNo ?PLZ ?StadtLabel ?Web ?Mail ?Leitung ?LeitungLabel ?Lage WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de". }
  # FILTERS
  ?Dekanat wdt:P361 wd:Q1060.
  ?Dekanat wdt:P31 wd:Q180958.
  # SHOW
  ?Dekanat wdt:P527 ?Institut.
  # Get english and german name (label) of institute
  ?Institut rdfs:label ?Institut_de . FILTER(lang(?Institut_de)='de')
  ?Institut rdfs:label ?Institut_en . FILTER(lang(?Institut_en)='en')    
  # BAD: Get "ID" - https://www.wikidata.org/wiki/Wikidata:Property_proposal/organizational_unit_id
  # BAD: BIND(SUBSTR(?Institut_de, 10,4) AS ?Leitzeichen).
  # BAD: BIND(REPLACE(?Leitzeichen, ":", "") AS ?Leitzeichen).
  # Fetch Properties
  OPTIONAL { ?Institut wdt:P1813 ?Kurz. FILTER(lang(?Kurz)='de') }
  OPTIONAL { ?Institut wdt:P856 ?Web. }
  OPTIONAL { ?Institut wdt:P968 ?Mail. }
  OPTIONAL { ?Institut wdt:P488 ?Leitung. }
  OPTIONAL { ?Institut wdt:P625 ?Lage. }
  # Fetch Properties with Qualifiers
  # This works if no qualifiers are required:  OPTIONAL { ?Institut wdt:P969 ?Strasse. }
  OPTIONAL {
  ?Institut p:P969 ?statement_street.
     ?statement_street pq:P669 ?Strasse.
       ?Strasse rdfs:label ?StrasseMyLabel.
     ?statement_street pq:P670 ?No.
     ?statement_street pq:P281 ?PLZ.
     ?statement_street pq:P131 ?Stadt.
     # Concat street and street number
    BIND(CONCAT(?StrasseMyLabel, " ", ?No) AS ?StrasseNo).
  }
}
order by ?Institut
LIMIT 100

German universities

edit

Based on https://www.hochschulkompass.de/hochschulen.html added

  • Q875538 (public university); "öffentlich-rechtlich"
  • Q1743327 (church college); "kirchlich, staatlich anerkannt"
  • Q23002042 (private educational institution) "privat, staatlich anerkannt"

Check later

SELECT ?PublicFundedUniversity ?PublicFundedUniversityLabel ?CityLabel ?official_website 
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
  ?PublicFundedUniversity wdt:P31 wd:Q875538.
  ?PublicFundedUniversity wdt:P17 wd:Q183.
  OPTIONAL { ?PublicFundedUniversity wdt:P131 ?City. }
  OPTIONAL { ?PublicFundedUniversity wdt:P856 ?official_website. }
}
ORDER BY ASC(?CityLabel) ASC(?PublicFundedUniversityLabel)
LIMIT 300
SELECT ?churchCollege ?churchCollegeLabel ?CityLabel ?official_website WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
  ?churchCollege wdt:P31 wd:Q1743327.
  ?churchCollege wdt:P17 wd:Q183.
  OPTIONAL { ?churchCollege wdt:P131 ?City. }
  OPTIONAL { ?churchCollege wdt:P856 ?official_website. }
}
ORDER BY ?CityLabel ?churchCollegeLabel
LIMIT 300
SELECT ?privateUniversity ?privateUniversityLabel ?CityLabel ?official_website WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
  ?privateUniversity wdt:P31 wd:Q23002042.
  ?privateUniversity wdt:P17 wd:Q183.
  OPTIONAL { ?privateUniversity wdt:P131 ?City. }
  OPTIONAL { ?privateUniversity wdt:P856 ?official_website. }
}
ORDER BY ?CityLabel ?privateUniversityLabel
LIMIT 300