Jump to content

Template talk:Infobox lighthouse

From The Democratika Wiki

Template:WikiProject banner shell Template:Todo User:MiszaBot/config Template:Archives

Use of wikidata

I am reviewing the use of Wikidata in this template, and considering whether any other fields can be fetched. — Martin (MSGJ · talk) 21:16, 1 March 2021 (UTC)

Field Properties Status
Title label checkY 2017
Image Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P18), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2096) checkY 2017
Location Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P706), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P276), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P131), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P17) checkY 2017
Coordinates Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P625) checkY 2017
Automated Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P793) - Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (Q24410992) / Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P585) checkY 2017
Deactivated Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P730) checkY 2017
Tower shape Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1419) checkY 2017
Tower height Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2048) checkY 2017
Focal height Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2923) checkY 2017
Range Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2929) checkY 2017
Characteristic Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1030) checkY 2017
Racon Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3994) checkY 2017
Managing agent Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P137) checkY 2017
Heritage Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P1435) checkY 2017
OS grid Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P613) Template:Done
Year first constructed Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P571) Template:Done
Year first lit Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P729) Template:Done
Intensity Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3041) Template:Done
Light source Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P618) N not the same
Admiralty number Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3562) Template:Done
NGA number Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3563) Template:Done
ARLHS number Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P2980) Template:Done
USCG number Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3723) Template:Done
Construction Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P186) Template:Done
Markings/pattern Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P462), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P5422) Template:Done
Built by Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P287), Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P193) Template:Done
CCG number Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3920) Template:Done
Lens Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P9597) Template:Done} May 2021

Additional identifiers

Is there interest in adding any of the following identifiers to the infobox? — Martin (MSGJ · talk) 21:59, 1 March 2021 (UTC)

My personal opinion is that these kinds of identifiers should generally be kept to a minimum in the infobox, because they are not human-readable. However I think country specific identifiers could be useful for lighthouses from those specific countries, and if the identifier links to a reliable source of information for that lighthouse (e.g. NGA) then that is quite useful for verifying details. — Martin (MSGJ · talk) 11:07, 2 March 2021 (UTC)

Year first constructed

If a lighthouse takes several years to construct (not unusual) should this field record the start of construction or the end of construction? — Martin (MSGJ · talk) 16:35, 2 March 2021 (UTC)

I don't know if anyone else is watching and would like to comment? My opinion is that "Constucted" should logically give the date of start of construction. If it was the end of construction, then it would in most cases coincide with the "First lit" field. — Martin (MSGJ · talk) 14:26, 4 March 2021 (UTC)

Light source

What kind of values does this field take? I would be interested to see some examples of it in use. I suspect it is not equivalent to Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P618) (which would be solar power/battery for most lighthouses nowadays) — Martin (MSGJ · talk) 16:48, 3 March 2021 (UTC)

Template:Ping would you be able to explain your reasoning for adding this field to the infobox, and give some examples of its use? And if possible, could the documentation be for this parameter be made clearer? Thanks — Martin (MSGJ · talk) 08:48, 11 March 2021 (UTC)
I think the best list of options comes from the series of light sources I put on the South Gare Lighthouse page: Paraffin wick lamp, Pressurised paraffin burner, Tungsten filament lamp, CDM T lamp, High intensity LED lamp.
The trouble is that most of these are obsolete and I suspect only a limited range of sources are used today. As for the reasoning it's a matter of documenting and characterising the lighthouse. As you suggest the 'Power source' might also be a good one to have and this might take values like: Mains electricity, Hydrogen fuel cell, Photovoltaic cells. I'm not confused about what |lightsource is but I think the examples should clear up any confusion there may be. Anyway I've modified the Usage part and I hope all concerned are happy with it. I note that there's a lot of red warnings on the preview page - I don't think that has anything to do with me. Stuffed Cat (talk) 02:30, 13 March 2021 (UTC)
Thanks for the clarification Stuffed cat. That is a really nice comprehensive article there, and well sourced! I think a list of possible values would be useful. It won't be exhaustive, but should guide editors. — Martin (MSGJ · talk) 10:09, 13 March 2021 (UTC)

In my experience most uses of this field are using it incorrectly. The most common value is "solar power" or occasionally "mains power", which is of course not the "light source" but the "power source". I am proposing to add a new field to the infobox called Power source and get its data from Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P618). I will look into whether the erroneous values in |lightsource= can be transferred over in due course. — Martin (MSGJ · talk) 09:14, 1 April 2021 (UTC)

I have created Category:Solar powered lighthouses using wrong field to find articles where editors have wrongly used "solar powered" in the "light source" field. I plan to move these over to the "power source" field instead. — Martin (MSGJ · talk) 12:49, 21 May 2021 (UTC)
This is now Template:Done — Martin (MSGJ · talk) 11:50, 16 June 2021 (UTC)

Qualifiers

The infobox will now recognise some qualifiers from Wikidata. For example: Template:Statement+Template:Statement+

Lua error in package.lua at line 80: module 'Module:i18n' not found.Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in Module:Infobox_mapframe at line 166: attempt to index field 'wikibase' (a nil value).
LocationLua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found., {{#Property:P17|from= }} Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
OS gridLua error in package.lua at line 80: module 'Module:i18n' not found.
CoordinatesLua error in package.lua at line 80: module 'Module:i18n' not found.
Expression error: Unexpected < operator.
ConstructedLua error in package.lua at line 80: module 'Module:i18n' not found.
Designed byLua error in package.lua at line 80: module 'Module:i18n' not found.
Built byLua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found.
ConstructionLua error in package.lua at line 80: module 'Module:i18n' not found.
AutomatedLua error in package.lua at line 80: module 'Module:i18n' not found.
HeightLua error in package.lua at line 80: module 'Module:i18n' not found.
ShapeLua error in package.lua at line 80: module 'Module:i18n' not found.
Markingswhite (tower), black (lantern)
Power sourceLua error in package.lua at line 80: module 'Module:i18n' not found.
OperatorLua error in package.lua at line 80: module 'Module:i18n' not found.
HeritageLua error in package.lua at line 80: module 'Module:i18n' not found.
RaconLua error in package.lua at line 80: module 'Module:i18n' not found.
Light
First litLua error in package.lua at line 80: module 'Module:i18n' not found.
DeactivatedLua error in package.lua at line 80: module 'Module:i18n' not found.
Focal heightLua error in package.lua at line 80: module 'Module:i18n' not found.
LensLua error in package.lua at line 80: module 'Module:i18n' not found.
IntensityLua error in package.lua at line 80: module 'Module:i18n' not found.
RangeLua error in package.lua at line 80: module 'Module:i18n' not found.
Characteristic[[File:Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|20px]] Lua error in package.lua at line 80: module 'Module:i18n' not found.

yields the example on the right. I will endeavour to document these features shortly — Martin (MSGJ · talk) 19:02, 16 March 2021 (UTC)

Lens

Original lens1st order 920mm fixed lens
Current lensFourth order Fresnel lens
Lens1st order 920mm fixed lens (original),
Fourth order Fresnel lens (current)

I suggest merging Original lens and Current lens into simply Lens. If both fields are used then qualifiers (original) and (current) could be added automatically. If just one is used, then no qualifier is needed.

The reason is that if the current is the same as the original, then the infobox looks a little silly. — Martin (MSGJ · talk) 15:53, 16 March 2021 (UTC)

Original lensFourth order Fresnel lens
Current lensFourth order Fresnel lens
LensFourth order Fresnel lens

I have created a tracking category Category:Lighthouses using current lens parameter and intend to merge the two parameters shortly — Martin (MSGJ · talk) 12:46, 21 May 2021 (UTC)

I have emptied Category:Lighthouses using current lens parameter only by renaming the "currentlens" parameter to "lens". I am planning to start on the remaining articles in Category:Lighthouses using current lens parameter by appending (original) and (current) to the values and merging, i.e. for example, from
 | lens = Fourth order [[Fresnel lens]]
 | currentlens = 375 mm lens 

to

 | lens = Fourth order [[Fresnel lens]] (original), 375 mm lens (current)

— Martin (MSGJ · talk) 22:36, 10 June 2021 (UTC)

Template:Done All instances have been converted, and the currentlens parameter will be removed shortly — Martin (MSGJ · talk) 20:16, 16 June 2021 (UTC)

CHS number

I don't think CHS number (linked to Canadian Hydrographic Service) is an accurate name for this. The list of lights appears to be maintained by the Canadian Coast Guard. Editors have got around the issue by prefixing the number with CCG. I suggest renaming this label to CCG number and then these prefixes would be redundant. — Martin (MSGJ · talk) 12:03, 7 May 2021 (UTC)

Template:Done — Martin (MSGJ · talk) 09:48, 13 May 2021 (UTC)

The prefix CCG on these numbers is now unnecessary. I have created a tracking category Category:Lighthouses with CCG prefix to find these for removal. — Martin (MSGJ · talk) 12:48, 21 May 2021 (UTC)

These have now been cleared — Martin (MSGJ · talk) 22:44, 10 June 2021 (UTC)

Owner parameter?

Hi, is there any interest in adding an "owner" parameter in the infobox? In most cases a lighthouse is owned by the national government of the site but an exception is possible. Regards, ... PeterEasthope (talk) 13:15, 23 July 2021 (UTC)

There is |managing_agent=, which displays with the heading Operator:. Since there are probably very few cases where the owner is different that the operator, exceptions can be handled by saying something like "(owned by national government)" after showing the operator. MB 14:19, 23 July 2021 (UTC)
I think adding "owner" would be an excellent idea, but perhaps with advice not to include unless it is different from operator? — Martin (MSGJ · talk) 17:56, 14 September 2021 (UTC)

Importing to Wikidata

For those editors interested in using Wikidata to store the data for the infoboxes, I have been working on a tool to help import directly from the infobox template.

Adding |qs=yes adds a link to QuickStatements which can quickly import some of the data from the infobox. For a proof of concept, try clicking the colored arrow File:Commons to Wikidata QuickStatements.svg on the infobox below.

It is not infallible! It needs to be used with care, and the results should be reviewed afterwards. Some known limitations:

  • Units are fixed to metres (height and focal height) and nautical miles (range). If any different units are used in the infobox, errors will be introduced.
  • Any preceding characters in front of values will stop it working. For example |yearlit=~1880 would not work.
  • A character inside a number (e.g. |intensity=15,000) will be truncated to 15.
  • Statements are marked as imported from enwiki, but should be referenced to a reliable source where possible. — Martin (MSGJ · talk) 19:59, 14 September 2021 (UTC)

Admiralty number syncronised with Wikidata

I am happy to report that the admiralty number in the template is now fully aligned with Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value). (P3562) on Wikidata. To keep them synchonised I am proposing to remove the local parameter and just use the value on Wikidata. This will be the first step towards a master plan that I proposed earlier in the year. — Martin (MSGJ · talk) 17:32, 22 September 2021 (UTC)

Update: NGA number and CCG number are now fully aligned with their Wikidata values, so the local parameters for these have been turned off. Still to do: ARLHS number and USCG number — Martin (MSGJ · talk) 07:51, 30 September 2021 (UTC)
Update: ARLHS number is now aligned with Wikidata and the local parameter has been switched off — Martin (MSGJ · talk) 13:04, 30 October 2021 (UTC)

Sections for tower and light

Template:Infobox lighthouse/sandbox We are grouping properties of the tower at the top of the infobox and properties of the light at the bottom of the infobox. What do people think about adding some headings to make the distinction clearer? An example is shown right. — Martin (MSGJ · talk) 13:42, 3 November 2021 (UTC)

This now been implemented — Martin (MSGJ · talk) 17:04, 15 November 2021 (UTC)

Bug in code

Lua error in package.lua at line 80: module 'Module:i18n' not found.Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in package.lua at line 80: module 'Module:i18n' not found.
Lua error in Module:Infobox_mapframe at line 40: attempt to index field 'wikibase' (a nil value).
LocationLua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found., {{#Property:P17|from=Q109370544 }} Lua error in Module:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).
OS gridLua error in package.lua at line 80: module 'Module:i18n' not found.
CoordinatesLua error in package.lua at line 80: module 'Module:i18n' not found.
Expression error: Unexpected < operator.
ConstructedLua error in package.lua at line 80: module 'Module:i18n' not found.
Designed byLua error in package.lua at line 80: module 'Module:i18n' not found.
Built byLua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found.
ConstructionLua error in package.lua at line 80: module 'Module:i18n' not found.
AutomatedLua error in package.lua at line 80: module 'Module:i18n' not found.
HeightLua error in package.lua at line 80: module 'Module:i18n' not found.
ShapeLua error in package.lua at line 80: module 'Module:i18n' not found.
MarkingsLua error in package.lua at line 80: module 'Module:i18n' not found., Lua error in package.lua at line 80: module 'Module:i18n' not found.
Power sourceLua error in package.lua at line 80: module 'Module:i18n' not found.
OperatorLua error in package.lua at line 80: module 'Module:i18n' not found.
HeritageLua error in package.lua at line 80: module 'Module:i18n' not found.
RaconLua error in package.lua at line 80: module 'Module:i18n' not found.
Light
First litLua error in package.lua at line 80: module 'Module:i18n' not found.
DeactivatedLua error in package.lua at line 80: module 'Module:i18n' not found.
Focal heightLua error in package.lua at line 80: module 'Module:i18n' not found.
LensLua error in package.lua at line 80: module 'Module:i18n' not found.
IntensityLua error in package.lua at line 80: module 'Module:i18n' not found.
RangeLua error in package.lua at line 80: module 'Module:i18n' not found.
Characteristic[[File:Lua error in Module:Wd at line 632: attempt to index field 'wikibase' (a nil value).|20px]] Lua error in package.lua at line 80: module 'Module:i18n' not found.

I have discovered that if two images are held on Wikidata and only the second one has a caption, then the template will give the first image but give it the caption of the second image! I will look into fixing this somehow ... — Martin (MSGJ · talk) 19:16, 3 November 2021 (UTC)

Image parameter

I think image would be a simpler parameter name than image_name. The latter is unintuitive and always forces me back to the template documentation when I find that image doesn't work! I suggest the template should accept the image parameter as an alternative. — Martin (MSGJ · talk) 13:38, 7 March 2022 (UTC)

Deprecated parameters

I have posted a request at WP:BOTREQ to remove several parmeters which are no longer used by this template. They are listed below.

  • Admiralty
  • ARLHS
  • Canada
  • coordinates_footnotes
  • NGA
  • pushpin
  • pushpin_label_position
  • pushpin_map
  • pushpin_map_alt
  • pushpin_map_caption
  • pushpin_mapsize
  • pushpin_outside
  • pushpin_relief
  • relief
  • USCG

— Martin (MSGJ · talk) 13:39, 7 March 2022 (UTC)

This has now been completed — Martin (MSGJ · talk) 08:53, 8 March 2022 (UTC)

History section

I'm thinking it would be good to have a section in the infobox for the history of the lighthouse, including all significant dates. We can bring the "constructed", "first lit", "automated" into this section along with other important dates like "commissioned", "electrified", "destroyed", etc. Of course they would need to be in chronological order to make sense. I will make a mock-up to see what it would look like. — Martin (MSGJ · talk) 20:42, 2 April 2022 (UTC)