Submissions for Wikidata

Description

Wikidata is a free and open knowledge base that can be read and edited by both humans and machines. Wikidata acts as central storage for the structured data of its Wikimedia sister projects including Wikipedia, Wikivoyage, Wiktionary, Wikisource, and others.

9 of 9 submissions
#265

Natural Language Question

What is the population of the United States?
#268

Natural Language Question

quels acteurs ont interprété Hamlet au 20è siècle ?
#279

Natural Language Question

Which archaeological artifacts are on WikiProject IDEA's focus list, where were they discovered, and in which collections are they kept? Include the coordinates of the discovery sites and collections, and display only English labels for artifacts and collections.

Source

https://query.wikidata.org/#%23defaultView%3ATable%0ASELECT%20%3Fartifact%20%3FartifactLabel%20%3FdiscoveryLocation%20%3FdiscoveryLocationLabel%20%3FdiscoveryCoord%20%3Fcollection%20%3FcollectionLabel%20%3FcollectionCoord%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fartifact%20%28SAMPLE%28%3Floc%29%20AS%20%3FdiscoveryLocation%29%20%28SAMPLE%28%3Fcol%29%20AS%20%3Fcollection%29%0A%20%20%20%20WHERE%20%7B%0A%20%20%20%20%20%20%23%201.%20Filter%20for%20items%20on%20the%20focus%20list%20of%20WikiProject%20IDEA%0A%20%20%20%20%20%20%3Fartifact%20wdt%3AP5008%20wd%3AQ114241199%20.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%23%202.%20Filter%20for%20items%20that%20are%20instances%2Fsubclasses%20of%20archaeological%20artifact%0A%20%20%20%20%20%20%3Fartifact%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ220659%20.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%23%203.%20Get%20the%20location%20of%20discovery%0A%20%20%20%20%20%20%3Fartifact%20wdt%3AP189%20%3Floc%20.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%23%204.%20Get%20the%20collection%0A%20%20%20%20%20%20%3Fartifact%20wdt%3AP195%20%3Fcol%20.%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%23%20Filter%20out%20broader%20parent%20locations%20if%20a%20more%20granular%20sub-location%20exists%20via%20%22Part%20of%22%20%28P361%29%0A%20%20%20%20%20%20%23%20%28e.g.%2C%20If%20%27Room%20H%27%20is%20part%20of%20%27Palmyrene%20Gate%27%2C%20drop%20%27Palmyrene%20Gate%27%29%0A%20%20%20%20%20%20FILTER%20NOT%20EXISTS%20%7B%0A%20%20%20%20%20%20%20%20%3Fartifact%20wdt%3AP189%20%3FbroaderLoc%20.%0A%20%20%20%20%20%20%20%20FILTER%28%3FbroaderLoc%20%21%3D%20%3Floc%29%0A%20%20%20%20%20%20%20%20%3Floc%20wdt%3AP361%2B%20%3FbroaderLoc%20.%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fartifact%0A%20%20%7D%0A%20%20%0A%20%20%23%20Fetch%20coordinate%20locations%20for%20the%20finalized%20unique%20pairs%0A%20%20OPTIONAL%20%7B%20%3FdiscoveryLocation%20wdt%3AP625%20%3FdiscoveryCoord%20.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fcollection%20wdt%3AP625%20%3FcollectionCoord%20.%20%7D%0A%20%20%0A%20%20%23%20Fetch%20human-readable%20labels%20for%20the%20variables%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D

SPARQL Query

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>

#defaultView:Table
SELECT ?artifact ?artifactLabel ?discoveryLocation ?discoveryLocationLabel ?discoveryCoord ?collection ?collectionLabel ?collectionCoord
WHERE {
  {
    SELECT ?artifact (SAMPLE(?loc) AS ?discoveryLocation) (SAMPLE(?col) AS ?collection)
    WHERE {
      # 1. Filter for items on the focus list of WikiProject IDEA
      ?artifact wdt:P5008 wd:Q114241199 .
      
      # 2. Filter for items that are instances/subclasses of archaeological artifact
      ?artifact wdt:P31/wdt:P279* wd:Q220659 .
      
      # 3. Get the location of discovery
      ?artifact wdt:P189 ?loc .
      
      # 4. Get the collection
      ?artifact wdt:P195 ?col .
      
      # Filter out broader parent locations if a more granular sub-location exists via "Part of" (P361)
      # (e.g., If 'Room H' is part of 'Palmyrene Gate', drop 'Palmyrene Gate')
      FILTER NOT EXISTS {
        ?artifact wdt:P189 ?broaderLoc .
        FILTER(?broaderLoc != ?loc)
        ?loc wdt:P361+ ?broaderLoc .
      }
    }
    GROUP BY ?artifact
  }
  
  # Fetch coordinate locations for the finalized unique pairs
  OPTIONAL { ?discoveryLocation wdt:P625 ?discoveryCoord . }
  OPTIONAL { ?collection wdt:P625 ?collectionCoord . }
  
  # Fetch human-readable labels for the variables
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#280

Natural Language Question

Which inscriptions were discovered at Dura-Europos? For each, show its language, the precise location where it was found and its coordinates, and a picture if one exists.

SPARQL Query

      
#defaultView:Table
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>

SELECT DISTINCT ?languageLabel ?inscription ?inscriptionLabel ?findspot ?findspotLabel ?coordinate ?image WHERE {
  ?inscription wdt:P31/wdt:P279* wd:Q1640824 ;  # inscription or subclass of inscription
               wdt:P189 wd:Q464266 .           # found at Dura-Europos

  OPTIONAL {
    ?inscription wdt:P407 ?language .           # language of work/name
  }

  OPTIONAL {
    ?inscription wdt:P189 ?findspot .
    FILTER(?findspot != wd:Q464266)             # exclude generic Dura-Europos value
    OPTIONAL {
      ?findspot wdt:P625 ?coordinate .
    }
  }

  OPTIONAL {
    ?inscription wdt:P18 ?image .
  }

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
ORDER BY ?languageLabel ?inscriptionLabel ?findspotLabel
#300

Natural Language Question

Which temples found in the site of Doura Europos are dedicated to which deities? I’d like to get the detailed count by deity.

Source

SPARQL Query

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#>

SELECT ?deity ?deityLabel (COUNT(DISTINCT ?temple) AS ?templeCount) WHERE {
  VALUES ?loc { wdt:P276 wdt:P131 }
  ?temple ?loc wd:Q464266 .
  ?temple wdt:P31 wd:Q44539 .
  ?temple wdt:P825 ?deity .
  FILTER(STRSTARTS(STR(?deity), "http://www.wikidata.org/entity/Q"))
  ?deity rdfs:label ?deityLabel . FILTER(LANG(?deityLabel) = "en")
}
GROUP BY ?deity ?deityLabel
ORDER BY DESC(?templeCount)
#306

Natural Language Question

Where were fibulae found at Dura-Europos discovered; what are their specific findspots, and what do they look like?

Source

SPARQL Query

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#>
PREFIX wikibase: <http://wikiba.se/ontology#>

#defaultView:Map
SELECT ?object ?objectLabel ?place ?coordinate ?image WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?object wdt:P31 wd:Q324926. #object is an instance of ‘fibula’
  ?object wdt:P189 wd:Q464266, ?place. #show ?object that has a location of discovery Dura-Europos and store the value for ?place variable
  ?place wdt:P625 ?coordinate. #find the ?place variable's coordinate value
  OPTIONAL { ?object wdt:P18 ?image. } #if ?object has an image, show the image file
}
#308

Natural Language Question

Where were inscriptions found at Dura-Europos discovered, and what are their specific findspots?

Source

SPARQL Query

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>

#defaultView:Map
SELECT ?object ?objectLabel ?place ?coordinate ?image WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?object wdt:P31 wd:Q1640824. #object is instance of 'inscription'
  ?object wdt:P189 wd:Q464266, ?place. #show ?object that has a location of discovery Dura-Europos and store the value for ?place variable
  ?place wdt:P625 ?coordinate. #find the ?place variable's coordinate value
  OPTIONAL { ?object wdt:P18 ?image. } #if ?object has an image, show the image file
}
#309

Natural Language Question

Which divinities were worshipped at temples in Dura-Europos, and where else were temples dedicated to those same divinities located?

Source

SPARQL Query

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>

SELECT ?temple ?templeLabel ?divinity ?divinityLabel ?coords WHERE {
  # First, find the divinities with temples dedicated to them at Dura-Europos
  VALUES ?divinity { 
    # Insert the IDs of the divinities you got from part 1 here, for example:
    wd:Q99743232 wd:Q99743300 wd:Q34201 wd:Q1640824 wd:Q213440 wd:Q1243867 wd:Q1302646 wd:Q37340 wd:Q163920 wd:Q221735 wd:Q39503 wd:Q1809764 wd:Q99743301 wd:Q890208 wd:Q86664835 wd:Q2894617 
  }
  
  # Find all temples associated with these divinities
  ?temple wdt:P31 wd:Q44539.  # instance of temple
  ?temple wdt:P825 ?divinity;  # associated with the divinity
          wdt:P625 ?coords.  # get coordinates for these temples

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#310

Natural Language Question

Among items on the Wikiproject IDEA focus list that were discovered at Dura-Europos, which ones depict a deity, and what are their findspot coordinates, holding collections, and images?

Source

SPARQL Query

PREFIX wd: <http://www.wikidata.org/entity/> 
PREFIX wdt: <http://www.wikidata.org/prop/direct/> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> #defaultView:Map 
SELECT DISTINCT ?item ?itemLabel ?depictsLabel ?collectionLabel ?siteCoord ?image 
WHERE {
  ?item wdt:P5008 wd:Q114241199 .
   ?item wdt:P189 wd:Q464266 .
   ?item wdt:P180 ?depicts .
   ?depicts wdt:P31/wdt:P279* wd:Q178885 .
   
OPTIONAL {
  ?item wdt:P195 ?collection .
   ?collection rdfs:label ?collectionLabel .
   
FILTER(LANG(?collectionLabel) = "en")
} 
OPTIONAL {
  ?item wdt:P189 ?discoverySite .
   ?discoverySite wdt:P625 ?siteCoord
} 
OPTIONAL {
  ?item wdt:P18 ?image
} ?item rdfs:label ?itemLabel .
   
FILTER(LANG(?itemLabel) = "en") ?depicts rdfs:label ?depictsLabel .
   
FILTER(LANG(?depictsLabel) = "en")
}
Odoma and Graphia logos

Quagga has been developed by Odoma ↗ for Graphia ↗

Funded by the European Union (grant ID: 101188018 ↗)

and by the Swiss State Secretariat for Education, Research and Innovation (SERI).

Contact Github FAQ