Kommuner

From OpenDataSweden
Revision as of 08:11, 11 June 2023 by Salgo60 (talk | contribs)
Jump to navigation Jump to search

På kommunernas anslagstavlor anges vad som skall diskuteras etc...

Se vidare

diskuterat på community.dataportal.se vad saknas, varför blir det så dumt, ingen pratar designmönster

SPARQL federation

Exempel SPARQL

#defaultView:Map{"hide":["?coord"]}

PREFIX wb: <https://sweopendata.wikibase.cloud/entity/>
PREFIX wbt: <https://sweopendata.wikibase.cloud/prop/direct/>

SELECT ?rLabel ?video ?coord ?img ?wdQ ?svWikipedia WHERE {
  VALUES  ?AnslagsTavla {wb:Q240}
   ?r wbt:P2 ?AnslagsTavla .
   ?r wbt:P11 ?video.
  ?r wbt:P1 ?wdQ
  BIND(URI(concat("http://www.wikidata.org/entity/",?wdQ)) AS ?wikidata_iri)
  
 SERVICE <https://query.wikidata.org/sparql> {
    ?wikidata_iri wdt:P625 ?coord.
   OPTIONAL { ?wikidata_iri wdt:P41 ?flag }
   OPTIONAL { ?wikidata_iri wdt:P94 ?coat }
   OPTIONAL { ?wikidata_iri wdt:P154 ?logo }
   OPTIONAL { ?wikidata_iri wdt:P18 ?image }  
   BIND( COALESCE(?flag, ?coat, ?logo, ?image) as ?img )
   OPTIONAL {
      ?svWikipedia schema:about ?wikidata_iri .
      ?svWikipedia schema:inLanguage "sv" .
      ?svWikipedia schema:isPartOf <https://sv.wikipedia.org/> .
    }
    }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}

Try it!

Kommunfullmäktige

Försök att hitta vilka kommuner som sänder kommunfullmäktige