Template talk:Infobox scientist/Wikidata

Suppress
Suppression of awards does not appear to be working properly - see this revision. Nikkimaria (talk) 20:01, 2 January 2018 (UTC)
 * suppressfields wasn't being passed through to Infobox person/wikidata - it is now. Thanks. Mike Peel (talk) 20:04, 2 January 2018 (UTC)
 * Thanks for the quick fix ! There is some discussion of the use of awards in this Infobox on Nikimaria's talk page, sorry perhaps I should have started the discussion here instead. D Wells (talk) 01:36, 3 January 2018 (UTC)

Thesis
Per the main infobox scientist, thesis title should be italicized, and would be nice to have the link on thesis. Nikkimaria (talk) 02:07, 3 January 2018 (UTC)
 * Hmm, adding italics is more tricky than I expected. any ideas? (see the edits I made to the template and have reverted - sorry, I should have used the sandbox, but I thought this would be trivial!) Thanks. Mike Peel (talk)
 * I've made the names  and  . You'll need to include them in each article's infobox's fetchwikidata if you're not using 'ALL'. Having them will also fetch , but I can't think of a scenario where that's unwanted behaviour. Optionally, you could call it  , but you'll have to remember that is what is needed for fetchwikidata.
 * You've hard-coded into the template, so it's only going to work for Simon Myers. You'll need to think again about what you want here. Or I've got to write a special call for you.
 * I've added italics. However, I need to suppress blank fields, so I'll write a utility to do that. Bear with me. --RexxS (talk) 17:35, 3 January 2018 (UTC)
 * Thanks a lot RexxS! I've removed the hardcoded pval, I think for now just the name of the thesis is sufficient, until I learn some Lua! D Wells (talk) 18:16, 3 January 2018 (UTC)
 * Sorry, I've reverted your change,, I was working on the code in an external editor and the differences were just too much to work out, as I needed a function (template) that blanked the field when it was nothing more than markup and space. That fixes the problem I had in Peter Coles where we had a Thesis label but no data. That's now implemented. I'll have another think about what Mike was trying to do. In the meantime, if you feel it's helpful to remove the hard-coded thesis, then please do so, but the infobox will work in the meantime if it's not altered – and it may be easier for Mike you to revise existing code.
 * OK, I've created a new utility function that you may find useful
 * It looks to see if there's anything in the parameter other than html tags, punctuation, or whitespace. If there is, it passes the parameter unchanged, otherwise it passes nothing. So you can stick your markup around Wikidata fetched items, and be sure that you won't get a blank item in the infobox if there's nothing on Wikidata. See if that helps. --RexxS (talk) 18:36, 3 January 2018 (UTC)
 * Thanks, I'll take a detailed look soon. Just to be clear, has been developing this template, I've just been lending the odd hand. :-) Thanks. Mike Peel (talk) 19:30, 3 January 2018 (UTC)
 * Okay, . At some point I need to work out the logic of fetching a qualifier from an unknown value of a property. I can see how it would work if there is only one value, but unless we're prepared to be vulnerable to Wikidatans legitimately adding other values for the given property, I can't see a good solution right now. --RexxS (talk) 19:44, 3 January 2018 (UTC)
 * It is possible using, e.g., ->  - but that doesn't fit in very easily with the WikidataIB setup. Maybe there's some code from there that could be reused? Thanks. Mike Peel (talk) 19:56, 3 January 2018 (UTC)
 * Of course it's possible, but how are we supposed to use:
 * The code is simple to write, but is it what we want for cases where the property has multiple values? Do we want a comma-separated list, hlist or ubl? How do you want to handle property values without that qualifier? Leave them out or put a dash inside the brackets, or what? Remember the code isn't just for fetching the url of a thesis. --RexxS (talk) 21:43, 3 January 2018 (UTC)
 * It looks to see if there's anything in the parameter other than html tags, punctuation, or whitespace. If there is, it passes the parameter unchanged, otherwise it passes nothing. So you can stick your markup around Wikidata fetched items, and be sure that you won't get a blank item in the infobox if there's nothing on Wikidata. See if that helps. --RexxS (talk) 18:36, 3 January 2018 (UTC)
 * Thanks, I'll take a detailed look soon. Just to be clear, has been developing this template, I've just been lending the odd hand. :-) Thanks. Mike Peel (talk) 19:30, 3 January 2018 (UTC)
 * Okay, . At some point I need to work out the logic of fetching a qualifier from an unknown value of a property. I can see how it would work if there is only one value, but unless we're prepared to be vulnerable to Wikidatans legitimately adding other values for the given property, I can't see a good solution right now. --RexxS (talk) 19:44, 3 January 2018 (UTC)
 * It is possible using, e.g., ->  - but that doesn't fit in very easily with the WikidataIB setup. Maybe there's some code from there that could be reused? Thanks. Mike Peel (talk) 19:56, 3 January 2018 (UTC)
 * Of course it's possible, but how are we supposed to use:
 * The code is simple to write, but is it what we want for cases where the property has multiple values? Do we want a comma-separated list, hlist or ubl? How do you want to handle property values without that qualifier? Leave them out or put a dash inside the brackets, or what? Remember the code isn't just for fetching the url of a thesis. --RexxS (talk) 21:43, 3 January 2018 (UTC)
 * Of course it's possible, but how are we supposed to use:
 * The code is simple to write, but is it what we want for cases where the property has multiple values? Do we want a comma-separated list, hlist or ubl? How do you want to handle property values without that qualifier? Leave them out or put a dash inside the brackets, or what? Remember the code isn't just for fetching the url of a thesis. --RexxS (talk) 21:43, 3 January 2018 (UTC)
 * The code is simple to write, but is it what we want for cases where the property has multiple values? Do we want a comma-separated list, hlist or ubl? How do you want to handle property values without that qualifier? Leave them out or put a dash inside the brackets, or what? Remember the code isn't just for fetching the url of a thesis. --RexxS (talk) 21:43, 3 January 2018 (UTC)


 * Thanks for your help RexxS. I'd be in favour of using ubl as a default, and where there isn't a qualifier leaving it without (not even brackets). This would match the current style of the non-Wikidata infobox awards section which I guess will be the main use for this function? Other uses could be qualifying net worth or revenue with the year which that should work fine with. It may be more difficult to apply this to other fields such as the spouse section, which usually uses the Template:Marriage, or fields where there might be both a start and an end year which we might want formatted something like "(1998-2006)" --D Wells (talk) 23:48, 3 January 2018 (UTC)
 * RexxS, that's where the infrastructure from WikidataIB would be useful, to configure those options. :-) Thanks. Mike Peel (talk) 06:39, 4 January 2018 (UTC)
 * Fair enough, and . As soon as I've managed to integrate the functionality of the sandbox into WikidataIB, I'll write a getValueWithQualifier function using the functionality of getValue in the sandbox. Perhaps that could eventually replace getValue simply by passing the parameter for the required qualifier? --RexxS (talk) 17:33, 4 January 2018 (UTC)

Doctorial advisor shown as Q-number if not in enwiki
If the doctorial advisor P184 is not present in enwiki, then currently the Q-number is shown, e.g. https://en.wikipedia.org/wiki/User:Zuphilip/infobox-scientist-wikidata. However, it should display just the name (string without link). This is AFAIS already the case for other other properties of the original template Template:Infobox_person/Wikidata, look for example for "spouse(s)" in the first example on the right. Can we do the same for doctorial advisor (and possibly other properties here)? --Zuphilip (talk) 21:46, 7 January 2018 (UTC)


 * If there's no name of the doctoral advisor, how do you suggest we get their name? In the case of, her was  => no English sitelink, no English label on Wikidata. Surely it's better to see that and fix it on Wikidata? --RexxS (talk) 23:43, 7 January 2018 (UTC)


 * Hi, this was because there was no english label (name) for the doctoral advisor for this entry in wikidata, rather than there being no enwiki article. I have added the label and it is now displaying the name (at least when you preview your talk page to allow the recent edit to be pulled in). D Wells (talk) 23:46, 7 January 2018 (UTC)
 * The code in WikidataIB actually looks for a sitelink for the host language first, and returns that as the link for any label it finds; if there is no en-wp sitelink, it returns the label unlinked (well, it actually then looks for a redirect that matches the label and links to that if it exists). If neither exist, it returns the Q-number as observed. I still maintain that is the best we can do, as it encourages editors to add missing information to Wikidata. --RexxS (talk) 01:16, 8 January 2018 (UTC)
 * Interesting thanks RexxS! Yes true and a label is quite easy to add. Whilst we're on the topic of labels is there a way to filter wikidata values by the presence of a en-wp sitelink? I'm thinking for example the case of the field doctoral student (P185) (&Student P802 & Awards), typically only people with their own en-wp article are allowed in this field, which means if there are other students for this property in wikidata then we can't pull in the names from wikidata. Perhaps if this feature doesn't exist we could add it to the to-do list, perhaps something like onlywikilinked=yes in a similar fashion to onlysourced? D Wells (talk) 01:47, 8 January 2018 (UTC)
 * Thank you both for the explanation and adding the English label. I haven't checked it carefully enough. Yes, the current method makes sense. Zuphilip (talk) 05:58, 8 January 2018 (UTC)
 * In other languages this is handled by fall-back languages: e.g., if the Portuguese label isn't present, then the English one is shown instead. However, English is the last fall-back language, so there are no fall-backs available for us, hence the Q-codes. But on the flip side, add an English label (particularly for names, where translation doesn't happen), and you help fix the absence of that info across other language Wikipedias as well. Thanks. Mike Peel (talk) 07:09, 8 January 2018 (UTC)
 * Thanks,, that's a good point, and another reason to encourage en-wiki editors to edit Wikidata, as our comparatively large pool can help make a big difference to other language wikis.
 * I think I could include a yes/no parameter, that would determine whether to include only linked items (default to no). However, I'm very busy mentoring Google Code-in for the next week or so, and I've already got a backlog of work on WikidataIB from the previous thread! It might take a while. --RexxS (talk) 15:36, 8 January 2018 (UTC)
 * That would be great, thanks! No worries, whenever you find the time is much appreciated :) D Wells (talk) 11:45, 9 January 2018 (UTC)
 * In other languages this is handled by fall-back languages: e.g., if the Portuguese label isn't present, then the English one is shown instead. However, English is the last fall-back language, so there are no fall-backs available for us, hence the Q-codes. But on the flip side, add an English label (particularly for names, where translation doesn't happen), and you help fix the absence of that info across other language Wikipedias as well. Thanks. Mike Peel (talk) 07:09, 8 January 2018 (UTC)
 * Thanks,, that's a good point, and another reason to encourage en-wiki editors to edit Wikidata, as our comparatively large pool can help make a big difference to other language wikis.
 * I think I could include a yes/no parameter, that would determine whether to include only linked items (default to no). However, I'm very busy mentoring Google Code-in for the next week or so, and I've already got a backlog of work on WikidataIB from the previous thread! It might take a while. --RexxS (talk) 15:36, 8 January 2018 (UTC)
 * That would be great, thanks! No worries, whenever you find the time is much appreciated :) D Wells (talk) 11:45, 9 January 2018 (UTC)
 * That would be great, thanks! No worries, whenever you find the time is much appreciated :) D Wells (talk) 11:45, 9 January 2018 (UTC)
 * That would be great, thanks! No worries, whenever you find the time is much appreciated :) D Wells (talk) 11:45, 9 January 2018 (UTC)

Default fetchwikidata parameter?
Would it be possible to effectively have the default parameter of fetchwikidata be "ALL"? That way it by default builds an infobox but can still be overridden by either providing specific items in fetchwikidata or suppressfields or by providing parameters for any of the specific fields. Currently, just adding on its own just gives a blank infobox, which I'd think is essentially never what the user is intending. T.Shafee(Evo &#38; Evo)talk 06:03, 20 June 2019 (UTC)
 * this should have done what you want. The reason it's not on by default in Infobox person/Wikidata is so that it can be merged into Infobox person at some point. However, as this template is a wrapper, the default behaviour here can be changed without problem. Thanks. Mike Peel (talk) 06:28, 20 June 2019 (UTC)
 * Ah that makes sense - thanks! I'll be interested to see how the wikidata infobox discussion evolves over the next few years based on th experiences of the testcases. T.Shafee(Evo &#38; Evo)talk 06:33, 20 June 2019 (UTC)

Thesis url
Template:Infobox scientist has a field for thesis_url (like Template:Infobox academic). Would it be possible to change the infobox template to call in the url from Wikidata?

For example, the article on Wendy Carlin lists her thesis but doesn't include a link to the open access version at https://ora.ox.ac.uk/objects/uuid:b8e58734-be29-474f-9a56-80d906add35d though it is stored in the Wikidata item on the thesis itself with the property P953. Richard Nevell (WMUK) (talk) 16:26, 6 November 2019 (UTC)

Infobox academic/wikidata
Currently template:Infobox academic/wikidata redirects here. I've edited "Scientific career" -> "Academic career" as subheading but the questions are: T.Shafee(Evo &#38; Evo)talk 23:53, 26 April 2021 (UTC)
 * Are there cases where Infobox scientist is used where "Academic career" is inappropriate? Alternatives: "Academic/reserach career" or just "Career"?
 * Are there any fields that template:Infobox academic would have that template:Infobox scientist/wikidata doesn't populate?
 * Should the templates be separate or is the redirect sufficient?

Field of work 'Stated as'
Thinking about the field, it's common for these to have a  qualifier when the exact text match wasn't present in wikidata (or there is some perceived difference between alias synonyms). Perhaps when a "stated as" qualifier is present on a "field of work" statement, the text of the "stated as" can be used in the infobox? T.Shafee(Evo &#38; Evo)talk 12:09, 28 December 2021 (UTC)

field of work is not appearing as expected
Shouldn't field of work appear when data is present in Wikidata? Trilotat (talk) 15:14, 5 July 2023 (UTC)

Thesis causes links in links lint error
Jay Shendure's infobox generates a Links in links lint error. The markup is

and ExpandTemplates plus lintHint shows the offending markup is

I searched Wikidata at random for another entry with the "academic thesis" parameter filled in, but I didn't find any. If thesis_url is blanked, the lint error goes away, but then the thesis isn't linked. Anyway, this is all too esoteric for me and I leave it for the experts to address the issue. —Anomalocaris (talk) 08:36, 11 August 2023 (UTC)
 * I stumbled upon Peter Osborne (philosopher), whose infobox provides his thesis title and URL. I went to his Wikidata page and attempted to add the academic thesis there. Compared to Wikipedia, this page has a strange interface. I found "add statement" at the bottom of the page. I clicked on that, then entered "academic thesis" in the first field, then I entered "The carnival of philosophy : philosophy, politics and science in Hegel and Marx" (with and without a trailing period) and "publish" is grayed out. Then I added 1 Reference with reference URL "https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.253269". "publish" is still grayed out. How do I get "publish" to be clickable? Do I have to first create the thesis in Wikidata as a separate entry before I can add it to this entry? —Anomalocaris (talk) 09:38, 11 August 2023 (UTC)
 * Two things: 1. I fixed it by setting noicon to "on" for the thesis title. There might be a better way to show the icon without it being rendered inside the URL. 2. A strange coincidence: I have spoken to Jay Shendure in person, more than thirty years ago. It's a small world. – Jonesey95 (talk) 00:17, 15 August 2023 (UTC)
 * Jonesey95: Hmm, the lint error has gone away, but it used to display the thesis title, with hyperlink to the proquest page. Now it displays the proquest URL, which is not as good. I am still hoping that someone can tell me how to edit a Wikidata page, adding a thesis where there isn't one already. —Anomalocaris (talk) 07:48, 15 August 2023 (UTC)
 * ??? I'm seeing "Thesis	Multiplex genome sequencing and analysis (2005)". "Thesis" is bold, and the title is hyperlinked to the Proquest page. I'm pretty sure the only thing I changed was removing the edit pencil. You can edit the person's Wikidata entry by clicking "Wikidata item" in the right sidebar (or wherever it is in your preferred skin). As for adding a thesis in Wikidata, I can't help. That interface is a mystery to me. – Jonesey95 (talk) 13:47, 15 August 2023 (UTC)


 * Jonesey95: Ah, it looks fine in Jay Shendure, but to the right is the display of the above markup after adding the name. As you would say, "???" —Anomalocaris (talk) 17:51, 15 August 2023 (UTC)
 * If you use the template on a different page, you need to override the default link to the desired Wikidata source page by using qid, as shown to the right.


 * Wikidata has always been a thorny mess whose underlying philosophy I do not understand. I try to stay away from it. It causes all sorts of inconsistencies that are difficult to detect without manual inspection of its uses. See, for example: "Born Solon", which is sorely lacking in detail due to the design of the infobox, Wikidata, or both. Who knows where Solon is? Not many people aside from Dr. Shendure. – Jonesey95 (talk) 20:19, 15 August 2023 (UTC)