query-8bfb0ef0742c907c551fc270c105ecdb
Label completeness (in percent) per language:
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#>
SELECT ?langcode ?official_languageLabel (round(100*SUM(?label_exists)/SUM(1)) AS ?percentage_of_labels) WHERE {
values ?item {wd:Q4006 wd:Q7167 wd:Q7181 wd:Q8434 wd:Q8458 wd:Q8461 wd:Q8463 wd:Q41397 wd:Q59816 wd:Q79913 wd:Q128393 wd:Q131288 wd:Q131572 wd:Q133004 wd:Q133346 wd:Q154278 wd:Q166005 wd:Q170404 wd:Q177626 wd:Q181784 wd:Q185598 wd:Q187668 wd:Q188863 wd:Q230533 wd:Q283509 wd:Q367293 wd:Q379693 wd:Q452573 wd:Q705818 wd:Q837556 wd:Q912512 wd:Q1338878 wd:Q1351807 wd:Q1368367 wd:Q1397926 wd:Q1932461 wd:Q2608153 wd:Q12547146 wd:Q15320003 wd:Q16513600 wd:Q18344718}
wd:Q458 wdt:P37 ?official_language . # get all official languages of the EU
?official_language wdt:P424 ?langcode . # and their Wikimedia language codes
OPTIONAL {
?item rdfs:label ?item_label . # and match the item label language...
FILTER(?langcode=lang(?item_label)) # ...with the language
BIND(IF(BOUND(?item_label),1,0) AS ?label_exists) # count the number of existing labels
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } # change "en" to your preferred language
}
GROUP BY ?langcode ?official_languageLabel
ORDER BY DESC(?percentage_of_labels)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item")
v3("?item_label")
v6("?label_exists")
v2("?langcode"):::projected
v5("?official_language")
v7("?percentage_of_labels")
c6(["bd:serviceParam"]):::iri
c1(["wd:Q458"]):::iri
c8(["en"]):::literal
bind0[/VALUES ?item/]
bind0-->v4
bind00(["wd:Q4006"])
bind00 --> bind0
bind01(["wd:Q7167"])
bind01 --> bind0
bind02(["wd:Q7181"])
bind02 --> bind0
bind03(["wd:Q8434"])
bind03 --> bind0
bind04(["wd:Q8458"])
bind04 --> bind0
bind05(["wd:Q8461"])
bind05 --> bind0
bind06(["wd:Q8463"])
bind06 --> bind0
bind07(["wd:Q41397"])
bind07 --> bind0
bind08(["wd:Q59816"])
bind08 --> bind0
bind09(["wd:Q79913"])
bind09 --> bind0
bind010(["wd:Q128393"])
bind010 --> bind0
bind011(["wd:Q131288"])
bind011 --> bind0
bind012(["wd:Q131572"])
bind012 --> bind0
bind013(["wd:Q133004"])
bind013 --> bind0
bind014(["wd:Q133346"])
bind014 --> bind0
bind015(["wd:Q154278"])
bind015 --> bind0
bind016(["wd:Q166005"])
bind016 --> bind0
bind017(["wd:Q170404"])
bind017 --> bind0
bind018(["wd:Q177626"])
bind018 --> bind0
bind019(["wd:Q181784"])
bind019 --> bind0
bind020(["wd:Q185598"])
bind020 --> bind0
bind021(["wd:Q187668"])
bind021 --> bind0
bind022(["wd:Q188863"])
bind022 --> bind0
bind023(["wd:Q230533"])
bind023 --> bind0
bind024(["wd:Q283509"])
bind024 --> bind0
bind025(["wd:Q367293"])
bind025 --> bind0
bind026(["wd:Q379693"])
bind026 --> bind0
bind027(["wd:Q452573"])
bind027 --> bind0
bind028(["wd:Q705818"])
bind028 --> bind0
bind029(["wd:Q837556"])
bind029 --> bind0
bind030(["wd:Q912512"])
bind030 --> bind0
bind031(["wd:Q1338878"])
bind031 --> bind0
bind032(["wd:Q1351807"])
bind032 --> bind0
bind033(["wd:Q1368367"])
bind033 --> bind0
bind034(["wd:Q1397926"])
bind034 --> bind0
bind035(["wd:Q1932461"])
bind035 --> bind0
bind036(["wd:Q2608153"])
bind036 --> bind0
bind037(["wd:Q12547146"])
bind037 --> bind0
bind038(["wd:Q15320003"])
bind038 --> bind0
bind039(["wd:Q16513600"])
bind039 --> bind0
bind040(["wd:Q18344718"])
bind040 --> bind0
c1 --"wdt:P37"--> v5
v5 --"wdt:P424"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v3
bind1[/"if(bound(?item_label),'1^^xsd:integer','0^^xsd:integer')"/]
v3 --o bind1
bind1 --as--o v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind4[/"numeric-round('100^^xsd:integer' * / )"/]
null --o bind4
null --o bind4
bind4 --as--o v7