Template talk:Election box: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
JoannaSerah (talk | contribs)
→‎Adding hCard microformats: I see. Will have to think about some more.
Line 41: Line 41:
::This is still marked as unresolved, even though it has been a long time. Not sure that it is an issue anymore, but wanted to go ahead and follow up just in case: Looking at the coding for the inline boxes, the {{tl|Election box inline incumbent}} template already starts off the row with ''class="vcard"''. Since the incumbent is always there, all the other candidates' boxes should fall under that row's class, I believe. You wouldn't need to put a separate ''class="vcard"'' with the other inline ones such as {{tl|Election box inline candidate with party link no change}}, just put in the ''class="org"'' or whatever in the appropriate places. Thank you. -- [[User:JoannaSerah|JoannaSerah]] ([[User talk:JoannaSerah|talk]]) 14:57, 6 February 2013 (UTC)
::This is still marked as unresolved, even though it has been a long time. Not sure that it is an issue anymore, but wanted to go ahead and follow up just in case: Looking at the coding for the inline boxes, the {{tl|Election box inline incumbent}} template already starts off the row with ''class="vcard"''. Since the incumbent is always there, all the other candidates' boxes should fall under that row's class, I believe. You wouldn't need to put a separate ''class="vcard"'' with the other inline ones such as {{tl|Election box inline candidate with party link no change}}, just put in the ''class="org"'' or whatever in the appropriate places. Thank you. -- [[User:JoannaSerah|JoannaSerah]] ([[User talk:JoannaSerah|talk]]) 14:57, 6 February 2013 (UTC)
:::Belated response; sorry. We need one <code>class=vcard</code> per person; but I hadn't appreciated that {{tl|Election box inline candidate with party link no change}} appears on the same row as the incumbent template. That, separately, may be an accessibility issue; I've asked for advice at [[Wikipedia talk:WikiProject Accessibility#Election candidate table rows]]. <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 20:01, 20 February 2013 (UTC)
:::Belated response; sorry. We need one <code>class=vcard</code> per person; but I hadn't appreciated that {{tl|Election box inline candidate with party link no change}} appears on the same row as the incumbent template. That, separately, may be an accessibility issue; I've asked for advice at [[Wikipedia talk:WikiProject Accessibility#Election candidate table rows]]. <span class="vcard"><span class="fn">[[User:Pigsonthewing|Andy Mabbett]]</span> (<span class="nickname">Pigsonthewing</span>); [[User talk:Pigsonthewing|Talk to Andy]]; [[Special:Contributions/Pigsonthewing|Andy's edits]]</span> 20:01, 20 February 2013 (UTC)
::::I see. That does present a problem since the incumbent could span multiple rows. Will have to think about that some more. Thank you. -- [[User:JoannaSerah|JoannaSerah]] ([[User talk:JoannaSerah|talk]]) 02:15, 23 February 2013 (UTC)


== Change column ==
== Change column ==

Revision as of 02:15, 23 February 2013

WikiProject iconElections and Referendums Template‑class
WikiProject iconThis template is within the scope of WikiProject Elections and Referendums, an ongoing effort to improve the quality of, expand upon and create new articles relating to elections, electoral reform and other aspects of democratic decision-making. For more information, visit our project page.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Box without percentages column

Is there such a version of this template? I don't have the percentages for some election results, but would still like to add the boxes with the votes. Craigy (talk) 00:53, 31 August 2008 (UTC)[reply]

I think people often calculate the percentages by hand. Simply take each candidates votes divided by the total number of votes.--TheZachMorrisExperience (talk) 02:10, 31 August 2008 (UTC)[reply]
Ah, I see. Thanks. I never was good at maths :-) Craigy (talk) 13:35, 31 August 2008 (UTC)[reply]

editprotected

{{editprotected}}

Please add hCard microformat mark-up to {{Election box candidate}} (talk page redirects here), by changing:

|-
! style="background-color:#E9E9E9" |
| style="width: 130px" | {{{party}}}
|               | {{{candidate}}}

to:

|- class="vcard"
! style="background-color:#E9E9E9" |
| class="org" style="width: 130px" | {{{party}}}
| class="fn" | {{{candidate}}}

then remove the redirect from the template page to its talk page, and create {{documentation}}. Thank you. Andy Mabbett | Talk to Andy Mabbett 23:00, 31 August 2008 (UTC)[reply]

I did the hCard part, how should the documentation be handled? Should the unused Template:Election box be changed from a redirect, or should the docs go on Template:Election box begin? - Trevor MacInnis (Contribs) 16:05, 1 September 2008 (UTC)[reply]
Thank you. I've already moved some of the documentation to sub pages (it was very long) and was planning to templatise the rest so it could be included on each {{documentation}} page as needed, while allowing each such page to have the appropriate categories. Andy Mabbett | Talk to Andy Mabbett 16:46, 1 September 2008 (UTC)[reply]
Ok, I'll start adding {{doc to the multiple protected templates involved with this, and leave you to fill them in. - Trevor MacInnis (Contribs) 22:25, 1 September 2008 (UTC)[reply]
Thank you. The documentation now starts in Template:Election box/doc, and is subdivided from there. See what you think. Andy Mabbett | Talk to Andy Mabbett 23:17, 1 September 2008 (UTC)[reply]

Adding hCard microformats

Unresolved

I've managed to add hCard microformats to several of these templates (see above, and this example edit), but have run into problems with templates like {{Election box inline candidate with party link no change}} because there's no hook on which to add a class, such that it applies to the whole <TR> element. Can anyone suggest how that might be done, please? Thank you. Andy Mabbett | Talk to Andy Mabbett 23:20, 31 August 2008 (UTC)[reply]

Anyone? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 21:39, 2 January 2009 (UTC)[reply]
This is still marked as unresolved, even though it has been a long time. Not sure that it is an issue anymore, but wanted to go ahead and follow up just in case: Looking at the coding for the inline boxes, the {{Election box inline incumbent}} template already starts off the row with class="vcard". Since the incumbent is always there, all the other candidates' boxes should fall under that row's class, I believe. You wouldn't need to put a separate class="vcard" with the other inline ones such as {{Election box inline candidate with party link no change}}, just put in the class="org" or whatever in the appropriate places. Thank you. -- JoannaSerah (talk) 14:57, 6 February 2013 (UTC)[reply]
Belated response; sorry. We need one class=vcard per person; but I hadn't appreciated that {{Election box inline candidate with party link no change}} appears on the same row as the incumbent template. That, separately, may be an accessibility issue; I've asked for advice at Wikipedia talk:WikiProject Accessibility#Election candidate table rows. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:01, 20 February 2013 (UTC)[reply]
I see. That does present a problem since the incumbent could span multiple rows. Will have to think about that some more. Thank you. -- JoannaSerah (talk) 02:15, 23 February 2013 (UTC)[reply]

Change column

The "change" (±%) column is something that seems to be specific to UK elections, or at least is not something traditionally used for US election results. I'm not even sure what's supposed to go in it, and I'm an election geek. I think there should be some suggestion that people may want to use the "no change" versions of the templates if they're not in the UK. —KCinDC (talk) 23:40, 1 September 2008 (UTC)[reply]

I agree that it is not clear at all to most readers. I have learned that it is how many more percentage points that party won in that election compared to the previous. I don't know about US/UK, though another part of the election box is Swing (politics), which is UK, though it unfortunately ends up on many US articles. It's never filled in, so I'm still not completely sure what it means. Reywas92Talk 02:24, 2 January 2009 (UTC)[reply]

Can the Change column be removed from being a compulsory column as it is meaning less in election where there is a brand new office or seat. The change stats used are notion only and are misleading as there was no previous election for the office or for the seat it should be an optional column for seats being re-contested on identical boundaries were notional changes are not used.--Lucy-marie (talk) 13:56, 5 November 2010 (UTC)[reply]

Uniformity

{{editprotected}}

Please change the following on Template:Election box begin:

! colspan=2 style="width: 130px"|Party ! style="width: 170px"|Candidate ! style="width: 50px"|Votes ! style="width: 40px"|% ! style="width: 40px"|±%

to

! colspan=2 style="width: 15em" |Party ! style="width: 17em" |Candidate ! style="width: 5em" |Votes ! style="width: 3.5em" |% ! style="width: 3.5em"|±%

to conform to Template:Election box begin no change. One uses the entire length of the page but the other uses about 3/4, but both should be the same length. Thanks, Reywas92Talk 02:33, 2 January 2009 (UTC)[reply]

The template is not protected, so there's nothing stopping you making the change yourself. GbT/c 20:39, 2 January 2009 (UTC)[reply]
Template:Election box begin is protected. All talk pages in the Election box series redirect here to be centralized. 16:43, 3 January 2009 (UTC)
Sorry, my bad. Misread your request, thought you were asking for a change to Template:Election box. GbT/c 18:55, 3 January 2009 (UTC)[reply]
 Done Ruslik (talk) 20:02, 4 January 2009 (UTC)[reply]
Might want to check the code, I had to revert it as it was producing ridiculously wide colour boxes on Australian articles such as Electoral results for the Division of Mitchell. Orderinchaos 08:26, 8 January 2009 (UTC)[reply]
Tried it myself (pasting in Election box begin no change and modifying the parameters to match) but got the same result. Orderinchaos 08:33, 8 January 2009 (UTC)[reply]

Color

Can the column's color prior to the party name be customizable for Template:Election box candidate? –Howard the Duck 18:32, 20 November 2009 (UTC)[reply]

  • I would suggest you have a look at Template:Election box candidate AU party. This makes use of another template Template:Australian politics/party colours which is basically a lookup table of the colours for party names/abbreviations. Then you could create the corresponding templates for your part of the world. It might also be possible to make a lookup template of full names and wikilinks for the short names of each party. Sussexonian (talk) 10:24, 22 November 2009 (UTC)[reply]
    • It could've been easier if we can simply assign a color per template than using a meta one. –Howard the Duck 05:13, 23 November 2009 (UTC)[reply]
      • Agreed - it would have been easier to use some logic, the work-around as proffered by Sussexonian suggests s/he doesn't understand the problem as it still requires a metadata color template. Single issue/single candidate parties such as  Paint the Town Red Party,  Custard Party or  Fade to Grey Party should neither be listed as Independent nor assigned metadata just to keep a broken template in full employment. As {{Election box candidate}} was considered broken (and edit-locked) we've been using a version of this on New Zealand election articles (with customisable party color) which I've now renamed as {{Election box candidate minor party}} as it has uses beyond what it was made for. — FanRed XN | talk 22:59, 14 August 2011 (UTC)[reply]

Standardizing election results (crosspost)

Please see Wikipedia talk:WikiProject Elections and Referendums/Archive 4#Standardizing election results. @harej 06:27, 5 December 2009 (UTC)[reply]

And now, Wikipedia talk:WikiProject Elections and Referendums#Template:Election. @harej 03:50, 18 January 2010 (UTC)[reply]

Party links for Independent

Hello, I wonder if anybody here can help? It seems to me that use of the Election box family of templates, with the term "party=independent" usually creates a link to the disambiguation page Independent. Is it possible to revise the code so that it links to Independent (politician)? For time to time I run through all the incoming links to the dab page and end up making manual changes to each page where this occurs; if it's possible to do it in the template code, then I'd certainly appreciate it! TIA, --AndrewHowse (talk) 15:40, 22 November 2010 (UTC)[reply]

±%?

Doesn't "±" mean either positive or negative? Hence "±6%" means "either 6% or -6%." Shouldn't this be changed into, say, "+/-"? –HTD (ITN: Where no updates but is stickied happens.) 16:27, 23 November 2010 (UTC)[reply]

Ambiguity of "majority"

Could the word "Majority" in the template Election box majority be changed to "Margin"?

The word is ambiguous: in the UK Parliament it means "more than 50%" whereas in individual constituences it means the margin the winner has over the 2nd place candidate. I believe there is a UK/US difference too. Other replacements are possible but "Margin" seems best to me e.g. if the margin is small you have a marginal seat. Anweald (talk) 12:32, 12 April 2011 (UTC)[reply]

I strongly agree with this proposal. I haven't mastered Anweald's word-analyis: To me there's no ambiguity. The problem I encountered is with a three-candidate race where the winner had only a plurality. "Margin" would serve my purpose best too. I'm working on Maine gubernatorial election, 1974. I guess I'll leave it as "Majority", there, for now. The plurality problem shows up here, too. 20:35, 20 June 2012 (UTC)
Update: I've figured out how to ask for this edit to the protected template and have reached out to Anweald and explained it all at his/r talk page. I believe we are -- or I am -- moving toward a formal proposal. If there are any opinions pro or con, please register them here now. Thanks. Swliv (talk) 21:51, 20 June 2012 (UTC)[reply]
Was just thinking about the change and must say that I, too, wondered about the terminology. Although the word majority is wikilinked on the doc page, it isn't wikilinked in the template itself. Also, even if it was wikilinked, the article on majority wouldn't really describe the figure represented extremely well. I didn't create that one, but wonder if it said "majority" instead of writing out the longer phrase "margin of victory" which is more descriptive. Honestly, though, I really don't see the need for the template at all. (Mind you, because it's not a required template, I'm not asking for it to be removed.) Do we really have to do simple math for most readers? This isn't usually info that comes from a citation anyway, but is calculated by the editor putting it in. Even in parliamentary elections where you might have several people/parties running, generally we put the winner on top and the runner up next. Don't we? If readers want to figure that out, it shouldn't be that hard. But getting back to the main question, I would support something different along the lines of "margin" or "margin of victory". Thank you. -- JoannaSerah (talk) 00:41, 21 June 2012 (UTC)[reply]
You're welcome. And you give me the idea of just deleting it since "it's not a required template" if it really clashes with "local meaning" in a particular case. Anweald had a few more thoughts at his/r talk page. I'm not rushing at this point. I expect I'll get to it at some point unless good counter-argument develops. Anyone else is welcome to push it ahead on their own if they wish.
Your comments about whether it's necessary at all have given me some helpful perspective on the whole thing. And I appreciate your support for the change: I think I'd stick with the shorter "Margin" alone unless there were objections. Thank you. Pleasant surprise, really! Swliv (talk) 01:14, 22 June 2012 (UTC)[reply]

Apostrophes in change column

If you take a look at Allen West (politician)#Electoral history, you will note that the winning candidate's row has an apostrophe in the ±% column. This seems to happen when the change parameter is left blank. Can somebody tell me where this comes from and what, if anything, is its purpose? –CWenger (^@) 23:01, 20 July 2011 (UTC)[reply]

I have looked into this and tested the templates in my sandboxes. Basically, because nothing was input for the change= parameter, the template cannot parse it correctly with no input. the three leading and following apostrophes used to indicate bold thus wind up being six straight apostrophes. This produces the one apostrophe in the visible boxes.
I will go ahead and change the template to make this not show the apostrophe. After testing various scenarios, I do not think the change I make (adding a space in the template between '''{{{change}}} and the trailing ''' will change the visuals/output of any existing forms that have inputs. It just gets rid of the apostrophe if nothing is input.
That said, though, if the change parameter is not going to be used at all, it would be best to use
{{Election box begin no change}} and {{Election box winning candidate with party link no change}} instead of
{{Election box begin}} and {{Election box winning candidate with party link}}.
Thank you. JoannaSerah (talk) 05:48, 29 August 2011 (UTC)[reply]

±% should be ±

Two things wrong: first, a change in percentage should not be expressed as a percentage, but rather as a percentage point (or point after the first occurrence). On tables it's typical to leave the % sign out, to avoid the ambiguity of plus or minus 10% (does that mean 40% moving to 44%, or 40 to 50?

You've all no doubt heard many times "three-point lead" ... same thing. Tony (talk) 04:07, 13 July 2012 (UTC)[reply]

I don't understand. What do you mean by a percentage point? Can you give examples? Michael Hardy (talk) 01:05, 14 July 2012 (UTC)[reply]
I did give an example. So she received 40% of the vote last time, but gained a swing of 10%: does that mean she got 44% this time, or 50%? That is why it's common to distinguish between percentage and percentage point. The two-point lead is 51–49%. Tony (talk) 02:52, 14 July 2012 (UTC) PS and I see someone else has pointed this out above. Tony (talk) 02:56, 14 July 2012 (UTC)[reply]

± should be +/−

± means +4(%) or -(4)%. The use here refers to a change in percentage point(s). –HTD 13:36, 3 November 2012 (UTC)[reply]

No graph appears on Wiki-cy

The graph isn't generated on Wiki-cy (Welsh) here. Can someone check, please. The Welsh word for "Template" is "Nodyn". Many thanks, - Llywelyn2000 (talk) 05:34, 11 December 2012 (UTC)[reply]

Answered locally. Ruslik_Zero 19:01, 4 February 2013 (UTC)[reply]

Request for help with party=none

Michigan gubernatorial election, 1986 contains |party=none in {{Election box candidate with party link no change}}, which generates a link of [[None|Nonpartisan]]. Since None is a disambiguation page, could someone with experience with these templates change it so it links to Nonpartisan (or somewhere other than the disambiguation page)? Thanks! GoingBatty (talk) 03:47, 6 February 2013 (UTC)[reply]

I see how to do this, but wondering if there are other exceptions that we should account for also. For instance, just putting in the word "independent" links to a dab page, instead of "independent (politician)" which is correct. Are there others like this? Basically, should we make exceptions ("if" statements, etc.) in the code, or should we just state somewhere that people should only use "nonpartisan" or "independent (politician)" instead of "none" or "independent"? None does seem like it would be fairly common, but I've not looked through to see how often it is used yet. Thank you. -- JoannaSerah (talk) 14:17, 6 February 2013 (UTC)[reply]
For "Independent", I changed those instances to |party=Independent (politician), which generates a link of [[Independent (politician)|Independent]]. However, if the template could be changed to make this happen automatically, that would be cool. Thanks! GoingBatty (talk) 15:42, 6 February 2013 (UTC)[reply]