[12:42:04] Hi, I am trying to write a query to list all French footballers who are currently 24 years old, but I don't know how to use the date to for counting. Any idea how I can get that done? [14:33:02] acagastya: something like https://w.wiki/jwL might work? I'm not sure how well it works for dates close to someone's birthday though [14:41:06] nikki: looks like it works! [14:41:08] https://w.wiki/jwR [14:41:31] Wait. [14:41:48] Yes, it does. [14:48:24] acagastya: here's another way of doing it which should definitely handle dates close to someone's birthday correctly - https://w.wiki/jwb [15:08:30] hello! i'm exploring a bunch of records to see what predicates i might care about, and found something strange. in {{Q|15070048}}, Natasha Obama, my code is returning {{P|17}}, Country, with values for the US and Kenya. None of her family members I've checked have this particular predicate **and i can't find it in her wikidata page**. Am I just [15:08:30] missing something obvious, or is something else going on? [15:09:39] i really don't want my application listing out Kenya for her unless it's valid... [15:12:26] how is your code fetching the data? [15:14:05] in python, i'm using the wikidata library -> Entity -> attributes['claims'] and then listing the values for the predicates that appear [15:25:11] nikki: that is, while ingenious, but rather too much. [15:25:22] I don't understand what your code does, sorry :( I tried installing https://pypi.org/project/Wikidata/ and I don't know if that's the library you mean but for me attributes doesn't have a key called "claims" [15:25:22] What does `now()` return. [15:25:33] and you shouldn't be getting P17 for a person anyway [15:25:50] * acagastya really should not get into the entire date discussion now. [15:26:01] (unintentional pun) [15:26:04] now() returns a timestamp I think, but when subtracting it seems to give the number of days [15:26:31] nikki that's the library, yeah. if you load the entity with Entity(Identifier, load=True) do you see claims? [15:26:40] The value is current time's UNIX time stamp? [15:26:50] i've had an ent.attributes['claims'] for everyone i've tested [15:30:47] ohh oops, I typoed :D [15:31:21] i'm trying to upload my function to codepad but it's making me do a million captchas, sorry [15:31:54] no P17 though, this is what I see: https://pastebin.com/2DHsVdwW [15:34:34] oh weeeeird, it's because mine is loading the wrong page. it's giving me "Family Members of Barack Obama" [15:34:39] i'll have to fix that, thanks [15:37:12] i guess that leads to another question, is there a canonical way to retrieve an identifier given a name? i'm using a hack i found online that involves finding their wikipedia page and getting the associated item, but clearly that doesn't work :D [15:38:01] i've already hit limitations with it, like "Joe Biden" failing but "Joseph R. Biden" working, so it's no great loss to try another way. i just haven't found one [15:57:07] ...oh, the limitation seems the be that she doesn't have a wikipedia page of her own. that would do it. [15:58:48] Thanks for the help, nikki, [15:59:11] you're welcome :) [16:20:30] okay, this query seems to work pretty reliably (had to add instance-of human because Joe Biden has two entries, one for a character in the Onion) https://pastebin.com/kUwfxN7v [16:20:41] thanks for the assistance