User:Naveenpf/sandbox/Districts

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

Try 2
 { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "SELECT ?item\n(GROUP_CONCAT(DISTINCT ?division;   SEPARATOR=", ") AS ?divisions)\n(GROUP_CONCAT(DISTINCT ?state;   SEPARATOR=", ") AS ?states)\nWHERE\n{\n?item wdt:P31\nwd:Q1149652 .\n{ ?item wdt:P131 ?division.\n?division wdt:P31/wdt:P279* wd:Q1230708. }\nUNION\n{ ?item wdt:P131 ?state.\n?state wdt:P31 wd:Q467745. }\nUNION\n{ ?item wdt:P131 ?state.\n?state wdt:P31 wd:Q13390680. }\nUNION\n{ ?item wdt:P131 ?division.\n?division wdt:P131 ?state.\n?division wdt:P31/wdt:P279* wd:Q1230708.\n?state wdt:P31 wd:Q13390680. }\n}"}

QID to be updated:- http://overpass-turbo.eu/s/mRF

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Districts in MA
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1191 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in Manipur
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1193 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in MG
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1195 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in Mizo
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1502 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in Nagaland
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1599 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in OR
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q22048 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in Punjab
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q22424 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in TN
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1445 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in TG
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q677037 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in Tripura
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1363 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in UP
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1498 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in UK
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1499 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}

Districts in WB
<mapframe width="500" height="500" text="Districts in India" align="center"> { "type": "ExternalData", "service": "geoshape", "properties": { "stroke": "#ff0000", "stroke-width": 1 }, "query": "# Districts in India\nSELECT ?id ?idLabel\n(concat(, ?idLabel, ) as ?title)\nWHERE\n{\n?id wdt:P31 wd:Q1149652. # is a district\n?id wdt:P131 wd:Q1356 . # in India\nSERVICE wikibase:label { bd:serviceParam wikibase:language 'en'}\n}"}