[01:10:31] has anyone been using the wikidata-client Ruby gem? [01:12:37] not me [01:16:08] * abartov discovered it got broken by some API changes (HTTPS, query-continue) [01:16:14] * abartov submitted a pull request :) [08:22:54] I have a question about Wikidata Properties [08:22:58] for example [08:22:59] https://www.wikidata.org/wiki/Property:P7 [08:23:56] in Arabic, how is the Arabic description of a property is liked to it? [08:27:10] in Arabic, how is the Arabic description of a property is linked to it? [13:01:18] Lydia_WMDE: are there any Wikidata things happening at the hackathon at Wikimania and do you think I could be useful? [13:02:03] sjoerddebruin: we'll surely do wikidata stuff at the hackathon at wikimania. i don't have a plan yet though for what exactly. and you are always useful ;-) [13:02:56] could give it a try [13:03:04] :) [13:03:07] would be cool [13:03:48] I do have some CSS, JavaScript and UA experience [13:08:30] Confusing stuff https://www.dropbox.com/s/7u0os4t5ixyl9h6/Schermafdruk%202016-03-12%2014.08.24.png?dl=0 [18:23:25] multichill|2: is https://www.wikidata.org/wiki/Wikidata:Partnerships_and_data_imports#The_NLW_Landscape_Collection_of_3.2C264_images something you could help with? iirc you've done a bunch of stuff with artwork collections before [18:38:49] Hey guys, I've been struggling to get a simple json object with all the properties of a particular user, so far I've tried the following url: https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&titles=katy%20perry&sites=enwiki&languages=en&normalize=&format=json [18:39:27] THe thing that I am trying to do is parse a list of twitter screen names, find their wiki data corresponding entry, and extract their birthday and occupation, can anyone please help me? [18:41:01] So you have twitter screen names as input? Not Wikipedia page titles… is that correct? [18:41:41] hoo: That is correct, I have screen names, names, etc, all of the information the twitter api provides in https://dev.twitter.com/rest/reference/get/friends/list [18:43:07] Ok, one second [18:43:27] if you have usernames, something based on https://query.wikidata.org/#select%20%3Fitem%20where%20%7B%0A%3Fitem%20wdt%3AP2002%20%22katyperry%22%20.%0A%7D would probably work better than the api [18:44:31] nikki: So this relies on the username of the individual already being on wiki data, correct? [18:44:43] yes [18:45:25] That's a good idea, I'm not sure how large the intersection is between all of my users, and all of their twitter handles being on wiki data, is there a way I can also do a fuzzy search by name? [18:46:59] not sure about fuzzy searching, I've never done it myself [18:47:17] http://tinyurl.com/hug6od3 a query which includes dates of birth and occupations in the result :) [18:47:59] nikki: That's really awesome, thank you [18:48:28] nikki: In regards to the accesspoint for the sparql API, what is the URL for that? [18:49:36] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#SPARQL_endpoint has the details about the api for the sparql query stuff [18:50:07] http://tinyurl.com/gngcrtz [18:50:13] Sorry for the slow reply [18:50:29] you can select further data from entity there as needed [18:50:36] but looks nikki was faster, so nvm [18:50:58] yours includes a way to select multiple people at once :) [18:51:38] (although I just did http://tinyurl.com/hug6od3 for that, I wonder if one way is faster than the other) [18:52:05] hoo: That' looks nice, thank you for the help guys [18:52:19] I'll give it a shot with either one of the approaches and let you guys know how it goes :) [18:54:54] Great! [19:46:22] !admin [19:48:03] multichill|2: around? [19:54:09] legoktm: I'm here [19:55:27] eurodyne: I'll pm [20:35:39] legoktm: Now I am [20:35:45] Hey guys, great success, I got everything to work in my python code, but now I'm trying to combine the results of your two queries to avoid overloading the system, this is what I've come up with: http://tinyurl.com/hsw46yl [20:36:11] I guess I don't understand why it isn't printing the dob and occupation, considering it gets the entityLabel correctly [20:38:42] user___: the things in the select line are variables, it doesn't know what they should return unless you tell it :) that's why mine has the lines like "optional { ?item wdt:P569 ?dob }" [20:40:10] Interesting, but how does it return the entityLabel without a directive? [20:40:20] That is also only listed in the "Variables" section [20:40:40] that's something handled by the "service wikibase:label" bit [20:41:46] I don't know exactly how it works, I just know that if there's a variable called ?foo which represents an item, it'll create a new variable called ?fooLabel with the label in the language given [20:42:17] Interesting, that's very strange [20:42:24] seems to be a lot of magic [20:43:14] Am I better off just doing many individual queries for each person? [20:45:40] it's also possible to select labels manually using things like "?item rdfs:label ?itemLabel filter (lang(?itemLabel) = "en") .", which in my experience is usually faster [20:46:20] I see [20:46:31] Could you also please explain how it is that I am getting duplicitous results? [20:46:44] I don't understand why I get like 5 katy perry results with different occupation labels [20:46:56] http://tinyurl.com/h57zkzo [20:47:23] because she has multiple occupations listed in wikidata [20:48:12] there are ways to group results in sparql if you really want only one row per person, or you could group them in your own code when parsing the results [20:48:13] I should probably just be grabbing all of them I guess [20:49:41] nikki: Well thank you so much for your help, I think I've got a good start [20:49:54] is there some etiqutte about how often I should be querying the API? [20:57:04] I'm not aware of anything specifically for the sparql endpoint [20:57:36] https://www.mediawiki.org/wiki/API:Etiquette for the normal api says there's no hard and fast rules, just be considerate and do requests in series, which seems like a sensible approach for sparql queries too [20:58:28] Ok, will do, thank you