User:Naveenpf/sandbox/States

CMs in India
 { "type": "ExternalData", "service": "geoshape", "query": " SELECT ?id ?head (SAMPLE(?img) as ?img)   (min(?partyId) as ?party)   (if(?party = '0', '#800000', if(?party = '1', '#000080', '#008000')) as ?fill)  (concat(, ?headLabel, ) as ?title)  (concat(?stateLabel, '\\n', '') as ?description) WHERE {    ?id wdt:P31 wd:Q13390680 .  ?id wdt:P6 ?head.

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 "}

States in India
 { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# States in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q13390680. # is a States\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}