0

This SPARQL query on Wikidata is missing the form of government for a lot of entries. My query:

SELECT DISTINCT ?country ?countryLabel 
(group_concat(DISTINCT ?bfogLabel;separator=", ") as ?Government)
WHERE
{
  ?country wdt:P31 wd:Q3624078.
  OPTIONAL {?country wdt:P122 ?bfog } . # basic form of government
  SERVICE wikibase:label 
          { bd:serviceParam wikibase:language "en" .
          ?country rdfs:label ?countryLabel .
          ?bfog rdfs:label ?bfogLabel .
  }
}
GROUP BY ?country ?countryLabel 
ORDER BY ?countryLabel 

Angola is in Wikipedia's infobox: "Unitary dominant-party presidential constitutional republic". But it is empty in this query.

Why is that? More important: is there any fix for this? I saw in this question that wikidata is not as reliable as possible when it comes to data categorization.

Try it out here

Chaotic
  • 133
  • 7
  • what do you mean by "why"? The data is added by users to Wikidata, and it's not the same data as already contained in Wikipedia. Feel free to add the missing data to Wikidata, everybody can contribute - that's how a collaborated knowledge graph is made. – UninformedUser Mar 15 '21 at 06:33
  • if you have data, [here](https://www.wikidata.org/wiki/Wikidata:Data_donation) and [here](https://www.wikidata.org/wiki/Wikidata:Data_Import_Guide) you can see how to contribute. And yes, open data is usually incomplete - so feel free to make it more complete. – UninformedUser Mar 15 '21 at 06:59
  • By the way, maybe you could also use additional data from DBpedia, which is automatically extracted from Wikipedia. So, maybe combining both would give you a better result? – UninformedUser Mar 15 '21 at 07:00
  • Thank you, @UninformedUser. You should put these comments as an answer, so I could accept it. The fact that wikidata is incomplete and open for contribution is the answer I needed. – Chaotic Mar 15 '21 at 13:46
  • Usually, when you don't like the form of government, you have to start a revolution. So consider yourself lucky: you just have to fill out a form. – Matthias Winkelmann Mar 15 '21 at 14:07
  • @Chaotic feel free to write the answer once you found a sufficient solution. Did you try to use DBpedia as well? As far as I remember, there were links to Wikidata entities. – UninformedUser Mar 16 '21 at 07:56

0 Answers0