User:Smalyshev (WMF)/Govmap

 { "type": "ExternalData", "service": "geoshape", "query": "SELECT ?id ?head (SAMPLE(?img) as ?img)   (SAMPLE(?fill) as ?fill)   (concat(, ?headLabel, ) as ?title)  (concat(?stateLabel, '\\n', '') as ?description) WHERE {    ?id wdt:P31 wd:Q35657 .  ?id wdt:P6 ?head .  ?head wdt:P102 ?party .  BIND(if(?party = wd:Q29468, '#800000', if(?party = wd:Q29552, '#000080', '#008000')) as ?fill)   SERVICE wikibase:label {    bd:serviceParam wikibase:language 'en' .    ?head rdfs:label ?headLabel .    ?id rdfs:label ?stateLabel .  }  OPTIONAL {    ?head wdt:P18 ?img .  }  ?link schema:about ?head .  ?link schema:isPartOf  . } GROUP BY ?id ?head ?headLabel ?link ?stateLabel" }