This is an archive of past discussions with User:Mike Peel. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
Upcoming: EuropeanaTech and Wikidata Workshop Day for GLAMs, Rotterdam (NL), Monday 14 May. A day of GLAM-related workshops around Wikidata and Structured Commons, for beginners and advanced users.
New search code for Wikidata merged. You may notice the improvement in the search results output for Wikidata item. However, new code for search is not enabled, only new results format. The search code will be enabled next week.
Improving formatting of language and lexical category in diff for Lexemes (phab:T189679)
Thanks for the OK! Still got some bespoke images to upload but the article is on its way. Will ask for astronomy peer review soon. Richard Nowell (talk) 09:41, 30 March 2018 (UTC)
Suggestions for removing reviews already used in articles
Hi Mike,
I hope that you are well. I have had a chance to clean up the cochrane bot page. It seems to be running smoothly and I am now on top of it :) You did a great job!
Do you have any suggestions on a way that I can remove reviews from my new review list that are already used in Wikipedia? The list is of about 5000 PMIDs. I am getting quite a few new volunteers, but we are noticing that a good number of the reviews have already been added to Wikipedia but are not marked as "done".
I can search individually via PMID using a regular "search" query and remove them automatically, but this would not work for 5000.
@JenOttawa: It would be relatively straightforward to modify the bot to output a list of PMIDs that are currently in use, would that be useful? A step beyond that would be to then have some code to compare the two lists, and add done tags accordingly, but we should probably first check the data quality. Thanks. Mike Peel (talk) 11:32, 22 March 2018 (UTC)
Hi Mike,
A list of cochrane review PMIDs that are currently in use in Wikipedia articles would be very very helpful. Do you have time to help with this? I feel badly asking for more favours as you have been so helpful already with the update bot. Thanks for getting back to me so quickly! JenOttawa (talk) 17:14, 22 March 2018 (UTC)
Hi Mike, I am gaining quite a few new skills writing queries in Access. I think I should be able to cross-reference two lists now and remove already used PMIDs. If you have the time and are able to help build a list of all reviews presently in en:WP, or can direct me on how to figure this out, that would be great! A list of PMIDs would be the best for my beginner database skill-set as I have not figured out how to batch convert DOIs to PMIDs. Thanks again, Jenny. JenOttawa (talk) 16:40, 28 March 2018 (UTC)
Thanks Mike, if you do not mind me asking, when was this list of PMIDs generated? Is it regenerated each month for the bot? Now I get to practice / learn my new access skills. I greatly appreciate all your help! Hope that you have a really nice long weekend. JenOttawa (talk) 00:35, 31 March 2018 (UTC)
@JenOttawa: It was generated immediately before it was posted. I ended up writing a new bit of code, which is here; it runs a lot quicker than the main bot since it's not loading the pages from pubmed. If that's useful, then I can add it to the main bot code. The page is close to the maximum size allowed, though, so it will run into problems in the future. It might be better if I reordered it by article and then listed the PMIDs afterwards, as that would generate a smaller pagesize, if that would still work for you. Thanks. Mike Peel (talk) 09:46, 31 March 2018 (UTC)
Wikidata infoboxes
Hi Mike! A while ago, I left a message asking about any pointers you'd have on transitioning infoboxes to being supported by Wikidata, since I saw that you had done some work in the area. I'm sure you've been busy, but if you've not quite got time to walk me through the entire process, could you suggest someone else who you think might know? Thanks! Kevin (aka L235·t·c) 16:16, 28 March 2018 (UTC)
@L235: Apologies for not replying sooner. I would suggest setting up a "/wikidata" copy of the template and then just trying things out by previewing that on a few pages that use the template. The first thing to do is to identify the properties that correspond to the infobox parameters. Then, try using Module:WikidataIB to include them in the infobox, and have a look at the code used at Template:Infobox telescope for practical examples. In most cases, you'll be changing {{{PARAMETER|}}} to {{#invoke:WikidataIB|getPreferredValue|WIKIDATA_PROPERTY|name=PARAMETER|qid={{{qid|}}}|sep="<br />"|sorted=yes|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{PARAMETER|}}}}}, where "PARAMETER" is the template parameter name, and "WIKIDATA_PROPERTY" is the Wikidata property ID. But for more complex cases, there are nuances, and you'll need to look at the documentation at Module:WikidataIB to figure out what to do. I'm happy to help with issues as they arise. Thanks. Mike Peel (talk) 23:15, 28 March 2018 (UTC)
Administrators who have been desysopped due to inactivity are now required to have performed at least one (logged) administrative action in the past 5 years in order to qualify for a resysop without going through a new RfA.
Editors who have been found to have engaged in sockpuppetry on at least two occasions after an initial indefinite block, for whatever reason, are now automatically considered banned by the community without the need to start a ban discussion.
There will soon be a calendar widget at Special:Block, making it easier to set expiries for a specific date and time.
Arbitration
The Arbitration Committee is considering a change to the discretionary sanctions procedures which would require an editor to appeal a sanction to the community at WP:AE or WP:AN prior to appealing directly to the Arbitration Committee at WP:ARCA.
Miscellaneous
A discussion has closed which concluded that administrators are not required to enable email, though many editors suggested doing so as a matter of best practice.
The Foundations' Anti-Harassment Tools team has released the Interaction Timeline. This shows a chronologic history for two users on pages where they have both made edits, which may be helpful in identifying sockpuppetry and investigating editing disputes.
This monthly newsletter showcases the Wikipedia Education Program. It focuses on sharing: your ideas, stories, success and challenges. You can see past editions here. You can also volunteer to help publish the newsletter. Join the team! Finally, don't forget to subscribe!
A new version of Denelezh, a tool to monitor the gender gap in Wikidata, has been released, including a new methodology to produce the data (explained at the top of the main page and in the documentation), and an overview of the gender gap by Wikimedia project.
Thank you for your help generating a list of PMIDs for the Cochrane work. Your assistance is greatly appreciated! JenOttawa (talk) 01:41, 9 April 2018 (UTC)
Just a heads-up that I'm in the middle of a major overhaul of Module:WikidataIB. The sandbox now has new code and extended functionality. You may like this bit: I've introduced some 3-letter abbreviations for convenience, and created a wrapper template for the getValue call. That could save you a few keystrokes and improve readability. See Template talk:Wdib. I'll update the main module and eventually the Commons module (although I can't just copy-paste there because of other edits) after I'm happy with testing in the sandbox. --RexxS (talk) 15:17, 8 April 2018 (UTC)
Yer, well, I'm pretty unlikely to alter the main template while the RfC's running (which is one reason why {{wdib}} uses WikidataIB/sandbox for now). I'm growing to like {{wdib|P106|qid=Q42|fwd=ALL}} → screenwriter, novelist, science fiction writer, writer, musician the more I use it. --RexxS (talk) 19:18, 11 April 2018 (UTC)
@RexxS: Good to know! I don't suppose, while you're doing the big rewrite, you'd be able to add in support for showing qualifiers in brackets after the values, so we could show things like date ranges in lists of employers/release dates/etc.? That's probably top of my wishlist at the moment, and would be particularly useful with the Commons work. It's supported by Module:Wd, so I could use that instead, but I'd prefer to keep everything using WikidataIB if possible. Thanks. Mike Peel (talk) 21:48, 11 April 2018 (UTC)
How do you want the support, Mike? Do you want a new function, or an extra parameter to the existing ones? Do you want all the qualifiers for every value of a property? or do you want to be able to specify the particular kinds of qualifier that you want to match? If the latter, how will you deal generically with the possibility that some articles may have point in time (P585), while others will have start time (P580) and end time (P582)?
Have a look at Geneva (Q71) as an example of an article that has a range of qualifiers. I assume you would want to have capital of (P1376) sorted by start date, not the easiest of tasks. Let me know if you have some examples in mind, because it's easier for me to code when I have a good grasp of exactly what's wanted. --RexxS (talk) 00:49, 12 April 2018 (UTC)
As an aside, if you're interested in a more powerful function, you might want to have a look at getValueQualIndirect in my sandbox, Module:RexxS:
getValueQualIndirect scans a property prop1 in the current page (or another page if qid is given)
for each value of the property that is a wikibase item, it fetches all of the values of prop2
and for each value of prop2 it also retrieves each qualifier and its value
Starting with Geneva (Q71), get all the values of country (P17), and for each value that's an article, get all of the values that it's an instance of (P31) and all of their qualifiers:
Switzerland + state ++ start time = 1 August 1291 ++ sourcing circumstances = circa + landlocked country + confederation ++ start time = 10 March 1803 ++ end time = 7 August 1815 + Federal Treaty ++ start time = 7 August 1815 ++ reason for deprecated rank = anachronism ++ end time = 16 November 1848 + federation ++ start time = 16 November 1848 + Helvetic Republic ++ start time = 12 April 1798 ++ reason for deprecated rank = anachronism ++ end time = 10 March 1803 + sovereign state ++ start time = 16 November 1848 ++ end time = no value + country
First French Empire + historical country ++ start time = 1815 + empire + regime
Republic of Geneva + sovereign state ++ start time = 1534 ++ end time = 26 April 1798 + sovereign state ++ start time = 31 December 1813 ++ end time = 19 May 1815 + historical country
Republic of Geneva + sovereign state ++ start time = 1534 ++ end time = 26 April 1798 + sovereign state ++ start time = 31 December 1813 ++ end time = 19 May 1815 + historical country
French First Republic + historical country ++ start time = 1804 + sovereign state ++ end time = 1804 + republic regime in France
The display can be customised; the above is just for demo purposes. It's potentially a very expensive call, but that's the sort of functionality we're going to need in the future. --RexxS (talk) 00:49, 12 April 2018 (UTC)
More updates
Back to the original request. How does this look for starters?
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71}} → Canton of Geneva, Léman, Republic of Geneva, Republic of Geneva
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL}} → Canton of Geneva (1815–), Léman (1798–1813), Republic of Geneva (1534–1798), Republic of Geneva (1813–1815)
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P580}} → Canton of Geneva (1815–), Léman (1798–), Republic of Geneva (1534–), Republic of Geneva (1813–)
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=P582}} → Canton of Geneva, Léman (–1813), Republic of Geneva (–1798), Republic of Geneva (–1815)
It needs the list of qualifiers returned to be passed through the output function that implements lists, separators, etc. but that's an easy job now. So you need to find an example of where you're actually going to use it so I can see what else is needed. I expect we'll have to pass a parameter |qtxt= to supply a bit of text that goes before the qualifiers. See what you think. --RexxS (talk) 23:56, 12 April 2018 (UTC)
Even better:
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=DATES}} → Canton of Geneva (1815–), Léman (1798–1813), Republic of Geneva (1534–1798), Republic of Geneva (1813–1815)
{{#invoke:WikidataIB/sandbox1 |getValue |P1376 |fwd=ALL |osd=no |qid=Q71 |qual=ALL |sep=" or " |qsep=" to "}} → Canton of Geneva (1815–) or Léman (1798–1813) or Republic of Geneva (1534–1798) or Republic of Geneva (1813–1815)
I've upgraded getValue in the sandbox to duplicate the functions getPreferredValue and getNormalValue by using the |rank= parameter. --RexxS (talk) 18:49, 14 April 2018 (UTC)
Wikidata weekly summary #308
Here's your quick overview of what has been happening around Wikidata over the last week.
Hey, we already have a category to track articles with no image having image on Wikidata. Is it technically possible to add a tracker which can find out the instances of "articles having image different from the one specified on Wikidata". Ping Frietjes and RexxS too User:Capankajsmilyo(Talk | Infobox assistance)05:29, 18 April 2018 (UTC)
@Capankajsmilyo: try using {{Replace}} to look for 'File:', 'file:', 'Image:' and 'image:', and replace them with nothing before you compare with Wikidata. BTW, there are cases where there are images on Wikidata for articles here that don't have infoboxes, e.g. Michael Reid (Q17157228) - I have no idea how to auto-catch those! Thanks. Mike Peel (talk) 10:41, 18 April 2018 (UTC)
WikiWorkshop, a forum bringing together researchers exploring all aspects the Wikimedia projects, in Lyon, April 24th. Seven papers related to Wikidata will be presented.