Querying: Difference between revisions

Line 195: Line 195:


=== Fetch missing geocoordinates from Wikidata ===
=== Fetch missing geocoordinates from Wikidata ===
This query for some reason won't supply a shortlink. Model for fetching information from Wikidata. Thanks for help from Wikibase telegram group users Tuukka Hastrup and Nikki. Note the crucial and mysterious `hint:Query hint:optimizer "None" .` [run https://ottgaz.org/query/#%23Seat%20with%20Wikidata%20Qids%20but%20without%20geolocation%0APREFIX%20og%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fentity%2F%3E%0APREFIX%20ogs%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fentity%2Fstatement%2F%3E%0APREFIX%20ogv%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fvalue%2F%3E%0APREFIX%20ogt%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20ogp%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2F%3E%0APREFIX%20ogps%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20ogpq%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fqualifier%2F%3E%0APREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0ASELECT%20%20%3Fseat%20%3FseatLabel%20%3FwdURL%20%3Fcoords%0AWHERE%20%0A%7B%0A%20VALUES%20%3Fcenter%20%7Bog%3AQ287%20og%3AQ497%20og%3AQ6421%7D%0A%20%3Fseat%20ogt%3AP6%20%3Fcenter.%0A%20%3Fseat%20ogt%3AP3%20%3FwdQid.%0A%20MINUS%20%7B%3Fseat%20ogt%3AP10%20%3Fgeo.%7D%0A%20BIND%20%28URI%28CONCAT%28%22http%3A%2F%2Fwww.wikidata.org%2Fentity%2F%22%2C%0A%20ENCODE_FOR_URI%28%3FwdQid%29%29%29%20as%20%3FwdURL%29.%0A%20hint%3AQuery%20hint%3Aoptimizer%20%22None%22%20.%0A%20SERVICE%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%20SELECT%20%3FwdURL%20%3Fcoords%20%7B%0A%20%20%20%3FwdURL%20wdt%3AP625%20%3Fcoords%20.%0A%20%20%20%7D%0A%20%7D%0A%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22%20%7D%0A%7D]
This query for some reason won't supply a shortlink. Model for fetching information from Wikidata. Thanks for help from Wikibase telegram group users Tuukka Hastrup and Nikki. Note the crucial and mysterious `hint:Query hint:optimizer "None" .` [https://ottgaz.org/query/#%23Seat%20with%20Wikidata%20Qids%20but%20without%20geolocation%0APREFIX%20og%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fentity%2F%3E%0APREFIX%20ogs%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fentity%2Fstatement%2F%3E%0APREFIX%20ogv%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fvalue%2F%3E%0APREFIX%20ogt%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20ogp%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2F%3E%0APREFIX%20ogps%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20ogpq%3A%20%3Chttps%3A%2F%2Fottgaz.org%2Fprop%2Fqualifier%2F%3E%0APREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0ASELECT%20%20%3Fseat%20%3FseatLabel%20%3FwdURL%20%3Fcoords%0AWHERE%20%0A%7B%0A%20VALUES%20%3Fcenter%20%7Bog%3AQ287%20og%3AQ497%20og%3AQ6421%7D%0A%20%3Fseat%20ogt%3AP6%20%3Fcenter.%0A%20%3Fseat%20ogt%3AP3%20%3FwdQid.%0A%20MINUS%20%7B%3Fseat%20ogt%3AP10%20%3Fgeo.%7D%0A%20BIND%20%28URI%28CONCAT%28%22http%3A%2F%2Fwww.wikidata.org%2Fentity%2F%22%2C%0A%20ENCODE_FOR_URI%28%3FwdQid%29%29%29%20as%20%3FwdURL%29.%0A%20hint%3AQuery%20hint%3Aoptimizer%20%22None%22%20.%0A%20SERVICE%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%20SELECT%20%3FwdURL%20%3Fcoords%20%7B%0A%20%20%20%3FwdURL%20wdt%3AP625%20%3Fcoords%20.%0A%20%20%20%7D%0A%20%7D%0A%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22%20%7D%0A%7D run]


  #Seat with Wikidata Qids but without geolocation
  #Seat with Wikidata Qids but without geolocation