Template talk:Referendum
Right align
[edit]Why is some text right aligned but the icon and yes/no is not ? Gnevin (talk) 09:54, 11 February 2009 (UTC)
- This is the way it is displayed in other election result templates, specifically Template:Election box and Template:Election box begin no change. – Zntrip 22:59, 11 February 2009 (UTC)
- Strange but fair enough Gnevin (talk) 23:19, 11 February 2009 (UTC)
Voter turnout parameter
[edit]Is there a way to make the "voter turnout" parameter optional? – Zntrip 19:25, 21 June 2009 (UTC)
Electorate
[edit]I've added a new parameter electorate. It's optional and will only appear when filled in. I think its useful to have. Snappy (talk) 09:43, 23 June 2009 (UTC)
Left or right?
[edit]Why is there two different alignments in the same template? (Yes and No fields are left, and the rest are right) This looks very odd. I have no strong preference but all the fields should be left or right aligned. Is there a reason for this? I can't see any precedence. Snappy (talk) 08:12, 24 June 2009 (UTC)
- Earlier I cited Template:Election box and Template:Election box begin no change. These are widely used and there are few instances where the text is fully aligned to the left. Aligning the last few rows to the right seems to be the status quo. – Zntrip 18:04, 24 June 2009 (UTC)
- Your examples appear to be out of date. They don't use differing alignments now, unless I am missing something. Please show me a wikipedia article which has a template on it using differing alignments in it. Snappy (talk) 09:55, 25 June 2009 (UTC)
- What do you mean by out of date and which alignments are you referring to? Here are some examples I can come up with where the alignment is the same as this template: Belfast St Anne's (Northern Ireland Parliament constituency), Glenrothes by-election, 2008, Canadian federal by-elections, 2008, Division of Eden-Monaro, and United States House of Representatives elections in California, 2000. – Zntrip 17:54, 25 June 2009 (UTC)
- I see. It looks pretty odd to me but if its the standards then so be it. Snappy (talk) 11:06, 26 June 2009 (UTC)
It's kind of a pain, I think, to worry about math when you feed data to this template, especially if you're dealing with a lot of referendums. As well, this entirely manual approach is prone to errors. I think a good idea is to let the server do the calculating for us. It's all pretty straightforward arithmetic. The only catch is I can't figure out how to make it so commas (like in 1,284,083) are ignored in calculations, or alternatively, are inserted automatically when displayed. If this problem can be hammered out, then what say? — Athelwulf [T]/[C] 05:35, 16 July 2009 (UTC)
- Sounds like a good idea. Can you find an example of its use in another template for us to get some ideas? – Zntrip 06:40, 16 July 2009 (UTC)
- Recently, I tried implementing this kind of scheme in Infobox Referendum approved with map. It works wonderfully unless the data you input contains commas, which will almost always be the case. I didn't realize it before I made the change because I tested it using small numbers, and I didn't think the commas mattered. Because of this fluke, I quickly reverted it. This is the single critical bug that has to be fixed. — Athelwulf [T]/[C] 08:00, 16 July 2009 (UTC)
- Hm, is it worth the trouble then? I know from personal experience the percentages are usually included in the official results and when I need to calculate them I just copy and paste to Google and use it as a calculator. – Zntrip 17:15, 16 July 2009 (UTC)
- Well, it shouldn't be an extremely high priority. But if there's a reasonable solution, then I think it is worth it. Sometimes percentages are published, but sometimes they're not. The Oregon government, for example, only gives raw totals. I use the calculator program installed on Windows to work out percentages, so I can deal with it, and I have. But it gets horribly tedious, especially when dealing with lots of results.
- I'll investigate and see if there's a work-around for this comma problem. Apparently, either you have to tell the server to ignore commas when it does its computations, or you have to input the numbers without commas and tell the server to automatically insert them when displayed. — Athelwulf [T]/[C] 21:14, 16 July 2009 (UTC)
- I don't really know anything about programming, but if you figure anything out, please post it here. – Zntrip 21:24, 16 July 2009 (UTC)
- I JUST figured out the solution, and I'm very happy! There just so happens to be a magic word, {{formatnum}}, which formats numbers. It will take 82685723 and make 82,685,723.
- Example code can be found in this sandbox template. It tested out just fine.
- The "yes" and "no" tallies are coded like so: {{formatnum: {{{yes}}} }}
- Percentages are calculated like this: {{pct| {{{yes}}} | {{#expr: {{{yes}}} + {{{no}}} }} | 2 }} (the 2 at the end rounds the decimal to the nearest hundredth)
- Totals are like this: {{formatnum: {{#expr: {{{yes}}} + {{{no}}} }} }}
- Example code can be found in this sandbox template. It tested out just fine.
Sooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
How about incorporating #expr: syntax into this template, like I demonstrated five days ago is possible? Good idea? Bad idea? Thoughts? Anything? — Athelwulf [T]/[C] 20:46, 21 July 2009 (UTC)
- Sorry I didn't respond, I didn't notice your previous post. Sounds great to me. If you can incorporate the new code I think the template will be a lot easier to use. – Zntrip 23:06, 21 July 2009 (UTC)
- Done, I suppose eleven years later is as good a time as any. See my edit. --Krinkle (talk) 23:14, 20 December 2020 (UTC)
- @Krinkle: Can you also get it to calculate the percentages for yes, no and the turnout? In theory the only things that need inputting are yes votes, no votes, invalid votes and electorate. Everything else can be calculated via division or addition of these numbers. Number 57 16:21, 28 December 2020 (UTC)
- Done, I suppose eleven years later is as good a time as any. See my edit. --Krinkle (talk) 23:14, 20 December 2020 (UTC)
Tick and cross
[edit]I understand that a tick and cross are only shown when either yes or no is the winning vote. Just to say when I first looked at an article using the template it looked like a mistake because only one had a symbol. Any chance of using the symbols on both to make the use of the template in the article look right, the winning vote can be determined by the position in the table. MilborneOne (talk) 22:13, 30 November 2009 (UTC)
- What article are you talking about? – Zntrip 22:38, 30 November 2009 (UTC)
- All of them that use this template, they all behave the same whatever has the highest percentage shows a symbol (either a tick or cross) and the lowest one does not. It is the way this template is coded. MilborneOne (talk) 23:04, 5 December 2009 (UTC)
- Oh, I understand what you are talking about. The "X" and the check mark are only included for the winning vote. This was a stylistic choice made to easily identify the result of the referendum. I do understand that with closer scrutiny it is obvious that the result of the referendum can be determined by which one comes first, but the "X" and check mark make it easier to determine the result if a reader is skimming a page or just glaces at the table. – Zntrip 01:10, 6 December 2009 (UTC)
- OK I understand but it does confuse as it looks like an error but if that was the consensus I have made my point. MilborneOne (talk) 13:30, 6 December 2009 (UTC)
Two-thirds majority
[edit]Some referenda (especially in California with regards to taxes and revenue) require a two-thirds majority to pass. How can we incorporate this into the template? --kurykh 22:41, 5 December 2009 (UTC)
- I too was thinking of this, but I just have no idea how to incorporate it into this template. I think it would just have to be included elsewhere on the page. A similar problem arises with referenda that require a certain voter turnout to pass. – Zntrip 01:12, 6 December 2009 (UTC)
- I think I have it down. Code can be a bit more clean, but it should work now. I hope. --kurykh 01:48, 7 December 2009 (UTC)
Can you do an example for the doc? I'd do it myself, but I'm not too sure how the new changes work.– Zntrip 02:39, 7 December 2009 (UTC)
- The new parameter looks like it's working well. I've added an example of how it's used on the doc (I got the example from a failed San Fransisco proposition). If it isn't too much trouble do you think you could do the same thing with a turnout requirement (i.e. Italian electoral law referendum, 2009 and Latvian constitutional referendum, 2008)? I think it would be pretty much the same except that the default would be zero percent instead of fifty percent. – Zntrip 02:58, 7 December 2009 (UTC)
- Done. --kurykh 08:06, 7 December 2009 (UTC)
- Wow, looks great, thanks a lot. – Zntrip 20:56, 7 December 2009 (UTC)
- Can you display this information in the template when used? 86.42.95.62 (talk) 00:24, 22 December 2009 (UTC)
- Wow, looks great, thanks a lot. – Zntrip 20:56, 7 December 2009 (UTC)
- No, it has to be mentioned elsewhere. The template does not display the percent required for passage. – Zntrip 03:38, 22 December 2009 (UTC)
- I meant can some one change the template so the information is displayed , I might do it myself 86.42.95.62 (talk) 17:44, 22 December 2009 (UTC)
- No, it has to be mentioned elsewhere. The template does not display the percent required for passage. – Zntrip 03:38, 22 December 2009 (UTC)
Referendums with only options not Yes/No
[edit]Is it possible to make a referendum template with only options like the Singaporean national referendum, 1962 with only options not using the usual yes/no option. Rizalninoynapoleon (talk) 14:34, 27 March 2010 (UTC)
- Can I re-open this request, as per Talk:United_Kingdom_European_Union_membership_referendum,_2016#Infobox_wording? Bondegezou (talk) 15:01, 31 March 2016 (UTC)
- Just use a wikitable, as making one would be very simple. This template is not very widely used for that reason. Number 57 16:47, 31 March 2016 (UTC)
Map colors can differ
[edit]The California Proposition 8 article uses this template with a map that uses different colors than green-for-yes and red-for-no, and the image contains a legend with those colors. Yet at the bottom of the template is a green box next to Yes and red box next to No. Could this template perhaps be modified to include options of either changing the colors or (better still) removing that bottom legend altogether? ± Lenoxus (" *** ") 13:22, 14 October 2012 (UTC)
Voting age population and turnout
[edit]I will be adding a new "Voting age population/turnout" row to this template, which I intend to use on the Scottish independence referendum, 2014 and on Chilean election articles. I'm not planning on searching for every usage of this template to add such information. Also, this information will obviously be an optional parameter. What do you think? Pristino (talk) 23:05, 19 September 2014 (UTC)
- Because "Voting age population and turnout" may be a bit too long, I would suggest "Eligible voters and turnout", but either way it sounds like a good idea. Don't forget to update Template:Referendum/doc if you make any changes to the template. – Zntrip 23:19, 19 September 2014 (UTC)
- Eligible voters is a different concept from voting age population (as explained in the linked article). The latter takes all of the population living within a geographical/political unit that meet the minimum age requirement, regardless of whether they're actually allowed (eligible) to vote. Because it is indeed long, I shortened it to "Voting age pop." but this was edited back to "population" by another user. To avoid an additional line of text, I made the table 10px wider. Doc has been updated. Pristino (talk) 04:10, 20 September 2014 (UTC)
- Thanks for clarifying; all the edits look great! – Zntrip 04:44, 20 September 2014 (UTC)
Remain/Leave Option
[edit]Can a new subroutine be written into this toolbar so the options can be changed from the yes/no options for specifically for the United Kingdom European Union membership referendum, 2016 as it's somewhat ridiculous that we cannot change the options currently as we do need this type of toolbar for the results section of the article.. (46.64.234.161 (talk) 13:33, 20 June 2016 (UTC))
- They already can be. Use option1 = and option 2 =. This is already detailed in the documentation on the template. Number 57 13:55, 20 June 2016 (UTC)
Line between voting options and statistics
[edit]In December last year, I thickened the line that separated the two options that people could vote for from the remaining statistics contained within the table. Number 57 have reverted this, and I am now seeking consensus to reinstate it. See this version.
In a referendum, voters have to choose between two options (sometimes more, but this template only support two), and whichever option gets the most votes win. All the other things, like what the turnout was and how many spoil ballot there were, is way less important than how many voted yes and no. They still belong in table, but the more rows it contains, the less effective it becomes at quickly conveying how people votes in the referendum. A slightly thicker line to separate the options from the statistics makes it easy for readers to decipher the table. We should recognize that most readers only skim a Wikipedia article, so deciphering should happen instantly. Some editors might think the line is unnecessary or ugly, but ugliness is a matter of taste (I think it makes it prettier), and the line servers a clear purpose for some readers, while I do not think anyone could be confused by it.
In addition, there is another problem with the table that the line fixes. In the current setup, especially because the line with total votes are bold, one might be led to believe that the yes-percentage and the no-percentage should add up to the valid votes percentage. And when afterwards we should add the invalid votes to get to the 100 %. This is wrong, but a reasonable mistake. And this is not something that I just claim, it actually happens. If we add a line, we clearly mark that the two first lines are "one group", which necessarily should add up to 100 %. As we have not fulfilled the readers expectations on this point, the other lines are more free to use the percentage column in the most appropriate way. ― Hebsen (talk) 16:17, 25 January 2020 (UTC)
- I believe the bolder line is unnecessary; the yes/no votes are already clearly differentiated from the valid/invalid votes by the different shading of the background. As such, I don't believe there is any potential for confusion without the bolder line, which IMO strongly detracts from the table's appearance. Number 57 16:36, 25 January 2020 (UTC)
Votesneeded
[edit]Can someone add a field votesneeded
? Some referendums require a certain number of votes to pass. Ythlev (talk) 16:48, 23 April 2020 (UTC)
Blanks
[edit]Hello. Can someone please add a way to have separates lines for blank votes and invalid votes? Aréat (talk) 12:09, 27 February 2023 (UTC)