Wikidata:WikiProject Properties/Adding missing statements
In a perfect world every property would have properties involved in "Automatically displayed fields" from Template:Property documentation, instance of (P31) and property proposal discussion (P3254) filled.
If you want to help and fill missing properties, you can query them with SPARQL.
Properties with missing instance of (P31) claim edit
SELECT ?property ?propertyLabel ?propertyDescription ?propertyType {
?property wikibase:propertyType ?propertyType .
MINUS { ?property wdt:P31 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Properties with missing Wikidata item of this property (P1629) claim edit
SELECT ?property ?propertyLabel ?propertyDescription ?propertyType {
?property wikibase:propertyType ?propertyType .
MINUS { ?property wdt:P1629 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Properties with missing Wikidata property example (P1855)/Wikidata property example for properties (P2271) claims edit
SELECT ?property ?propertyLabel ?propertyDescription ?propertyType {
?property wikibase:propertyType ?propertyType .
MINUS { ?property (wdt:P1855|wdt:P2271) [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Properties with missing property proposal discussion (P3254) claim edit
SELECT ?property ?propertyLabel ?propertyDescription ?propertyType {
?property wikibase:propertyType ?propertyType .
MINUS { ?property wdt:P3254 [] } .
MINUS { ?property rdf:type wdno:P3254 } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
}
Properties with missing labels by language edit
SELECT ?lang (COUNT(*) AS ?label_count) (URI(CONCAT("https://www.wikidata.org/w/index.php?search=-haslabel%3A",?lang,"&ns120=1")) AS ?missing_search) {
?prop wikibase:propertyType ?datatype .
OPTIONAL {
?prop rdfs:label ?label .
BIND (LANG(?label) AS ?lang) .
} .
} GROUP BY ?lang
ORDER BY DESC(?label_count)
Properties with missing labels and/or descriptions edit
Please note: this is an example for German (Q188) language (de
). You can put any supported language code into the query.
SELECT ?prop ?label ?description ?datatype {
BIND( STRLANG( 'x', 'de' ) AS ?dummy ) .
?prop wikibase:propertyType ?datatype .
OPTIONAL {
?prop rdfs:label ?label .
FILTER( LANG( ?label ) = LANG( ?dummy ) ) .
} .
OPTIONAL {
?prop schema:description ?description .
FILTER( LANG( ?description ) = LANG( ?dummy ) ) .
} .
FILTER( !( BOUND( ?label ) && BOUND( ?description ) ) ) .
}