Jump to content

Template talk:Election box

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Normal font size

[edit]

Is there any reason a small font needs to be used on this page? I cannot see why it should be anything other than 100%. Please can someone change this? 10mmsocket (talk) 17:33, 7 March 2023 (UTC)[reply]

I do not see any small font sizes used on this page. Please link to a page where you are seeing small font sizes. – Jonesey95 (talk) 18:52, 7 March 2023 (UTC)[reply]
It's in the CSS that the tables call I believe. 10mmsocket (talk) 19:23, 7 March 2023 (UTC)[reply]
Actually it's in {{Election box begin no change}} 10mmsocket (talk) 19:25, 7 March 2023 (UTC)[reply]
It appears that a couple dozen election box templates adjust font sizes (there are also some in subcategories), out of a population of about 300 templates. Most of those font size adjustments apply a size of 95% to the entire template, which can cause MOS:FONTSIZE violations if <small>...</small> tags are used within the templates. I would support removing font size reduction from the bodies of these tables. A few of the font size changes are applied to titles and notes; I would leave those alone. – Jonesey95 (talk) 21:42, 7 March 2023 (UTC)[reply]
Thanks for checking. 10mmsocket (talk) 21:44, 7 March 2023 (UTC)[reply]
@Jonesey95: I stumbled across this short discussion after finding an article with unnecessary small fonts sizes and tracing it to {{Election box}}. 10mmsocket's initial investigation was useful. Your point about notes being smaller is fine. I don't think false headings or titles (with larger font sizes) should be used; bold-face is enough. I will investigate the job needed with a view to being bold at some point after discussing further. (10mmsocket seems to have been absent from WP since July 2023.) Bazza 7 (talk) 11:04, 19 March 2024 (UTC)[reply]

Parameter list

[edit]

This is embarrassing, since I've been using this template for years, but is there a comprehensive list of the available parameters for each sub-template? (Like "template:Election box candidate with party link" has parameters "party", "candidate", "votes", "percentage", etc.) Asdasdasdff (talk) 19:46, 3 December 2023 (UTC)[reply]

Template-protected edit request on 2 May 2024

[edit]

Hi so on line 11 of Template:Election box candidate with party link, i think you should replace {{{votes}}} with replace|{{{votes}}}|,|}}}}, so that no matter what number you put in it will automatically add commas for any number with 4 or more digits, as happens with Template:Election box winning candidate with party link TheHaloVeteran2 (talk) 00:03, 3 May 2024 (UTC)[reply]

 Not done: See below — Martin (MSGJ · talk) 19:53, 6 May 2024 (UTC)[reply]

Template-protected edit request on 3 May 2024

[edit]

I think we should replace {{{votes}}} with |{{{votes}}}|,|{{{votes}}} in Template:Election box turnout so that it automatically adds the separators as it does in Template:Election box turnout no change TheHaloVeteran2 (talk) 17:42, 3 May 2024 (UTC)[reply]

I don't think the above code would result in a useful outcome. Perhaps you could put your proposed code in the sandbox version of the template and show how it works on the testcases page. – Jonesey95 (talk) 20:15, 3 May 2024 (UTC)[reply]
I mean it already works in Template:Election box turnout for however many numbers you might need to report TheHaloVeteran2 (talk) 06:29, 4 May 2024 (UTC)[reply]
Please reactivate request when sandbox code is ready and tested — Martin (MSGJ · talk) 19:52, 6 May 2024 (UTC)[reply]

"Change" field for new candidates

[edit]

Should this be a value that can be specified when the template is called and maybe displayed with a grey cell background like {{n/a}}? I'm seeing a mix of handcrafted ''N/A'' and ''New'' fields on election articles. Belbury (talk) 07:03, 17 July 2024 (UTC)[reply]

Swing

[edit]

Does the "swing" represent the swing between the top two positions (i.e. representing how the winner's majority has changed) or does it represent the swing between the top two parties. My question pertains to Oldham_West,_Chadderton_and_Royton_(UK_Parliament_constituency)#Elections_in_the_2020s where a new independent candidate took second place. The swing from Labour to the independent was 21.2%, but there wasn't a huge change in Labour's majority (from 25% to 13%) due to the fact that the opposition fragmented, so the swing from Labour to the second-placed candidate was in fact only 6%. The swing between the top two positions seems more logical to me because it reflects how the winners majority was eroded, but obviously I don't want to add in the wrong figure. Betty Logan (talk) 08:57, 21 July 2024 (UTC)[reply]

To possibly answer your questions: if it’s a constituency result e.g. Oldham & Royton in 2024 GE the “swing” of 21.2 is between Labour and Independent candidates. The calculation is: the difference between this election and last one of the winner’s vote share change (-21%) and normally the 2nd place’s vote change, and divided by 2. But as no change figure available as Independent’s first appearance their actual vote share is used (21.4%), so -21 to 21.4 = 42.4 / 2 = 21.2.
For the overall 2024 GE result a different formula is used, Labour votes share 2019 was 32.1%  and 2014 now 33.7% so swing is the difference of 1.6%, but with a dramatically different result due to opposition fragmentation as you say. All other parties can be calculated the same.
Info. from https://en.wikipedia.org/wiki/Swing_(politics) and checked against Wiki results.
Your majority (“correctly called the margin of victory, i.e. the number of votes separating the first-place finisher from the second-place finisher”  and not confuse with seat majority of winer v all others - https://en.wikipedia.org/wiki/Majority - a hobby horse of mine) comparisons are interesting, is it ever published anywhere, is it not just the difference of Labour’s majorities 25 -12.9 = down 12.1% and shown in +/-  column? Tomb98 (talk) 18:49, 8 May 2025 (UTC)[reply]
[edit]

I suggest addition of link to Wikipedia Majority from word Majority (Turnout and  Registered electors already have links) e.g  https://en.wikipedia.org/wiki/Strangford_(UK_Parliament_constituency) . Majority - Template content - Election box majority https://en.wikipedia.org/wiki/Template:Election_box_majority warns that the template is widely used and consider discussing on the talk page

Reason for link: at TemplateData for Election box majority: text includes “In this context, "majority" refers to the winning margin between the first and second placed candidates.” This highlights that there are different contexts / meanings to Majority, which should be made clear via a link to Wikipedia Majority. The page at  Related terms includes reference to “margin of victory, i.e. the number of votes separating the first-place finisher from the second-place finisher”. Confusion arises because Majority is also used on election result pages e.g. https://en.wikipedia.org/wiki/2012_Japanese_general_election regarding assembly seats to mean more than half of a total, as described in Wiki Majority, which also highlights the confusions around definitions.

I have check a few samples from https://en.wikipedia.org/wiki/Special:WhatLinksHere/Template%3AElection%20box%20majority?hidelinks=1&hideimages=1 onwards and possibly this change is acceptable? Tomb98 (talk) 15:20, 6 May 2025 (UTC)[reply]

Linking from {{Election box majority}} to Majority seems like to cause more confusion. I would instead recommend redirecting {{Election box majority}} to the nearly identical and less ambiguous {{Election box margin of victory}}. I have marked both of them with TFD templates. – Jonesey95 (talk) 19:53, 8 May 2025 (UTC)[reply]
Thank you for the advise and I totally agree “margin of victory” is generally the correct term here. Generally because if only 2 candidates involved majority is correct, but when >2 involve, if the traditional idea of majority is considered (winner’s vote majority=winner’s votes-ALL other votes) this gives a negative result when the winner poles <50%, which is a bad look so “margin of victory” is used but not declared.
When looking for a 2 candidate example I found https://en.wikipedia.org/wiki/Gary_Johnson   1998 New Mexico gubernatorial election, I noticed the link to Template discussion at
https://en.wikipedia.org/wiki/Wikipedia:Templates_for_discussion/Log/2025_May_8#Template:Election_box_majority that previously argued that a change “would absolutely cause disruption on it, especially as it is a common term in British politics”. Maintaining the traditional subterfuge of implying a majority when it is not one, is no argument for not using the correct term. British politics is not helped by maintain a traditional misunderstanding.
My suggestion is to add a note against Majority “where there are more than 2 candidates see https://en.wikipedia.org/wiki/Majority#Related_terms”  I’m obviously new to this, does this have to be approved at the discussion log group, and if so how is it actually implemented? - thanks Tomb98 (talk) 08:05, 9 May 2025 (UTC)[reply]