Wikidata:WikiProject Knowledge Organization Systems/Mappings

Tasks edit

Queries edit

KOS with Mapping properties edit

SELECT DISTINCT ?bartoc ?kos ?de ?en ?prop ?propLabel
WHERE
{
	?kos wdt:P31/wdt:P279* wd:Q6423319 .
    { 
      { ?kos wdt:P1687 ?prop } UNION { ?prop wdt:P1629 ?kos }
    }
    OPTIONAL { ?kos rdfs:label ?en . FILTER (lang(?en) = 'en') }
    OPTIONAL { ?kos rdfs:label ?de . FILTER (lang(?de) = 'de') }
    OPTIONAL { ?kos wdt:P2689 ?id }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en" }
     BIND(IRI(CONCAT("http://bartoc.org/en/",?id)) as ?bartoc)
} ORDER BY ?kos
Try it!

Dewey Decimal Classification edit

Makes use of property Dewey Decimal Classification (P1036) (see   for nice analysis)

# Number of distinct Wikidata items with DDC number
SELECT (COUNT(DISTINCT ?item) AS ?items) WHERE {
  ?item p:P1036 ?ddc
}
Try it!
# Number of distinct DDC numbers found in Wikidata
SELECT (COUNT(DISTINCT ?ddc) AS ?numbers) WHERE {
  ?item p:P1036 ?ddc
}
Try it!
# Get DDC numbers from Wikidata for a given Wikipedia article
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?item ?itemLabel ?ddc ?edition ?editionLabel WHERE {
  
  <https://no.wikipedia.org/wiki/Fisk> schema:about ?item .
  
  # Replace three lines with "?item wdt:P1036 ?ddc" if edition don't matter
  ?item p:P1036 ?statement .
  ?statement ps:P1036 ?ddc . 
  OPTIONAL { ?statement pq:P747 ?edition . }
  
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "no,en" .
  }
}
Try it!