Template talk:Institution/2018
This is an archive of past discussions. 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. |
Rewrite based on Module:Institution/sandbox and Wikidata
Hi, lately I was working on Module:Institution/sandbox which is based on Module:Creator and rewrites the template using Lua code. New template would also be able to access Wikidata and pull all the data from there if the data is not provided. For example compare:
{{Institution:Louvre}}
Louvre Museum (Inventory) | |||
---|---|---|---|
Native name | Louvre Museum | ||
Location | |||
Coordinates | |||
Established | 10 August 1793 | ||
Website | www.louvre.fr | ||
Authority file |
{{Institution/sandbox | Wikidata = Q19675 | inventory = Musée du Louvre:Inventory}}
Louvre Museum (Inventory) | |||
---|---|---|---|
Native name | Louvre Museum | ||
Location | 1st arrondissement of Paris , France | ||
Coordinates | |||
Established | 10 August 1793 | ||
Website | www.louvre.fr/es | ||
Authority file |
The first one is the current institution template and the second one shows the data pulled from Wikidata. New template will also create maintenance categories that would allow us to compare data on Commons with data on Wikidata. Please check templates that currently use the new code and see if there are any issues with it. I will do more testing but, if there are no issues I will deploy it. --Jarekt (talk) 18:37, 9 February 2018 (UTC)
- @Jarekt: very nice. Tried it for a couple of institutions and only found a minor thing: Can you please make the image a bit bigger? Multichill (talk) 20:55, 9 February 2018 (UTC)
- Will do--Jarekt (talk) 21:04, 9 February 2018 (UTC)
- @Jarekt: Thanks, looks better. Commons:WikiProject sum of all paintings/Institutions contains some quite interesting edge cases. Multichill (talk) 11:53, 10 February 2018 (UTC)
- Will do--Jarekt (talk) 21:04, 9 February 2018 (UTC)
Module:Institution version of the template is live now
Module:Institution version of the template is live now. Please report all the issues below. Please ping me. --Jarekt (talk) 15:31, 12 February 2018 (UTC)
- @Jarekt: d:User:DeltaBot/fixClaims/jobs lines 876–882 (for organization (Q43229)) is fighting against Module:Institution line 356, e.g. here. --Marsupium (talk) 13:59, 16 February 2018 (UTC)
- Also concerning coordinates: 100 is quite much in line 349
d<100
. If the coordinates differ by 50 or even 30 meters it's worth checking them I think, there will be a lot of buildings of our institutions here that are smaller than 100 meters in their largest diameter. What about addingd
as a sortkey to Category:Institution templates with Wikidata link: mismatching coordinates and/or putting it behind the coordinates somehow like this<div id="com-wd-diff-coord" style="display: none"> (difference: dmeters)</div>
so that the difference can be displayed for everyone who wants that? --Marsupium (talk) 13:59, 16 February 2018 (UTC) - @Jarekt: There is some problem with the names, cf. Category:Institution templates without name and Institution:Staatsgalerie im Neuen Schloss (Schleißheim) which doesn't appear in the category for me now. --Marsupium (talk) 21:21, 16 February 2018 (UTC)
In case, someone is wondering about new maintenance categories in Category:Institution template maintenance. If the Wikidata values are known, than the new template compares Institution template data with Wikidata info and looks for issues. As in case of Category:Creator template maintenance, there are several types of categories:
- missing (for example Category:Institution templates with Wikidata link: item missing coordinates) list cases where information is present on Commons and missing on Wikidata. There is often an option to copy information to Wikidata
- mismatching (for example Category:Institution templates with Wikidata link: mismatching coordinates) list cases where information on Commons mismatch info on Wikidata. Those should be reconciled.
- redundant (for example Category:Institution templates with Wikidata link: redundant homecat ), lists cases where info on Commons matches info on Wikidata. Those values could be removed without changing the information displayed by the template. Removal de-clatters the wikicode and makes it easier to see things that do not match.
At the moment the template prefers Commons content and displays Wikidata content only if info is missing on Commons. As a result, filled name field on Commons with no or few translations or links might be blocking creation of label based on Wikidata which might or might not be better. Same with other fields, badly filled fields might block better info from Wikidata. On the other hand, hand-crafted Commons data might be more informative than data from Wikidata and those fields should not be removed. --Jarekt (talk) 19:02, 13 February 2018 (UTC)
- I think it would be preferable to actually compare local and Wikidata data for the website and have Category:Institution templates with Wikidata link: mismatching website. I can imagine that comparing isn't all that easy, but then I'd prefer to get them sorted to the mismatch rather than the redundant category so that we do not delete valuable data inadvertently.
- (BTW: It would also be nice if language of work or name (P407) qualifiers to official website (P856) would be used for i18n so that we can delete this data e.g. from Institution:Musée de l'Armée.) --Marsupium (talk) 13:35, 15 February 2018 (UTC), 13:39, 15 February 2018 (UTC)
- Ok, I guess you are right. I just heave higher confidence that wikidata websites are still alive. My random sampling of some of websites in Category:Institution templates with Wikidata link: item missing website reviled many dead links. The current version of Module:Institution/sandbox tags fields as "redundant" if:
- they are identical for 'established', 'website', 'native name', image, linkback and homecat
- redundant coordinates are within 100 meters
- redundant names if wikidata has english version
- redundant location if located in the administrative territorial entity (P131), headquarters location (P159) or location (P276) are set, without comparison
- I will work on using language of work or name (P407) qualifiers to official website (P856). Any other improvements that could be made. BTW, I am introducing a new option field which, similar to option in {{Creator}} could be used to add text after the name string. For example
{{Institution:SUD Salon Urbain de Douala|2007 (or any other string)}}
would show up as
- Ok, I guess you are right. I just heave higher confidence that wikidata websites are still alive. My random sampling of some of websites in Category:Institution templates with Wikidata link: item missing website reviled many dead links. The current version of Module:Institution/sandbox tags fields as "redundant" if:
SUD Salon Urbain de Douala | |||
---|---|---|---|
Native name | SUD Salon Urbain de Douala | ||
Location | Douala, Cameroon | ||
Established | 2007 | ||
Website | http://www.doualart.org/spip.php?rubrique3 | ||
Authority file |
|
.
- I would use it for templates in Category:Institution templates with mismatching linkback. --Jarekt (talk) 14:47, 16 February 2018 (UTC)
- Thank you for all improvements!
- I've also already stumbled upon the pages in Category:Institution templates with mismatching linkback. I'm not sure if a new option parameter is the way to go. The established way for that use case at least for the {{Artwork}} template family is the
|department=
parameter. I'd prefer to migrate the four cases of Category:Institution templates with mismatching linkback to that established way. --Marsupium (talk) 19:16, 16 February 2018 (UTC)- I agree those 4 cases would be solved better by the use of
|department=
parameter. Maybe indeed that is the way to go. Adding department name after the template will show in exactly the same way as adding|department=
parameter, but as we will be switching to using Wikidata with Artwork templates, it might be better to have fewer special cases. The still undocumented option field allows greater flexibility with templates like Institution:SUD Salon Urbain de Douala 2013 (which shares item with Institution:SUD Salon Urbain de Douala and 2 other templates). Although I many of it's issues are still not resolved and the best option might be to just use single Institution:SUD Salon Urbain de Douala + department or to have 4 wikidata items. So in the end we might not need option field. --Jarekt (talk) 03:44, 20 February 2018 (UTC)
- I agree those 4 cases would be solved better by the use of
- I would use it for templates in Category:Institution templates with mismatching linkback. --Jarekt (talk) 14:47, 16 February 2018 (UTC)
Evaluate located at street address (P969)!
For the location field we should evaluate P969 (P969) (and possibly located on street (P669), house number (P670) and postal code (P281) though this requires a lot of reasoning, but has i18n and links) I think. Then we can remove this information from for instance Institution:ModeMuseum Provincie Antwerpen. Template:Wikidata Infobox also uses P969 (P969) (and does a bad job in using postal code (P281)). Cheers, --Marsupium (talk) 10:40, 26 March 2018 (UTC)
Evaluate end time (P528) qualifiers
… to located in the administrative territorial entity (P131) statements. This is necessary e.g. for d:Q6581530#P131. The qualifier should perhaps be used to filter values of parent organization (P749), official name (P1448) and location (P276) as well. Cheers, --Marsupium (talk) 12:16, 26 March 2018 (UTC)
Geopoly
Even though this parameter is listed as valid, I found a case where its use caused the Institution to be included in Category:Institution templates with unknown parameter. The geopoly data seems to be properly formatted. I had a look inside the module and couldn't find any reason for this behaviour; maybe the different spelling "GeoPoly" in line 295? Capmo (talk) 15:46, 24 April 2018 (UTC)
- Fixed "GeoPoly" was mistyped in line 295 as all arguments are lowercase at this stage. Unfortunately GeoPoly no nonger show up as the server no longer works, see {{GeoPolygon}}. --Jarekt (talk) 20:53, 24 April 2018 (UTC)
- Thanks! Capmo (talk) 12:16, 25 April 2018 (UTC)
"Option" parameter
One difference between Creator templates and Institution templates is that Creator templates always have "Option" parameter used to pass information from the pages in Creator namespace to the actual {{Creator}} template. There was a proposal to improve the control when templates are collapsed or uncollapsed by default. In order to do so we would need to send information from the pages in Institution namespace to the actual {{Institution}} template. In order to do so I am planning to add "| Option = {{{1|}}}
" to all the pages in the Institution namespace. --Jarekt (talk) 11:20, 1 May 2018 (UTC)
- Done --Jarekt (talk) 13:03, 4 May 2018 (UTC)
- @Jarekt: Can you please update the documentation page and explain what
|Option=
does? De728631 (talk) 13:52, 29 May 2018 (UTC)- Done --Jarekt (talk) 15:32, 29 May 2018 (UTC)
- @Jarekt: Can you please update the documentation page and explain what
Subcategory parameter
Where the institution template is used for autocategorisation as in "Category:Images from ...", it would be convenient to have a parameter to add the full or partial name of any desired subcategory of the institution's home category. Otherwise overcategorisation will occur if the individual files are categorised manually as well. The option parameter as implemented by Jarekt can so far only be used to control the collapse status of the template, so I suggest to add an additional |subcat=
. De728631 (talk) 14:01, 29 May 2018 (UTC)
- Institution template should not be used to add any categories to images, due to potential for overcategorisation. I usually add a category to all the images using such template and remove autocategorisation from the template. --Jarekt (talk) 15:35, 29 May 2018 (UTC)