query: embed.html## Maps of all public library branches The Netherlands, layered by country part] (e.g. North, Middle, South, by combining several provinces)
  #
  #'Horizontaal' bv
  #Noord-Nederland = Groningen - Friesland - Drenthe
  #Midden-Nederland = Overijssel - Gelderland - Flevoland - Utrecht - Noord-Holland
  #Zuid-Nederland = Zuid-Holland - Noord-Brabant - Zeeland - Limburg
  #
  #'Vertikaal' bv
  #West-Nederland = Zuid-Holland - Zeeland - Noord-Holland
  #Centraal-Nederland = Flevoland - Utrecht - Noord-Brabant - Friesland 
  #Oost-Nederland =Limburg - Groningen - Drenthe - Overijssel - Gelderland
  #
  #WDQs
  #Groningen	wd:Q752
  #Friesland	wd:Q770
  #Drenthe    wd:Q772
  #Overijssel	wd:Q773
  #Gelderland	wd:Q775
  #Flevoland	wd:Q707
  #Utrecht	wd:Q776
  #Noord-Holland	wd:Q701
  #Zuid-Holland	wd:Q694
  #Noord-Brabant	wd:Q1101
  #Zeeland	wd:Q705
  #Limburg	wd:Q1093
  #
  #defaultView:Map{"hide":["?dplLoc","?region"],"layer":"?region"}
  
  SELECT DISTINCT ?dpl ?dplLabel ?dplImage ?dplLoc ?muniLabel ?provLabel ?region
  
  WHERE {
    ?dpl p:P31/ps:P31 wd:Q28564,wd:Q11396180;wdt:P17 wd:Q55. #public library branch in The Netherlands 
    ?dpl wdt:P625 ?dplLoc. #Geo location of the dpl
    OPTIONAL{?dpl wdt:P18 ?dplImage} #Image of the dpl} 
    
    #--- municipalities stuff----
    ?dpl wdt:P131 ?muni. #municipality derived from library item, has one single value
    ?muni p:P31 [ps:P31 ?muniIsA].
    VALUES ?muniIsA {wd:Q2039348}
    #Instead of the the above line, you can also do: FILTER(?muniIsA = wd:Q2039348) 
    #-- Province stuff
    ?muni wdt:P131 ?prov.  #find the province
    
    #'Horizontal'
    VALUES ?north {wd:Q752 wd:Q770 wd:Q772}
    VALUES ?middle {wd:Q773 wd:Q775 wd:Q707 wd:Q776 wd:Q701}
    VALUES ?south {wd:Q694 wd:Q1101 wd:Q705 wd:Q1093}
    #'Vertical'
    #VALUES ?west {wd:Q701 wd:Q694 wd:Q705}
    #VALUES ?central {wd:Q707 wd:Q776 wd:Q1101 wd:Q770}
    #VALUES ?east {wd:Q1093 wd:Q752 wd:Q772 wd:Q775 wd:Q773}
       
    BIND(
      IF(?prov IN (?north), "Noord-Nederland",
      IF(?prov IN (?middle),  "Midden-Nederland",
      IF(?prov IN (?south),  "Zuid-Nederland",
      #IF(?prov IN (?west),  "West-Nederland",
      #IF(?prov IN (?central),  "Centraal-Nederland", 
      #IF(?prov IN (?east),  "Oost-Nederland", 
      "")))
       #)))
         AS ?region).
    
    VALUES ?region {
      "Noord-Nederland" "Midden-Nederland" "Zuid-Nederland" 
      #"West-Nederland" "Centraal-Nederland" "Oost-Nederland"
                 }
      
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}  
  }
  ORDER BY ?region