[08:05:43] !admin please block https://www.wikidata.org/wiki/Special:Contributions/Numangoof [08:05:43] Please visit https://www.wikidata.org/wiki/WD:AN [08:09:25] hmmm the topic says to type ! admin to get the attention of an admin, this bot needs some update :P [08:10:36] lol [08:28:04] thib: done [08:28:55] it's the other way round though, the bot was changed (because of someone who kept abusing it) but not the topic [08:29:09] haven't seen them for a while though, so it could probably be changed back [08:32:58] nikki: thanks! [10:16:36] how can i find all countries (their IDs) using wikidata SPARQL ? [10:18:50] Hi basiclaser [10:19:11] You need to find all the items that have that specific property. [10:19:16] Choose one of the examples [10:19:52] For example, the first one (Cats). This lists all of the items in Wikidata that are instances of cats. [10:21:21] Q6256 is then a country [10:22:18] Change cats into countries, and you get a list of the Q-numbers and the labels for all items that are countries in Wikidata. [10:22:40] That's one good way to learn SPARQL, take a working query and expand on it. [10:23:25] Of course, you won't get all ones, and you will get some historic ones, but that is a first step. [10:26:31] WiseWoman: hey i found this its basically perfect - http://tinyurl.com/gok5tbu [10:27:01] i was originally scraping wikipedia page IDs but they didnt always correspond to the wikidata Q-ID [10:27:12] Fiji was Robert Mugabe :P [10:27:14] For many questions there are *lots* of examples that are similar. This one only looks at P31 [10:27:31] Um, ja. I hope you fixed that :) [10:27:49] how do I return the ID of the returned entries? [10:28:21] is that another WDT thing ? or a special keyword? [10:28:23] Just ?item [10:28:27] oh great [10:28:34] That is always the Q-ID [10:28:46] ?itemLabel is the corresponding, human-readable label [10:29:33] You might also have a look at instances of Q1048835 (political territory) [10:29:58] I wonder, is there a bot here to transform the Q-IDs? {{Q|1048835}} [10:29:58] 10[1] 10https://www.wikidata.org/wiki/Template:Q [10:30:03] ooh nice [10:30:19] {{Q1048835}} [10:30:19] 10[2] 04https://www.wikidata.org/wiki/Template:Q1048835 [10:30:38] Nope. Different syntax that on Wikidata. [10:30:52] pls help 😭 i dont get this DSL http://tinyurl.com/yxkd6r87 , I tried to put ?item everywhere [10:32:55] ?item is not bound to anything [10:32:59] ive been learning graphQL its really nice - im just getting this initial list of IDs as a starting point [10:33:44] Put ?country under SELECT DISTINCE and then last in GROUP BY [10:34:11] That gives you the IDs & Labels, sorted by population [10:34:22] Niue is last :) [10:34:43] But again, many are missing (as they are labeled differently) [10:34:48] Germany, for example :) [10:35:02] ohhh you genius i get it now, i didnt see the -label [10:35:38] i was originally scaping this table as a starting point, its pretty nice and full https://en.wikipedia.org/wiki/List_of_sovereign_states#List_of_states [10:36:07] And Sudan is in twice, as there are two "normal rank" populations. [10:36:17] I just made the newer one "preferred" :) [10:36:43] Lists in Wikipedia are good starting points [10:36:59] lol [10:37:18] if you change to that political territory Q-id you get 100 koreas [10:38:01] "Korea under Japanese rule" yehhhh pretty sure im not going to use that :D [10:38:37] WiseWoman: what does it mean, that germany isnt of type country? [10:39:30] https://www.wikidata.org/wiki/Q183 is Germany [10:40:07] It is both instance of country, and is country (P17) Germany [10:41:02] But the query is not returning it. [10:41:58] I have no idea why not :D [10:43:33] i thought maybe it was the population grouping but removing all of that but no number of result change [10:44:21] There are so many populations for Germany [10:44:53] yeh [10:45:12] I just tried to set the preferred property to the newest one and got an edit conflict.... [10:45:33] That's not it, though [10:45:59] hm so a bunch of dupes, no germany, im trying to eye any other missing countries for a potential clue [10:46:08] how did you notice germany wasn't there? just luck? [10:46:29] I live in Germany :) [10:46:37] ah ok same [10:46:38] So I was using that to check my results. [10:46:43] Wikidata is far from perfect [10:47:02] england is not listed as a country, which is mehhhh sort of understandable [10:47:25] but Wales is listed haha [10:48:38] Here is a nice tutorial https://www.wikidata.org/wiki/Wikidata:SPARQL_tutorial [10:49:16] thanks a bunch [10:50:45] Have fun! [11:00:45] ill try :D [11:31:50] I've put the missing Germany (and France, Spain, Italy, Poland, Luxemburg, and Belgium) into a comment at Q183 [11:45:27] the query in your comment uses wdt:P31 without any subclasses [11:45:54] and wdt: ignores normal ranked statements when there are preferred rank statements [11:48:21] sovereign state is a subclass of country and changing wdt:P31 to wdt:P31/wdt:P279* does include it (plus a load of other stuff, including historical countries) [11:53:25] and when there's multiple rows because of multiple population values, that most likely means that one of them needs to be set to preferred rank (the most recent, generally) [14:25:08] Change on 12www.mediawiki.org a page Extension:Wikibase Client was modified, changed by Ladsgroup link https://www.mediawiki.org/w/index.php?diff=3193717 edit summary: [+2] This extension is everything but beta [17:05:50] Is there any way to add a small counter to something like https://www.wikidata.org/wiki/Wikidata%3AWikiProject_sum_of_all_paintings%2FCollection%2FTartu_Art_Museum%2FDepicts ? ("This query has 4321 results" or whatever) [17:11:06] |summary=itemnumber [17:18:36] I just realised that 99% or all EU countries are missing when i search for countries ( using Q6256 "country" ) - is there another broader designation to capture all generally recognised "countries" [17:19:24] https://www.wikidata.org/wiki/Q3624078 might work better [17:26:29] wow this is tricky contains countries that dont exist anymore :P i found P17, will try to use that [17:34:05] reosarevok: I was meaning to ask you why you created https://www.wikidata.org/wiki/Q55986655 ? Why not just use https://www.wikidata.org/wiki/Q12376420 ? [17:35:30] Currently Estonia is very inconsistent compared to other countries, see https://www.wikidata.org/wiki/Wikidata:WikiProject_sum_of_all_paintings/Property_statistics [17:36:39] multichill: because they are different collections, with different IDs and whatnot (https://www.wikidata.org/wiki/Wikidata:Property_proposal/MuIS_collection_ID) [17:37:29] If we can specify the museum collection, and the museum itself considers them separate, why wouldn't we :) It's just more specific data [17:38:01] I see that table has https://www.wikidata.org/wiki/Q3044768 too :) [17:38:14] The museum is still marked as owner [17:38:57] And I guess I should use the museum as location as well, since we're not sure in which building each painting is [17:39:40] The French love to be different. But hey, that's from the country where they love to use the same inventory number multiple times [17:40:06] So I wouldn't use them as an example of how it should be done [17:40:14] https://www.wikidata.org/wiki/Q18573057 is there too :) [17:40:51] Anyway, I think the most specific data we can get, the best our data is. https://www.wikidata.org/wiki/Q55986655 specifies whose collection it is - so if we want to query per-museum, that's perfectly doable [17:42:18] The proposal for the property had "Getting any data for sub-institution collections – be it only identification and names – is a crucial step for art data here", so some people seem to think it's useful to have that data - and if we have it, there's no better way to link to it than "collection" :) [17:42:19] You seem to have a good source. Not sure what happened with the formatter url. Added it so I can actually click it and see the source [17:43:11] Can you import the missing locations and titles reosarevok? [17:43:25] The formatter url is RDF, so we have it as RDF resource instead of URL [17:43:46] external-id properties should always have a formatter url [17:43:50] Because otherwise people will click and get rdf, which seems unwanted - in Chrome that seems to just download a file, it doesn't even open it [17:43:58] The URI thing is only visible in the RDF, not for normal users [17:44:08] That's better than nothing [17:44:29] https://www.wikidata.org/wiki/Wikidata:Property_proposal/MuIS_person_or_group_ID had Andy specifically said it shouldn't use formatter URL :) [17:44:30] The URI formatter actually has a contraint on it that it should always have a formatter url [17:45:16] Well, I don't mind, but users might [17:45:32] I certainly would be annoyed to click on a URL and find I'm downloading an rdf file :p [17:45:45] Re: location, yes, I'm still trying to confirm whether I should just use the museum itself [17:45:55] Should I? I can just change the bot to add it, if that's the case [17:46:09] It's probably your settings, in Firefox I just get a page [17:46:21] Firefox gets a page, Chrome a download [17:46:35] Of course, the location is not the museum *building*, for many of these it's probably on a separate storage building [17:46:41] That would be nice reosarevok. You might want to copy some of my date logic to get some of the missing inceptions [17:47:02] I rarely use owner because so many Dutch collections do loans [17:47:26] Well, the RDF here specifically says the museum owns it [17:47:52] Of course, I dunno if that means it's in the museum - it might be loaned out too, so location is trickier [17:47:58] That's awesome. I do know for some collections which parts are owned and which part are loans. Future improvement :-) [17:48:12] (it does not specify where the painting is) [17:48:28] Location isn't qualified with a point in time so you just say that it was in that location at some point in time [17:49:15] Do you have the date it entered the collection reosarevok? [17:49:26] I can check [17:50:31] And do they have an open access policy? Images like at https://www.muis.ee/museaalview/1459197 , can these be used? (don't look at the date, I meant a public domain image) [17:51:34] Seems not, all I have is [17:51:37] (or whatever) [17:51:47] reosarevok: https://www.muis.ee/help/Autorioigused looks like an open access policy [17:52:01] For the images, we're talking to the respective museums to get actual high quality images [17:52:10] The ones on the database are generally tiny [17:53:14] If you add the right statements to the paintings, https://commons.wikimedia.org/wiki/Special:ListFiles/BotMultichillT will upload it [17:54:22] https://github.com/multichill/toollabs/blob/master/bot/wikidata/artdatabot.py#L494 for the date handling [17:58:42] reosarevok: Anyway, time for some food. Keep up the good work :-) [17:59:04] Coming to https://www.mediawiki.org/wiki/Wikimedia_Hackathon_2019 btw? [18:33:37] Join [18:33:52] Exit [19:17:29] basiclaser: Someone made the suggestion that you use different properties, like this: http://tinyurl.com/y2vopk56 Now Germany, France, Italy, etc. are all listed. [20:33:25] hi WiseWoman thanks - i ended up manually concatting all EU ids in but will check your stuff out