query-2c4cc94a4e81c7a8fcd9737d1ca13c2b
Map of languagesElection map of FinlandHi I'm working on a proposal for a project to try and improve coverage of languages on Wikidata and Wikipedia and want to create a prototype to visualise languages on a map as a way to explore them. Is there some way to create a map which shows which languages are present in which countries? I know there are some issues with lack of shape files for countries and country regions. But I've also seen maps like this? I'm very happy for it to work for a very small region, all I want to show is that its is possible and you can click a button to get to the Wikipedia article for that language. This could either be a map to show all the languages in a region or which countries a language is spoken in or both. Thanks very much 10:11, 15 May 2018 (UTC)) talk (John Cummings--Here's a query that can start to answer this question: a map showing every sovereign state and its official languages. Issues that still need to be fixed are: using shape polygons to cover the countries instead of using a point coordinate per country, and linking to the wiki pages of the languages instead of just showing them in a concatenated field. I'm pretty sure those issues can be fixed with Kartographer, but I haven't worked with Kartographer in the past so I can't be of help there.
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:Map
SELECT
?country
?countryLabel
?coordinates
(group_concat(?languagesLabel;separator=" , ") as ?official_languages)
WHERE {
?country wdt:P31 wd:Q3624078.
?country wdt:P37 ?languages .
?country wdt:P625 ?coordinates .
OPTIONAL {
?languages rdfs:label ?languagesLabel.
FILTER(LANG(?languagesLabel) = "en").
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en'. }
} GROUP BY ?country ?countryLabel ?coordinates