query-1bfe5dddc23ac2ca9fc7e6dda09adff1

rq turtle/ttl

Queries for languages of IndiaOne way to represent linguistic diversity in IndiaI am interested in exploring ways in which the linguistic diversity in India (primarily in space but also in time and other dimensions, especially linguistic ones) can be represented through SPARQL queries, so that we could generate visualizations similar to the one embedded here on the fly. Given that the Wikidata Query Service currently does not allow scaled bubbles and maps in the same visualization, I would be fine with either but it seems that good parts of the relevant information are either not available or not consistently modeled. So I am taking a step back and just asking whether anyone has started to compile queries related to multiple languages of India (as opposed to queries involving only one language or simple patterns like topics missing in X-wiki with an entry in Y-wiki). To get things going, here is a query that fishes for languages that (i) have a Wikipedia, (ii) are an official language of an Indian state.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?lang ?langLabel 
(GROUP_CONCAT(DISTINCT ?territoryLabel; separator=" // ") AS ?territories) 
WHERE {
   { SELECT ?territory {
  ?territory wdt:P31 wd:Q13390680 . 
  }
  }   { SELECT ?lang {
  ?wikipedia wdt:P31 wd:Q10876391 ;
             wdt:P407 ?lang .
  }
  }  ?territory wdt:P37 ?lang ;
             wdt:P17 wd:Q668 ;
             rdfs:label ?territoryLabel .  
  FILTER (lang(?territoryLabel) = 'en')
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?lang ?langLabel ?territories

Query found at