[10:11:29] Hey, wie kann ich mein Benutzerkonto auf Wikidata löschen? [17:52:32] Hi folks! Ought claims for population include points in time in the future? I've just seen an entity that does, and it seems an odd thing to do (it's Russia, which uses projections from RT) but I wanted to check before removing it. [20:48:31] Naypta: Hi, I would say it's fine as long as 1) there is a prefered statement not in the future 2) all the future statements have a qualifier stating it is an estimation [20:49:46] and of course 3) there is a reference ! [20:50:10] melderick: Hrm, okay. I removed it in the end because I didn't think it fit with the property definition - ought I to readd it? The reason it was causing an issue was because, when using a JSON export, there's no easily-accessible indication of preferred ranking as far as I'm aware - although I might be missing something obvious. [20:51:21] huh ? I am using JSON dumps and it contains everything, including the preferred rank [20:52:22] but it might depends on which json export you're talking or how you extracted it [20:52:45] ...ah, admittedly this may be because there was no preferred rank set for that... [20:52:48] * Naypta sighs [20:52:50] nice job, self [20:54:47] yep, it is in the JSON, I'm just being stupid. thanks, melderick! [20:57:08] you're welcome [21:20:55] Is there an easy way in SPARQL to replicate something similar to Special:EntityData, but with only the preferred rank property (or the last property added, if no preferred rank is available)? I just want to fetch all of the relevant data from claims given a specific entity ID. [21:37:58] There is that: https://en.wikibooks.org/wiki/SPARQL/WIKIDATA_Qualifiers,_References_and_Ranks [21:40:40] SothoTalKer_: Thanks, yeah, I've been looking at that. I'm having trouble turning that into something that works to return all the properties' values, though. Forgive my stupidity, I've only used SPARQL a handful of times :p [22:10:42] Well, just try it. Use the examples and replace stuff there to fit your needs [22:13:17] Naypta: here are 2 examples [22:13:34] Naypta:#wikidata] SothoTalKer_: Thanks, yeah, I've been looking at that. I'm having trouble turning that into something that works to [22:13:34] + return all the properties' values, though. Forgive my stupidity, I've only used SPARQL a handful of times :p [22:13:34] 23:41 *** halfak is now known as halAFK [22:13:34] 23:43 *** Signoff: HaeB (Read error: Connection reset by peer) [22:13:34] 23:43 *** HaeB (sid154922@wikimedia/HaeB) has joined channel #wikidata [22:13:35] 00:10 [SothoTalKer_:#wikidata] Well, just try it. Use the examples and replace stuff there to fit your needs [22:13:35] 00:13 [melderick:#wikidata] Naypta: here are 2 examples [22:13:36] [1] 00:13 melderick (+i) on #wikidata (+nt) * type /help for help [22:13:44] damn [22:13:45] sorry [22:14:00] :-p [22:14:19] select * where { wd:Q31 wdt:P2250 ?val } [22:14:26] select * where { wd:Q31 p:P2250/ps:P2250 ?val } [22:14:36] that's what i meant to paste [22:14:41] hah, thanks! [22:14:45] again sorry ^^ [22:15:18] wdt: means it will take the prefered statement if they exist [22:15:35] what I'm effectively trying to do is something along these lines, but I can't work out a way of making the statement here wdt rather than wds https://query.wikidata.org/#SELECT%20DISTINCT%20%3Fproperty%20%3Fstatement%20%3Fref%20WHERE%20%7B%0A%20%20wd%3AQ42%20%3Fproperty%20%3Fstatement.%0A%20%20%3Fstatement%20prov%3AwasDerivedFrom%20%3Frefnode.%0A%20%20%3Frefnode%20pr%3AP854%20%3Fref.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase% [22:15:36] 3Alanguage%20%22en%22.%20%7D%0A%7D [22:15:41] that... that URL was way too long [22:15:58] https://w.wiki/TYs there we are! [22:17:01] hmm [22:20:13] so you want to the URLs used in references in "the best" (prefered if possible, normal otherwise) statements of Q42 ? [22:20:23] +get [22:21:34] Q42 is just an example here, I'd be running this with a fair few different entities, but I want to basically get output of each property the entity has, then the "best" value for that property, along with its reference, and a couple of other bits (but I can figure out the exact details, it's just the overarching structure that I'm bashing my head into a wall about) [22:28:41] https://w.wiki/TYu [22:28:44] try this [22:29:38] that looks to be returning the same output as my original query :/ [22:31:52] maybe there is no URL for the prefered statements of Q42 ? [22:32:44] my understanding is that the ranking part of the query isn't necessary, because SPARQL on Wikidata's default behaviour with a triplet is to return the best available value, but the problem remains without that [22:32:59] the statement field returns as a wds: link rather than as the actual wdt: result [22:34:38] not a default behavior [22:35:27] you get the best claims only if you use the wdt: claims but then you can't get neither qualifiers or references [22:35:41] ahh i see [22:36:05] rdf:type wikibase:BestRank is the way to have both [22:37:07] also what is meant by "best rank" is : get ALL the prefered claims if any, or get ALL the normal claims [22:37:53] in this case there is no prefered claim with an URL, so you get only normal claims [22:38:11] so if I've got a wds: link in the query result, how do I turn that into something that's parsable off wikidata like a wdt: would be? sorry for the stupid questions :p [22:39:10] effectively I want to access the mainsnak value of that "object" (if that's how SPARQL works too?) [22:39:11] a wds link is just a temporary variable, you don't do anything with it [22:39:36] then you just add another triplet [22:42:00] https://w.wiki/TYy [22:42:04] like this [22:42:50] ahh, so why is that statementProperty rather than Value? from what I read in https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Value_representation I thought it would be wikibase.Value [22:46:11] /31/ [22:46:40] hmm look at this https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#References [22:47:09] in this example wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37 is ?statement [22:47:34] what you want to retrieve is wd:Q3 (?value) [22:48:00] so you need a triplet with ?statement ?value [22:48:18] that something is ps:P2 [22:48:43] now how do you get this ? it is tied to ?property [22:49:15] and that what statementProperty is used for [22:49:38] ah okay, I think I see :) [22:49:50] thank you so very much for all your help, melderick, you've been incredibly helpful! [22:49:53] all this seems complicated because you are retrieving ANY property [22:50:28] if you would want one known property all this gets simpler [22:51:19] you're welcome :)