# Difference between revisions of "Template:Poll"

m |
|||

Line 316: | Line 316: | ||

-->{{#if: {{{Margin of error1|}}}|<td style="text-align:center"> {{#expr: (({{{Margin of error1|0}}}+{{{Margin of error2|0}}}+{{{Margin of error3|0}}}+{{{Margin of error4|0}}}+{{{Margin of error5|0}}}+{{{Margin of error6|0}}}+{{{Margin of error7|0}}}+{{{Margin of error8|0}}}+{{{Margin of error9|0}}}+{{{Margin of error10|0}}})/({{#if:{{{Poll10|}}}|10|{{#if:{{{Poll9|}}}|9|{{#if:{{{Poll8|}}}|8|{{#if:{{{Poll7|}}}|7|{{#if:{{{Poll6|}}}|6|{{#if:{{{Poll5|}}}|5|{{#if:{{{Poll4|}}}|4|{{#if:{{{Poll3|}}}|3|{{#if:{{{Poll2|}}}|2|{{#if:{{{Poll1|}}}|1||1}}}}}}}}}}}}}}}}}}}})round2)}}%</td>}}</tr> | -->{{#if: {{{Margin of error1|}}}|<td style="text-align:center"> {{#expr: (({{{Margin of error1|0}}}+{{{Margin of error2|0}}}+{{{Margin of error3|0}}}+{{{Margin of error4|0}}}+{{{Margin of error5|0}}}+{{{Margin of error6|0}}}+{{{Margin of error7|0}}}+{{{Margin of error8|0}}}+{{{Margin of error9|0}}}+{{{Margin of error10|0}}})/({{#if:{{{Poll10|}}}|10|{{#if:{{{Poll9|}}}|9|{{#if:{{{Poll8|}}}|8|{{#if:{{{Poll7|}}}|7|{{#if:{{{Poll6|}}}|6|{{#if:{{{Poll5|}}}|5|{{#if:{{{Poll4|}}}|4|{{#if:{{{Poll3|}}}|3|{{#if:{{{Poll2|}}}|2|{{#if:{{{Poll1|}}}|1||1}}}}}}}}}}}}}}}}}}}})round2)}}%</td>}}</tr> | ||

<tr> | <tr> | ||

− | <td style="text-align:left" colspan="15"><small>{{#if: {{{Note|}}}|''{{{Note}}}''|''Note: The polls above may not reflect all polls that have been conducted in this race. Those displayed are a random sampling chosen by Ballotpedia staff. If you would like to nominate another poll for inclusion in the table, send an email to [mailto:editor@ballotpedia.org editor@ballotpedia.org]}}</small></td></tr></table><noinclude>{{Documentation}}[[Category:Congress tools]][[Category:State legislative tools]]</noinclude> | + | <td style="text-align:left" colspan="15"><small>{{#if: {{{Note|}}}|''{{{Note}}}''|''Note: The polls above may not reflect all polls that have been conducted in this race. Those displayed are a random sampling chosen by Ballotpedia staff. If you would like to nominate another poll for inclusion in the table, send an email to [mailto:editor@ballotpedia.org editor@ballotpedia.org]}}</small></td></tr></table><noinclude>{{Documentation}}[[Category:Cross-project tools writing guidelines]][[Category:Congress tools]][[Category:State legislative tools]]</noinclude> |

## Revision as of 09:23, 25 June 2013

{{{Title}}} |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Response |
|||||||||||||||

Number polled | N/A | ||||||||||||||

Margin of error | N/A | ||||||||||||||

Note: The polls above may not reflect all polls that have been conducted in this race. Those displayed are a random sampling chosen by Ballotpedia staff. If you would like to nominate another poll for inclusion in the table, send an email to editor@ballotpedia.org |

**Poll**}}.

The Poll template is to be used for any polls related to candidates, elected officials, or ballot measures.

Much of the poll template is automated and can compute automatically.

The template can handle:

- 15 different possible responses to a poll
- 10 different polls relating to one topic

The "Responses" and "Responsepolls" correlate and follow numerically. Just add as needed.

Response1, Response2, Response3, Response4 etc... up until 10 Response1poll1%, Response2poll1%, Response3poll1%, etc... Response1poll1%, Response1poll2%, Response1poll3%, etc...

## Usage

Here is the basic code to copy and fill in:

### One poll only

{{Poll |Title= |Poll1= |Date1= |Response1= |Response2= |Response3= |Response4= |Numberpolled1= |Margin of error1 = |Response1Poll1% = |Response2Poll1% = |Response3Poll1% = |Response4Poll1% = }}

### Two polls

{{Poll |Title= |Poll1= |Date1= |Poll2= |Date2= |Response1= |Response2= |Response3= |Response4= |Numberpolled1= |Numberpolled2= |Margin of error1 = |Margin of error2 = |Response1Poll1% = |Response2Poll1% = |Response3Poll1% = |Response4Poll1% = |Response1Poll2% = |Response2Poll2% = |Response3Poll2% = |Response4Poll2% = }}

Here is what each parameter means:

{{Poll |Title= The title of what the polls is questioning |Poll1= The link to the poll, with title. |Poll2= The link to the second poll, with title. |Date1= The date for the poll. This parameter is not required for the poll template to work. (added to the poll on 10/3/13) |Date2= The date of the second poll. |Response1=The first response, such as "yes" or the candidate |Response2=The second response, such as "yes" or the candidate |Response3=The third response, such as "yes" or the candidate |Response4=The fourth response, such as "yes" or the candidate |Numberpolled1=The total number of polled individuals from the first poll |Numberpolled2=The total number of polled individuals from the second poll |Margin of error1 = The margin of error from the first poll |Margin of error2 = The margin of error from the second poll |Response1Poll1% = The % received for the first response, in the first poll |Response2Poll1% = The % received for the second response, in the first poll |Response3Poll1% = The % received for the third response, in the first poll |Response4Poll1% = The % received for the fourth response, in the first poll |Response1Poll2% = The % received for the first response, in the second poll |Response2Poll2% = The % received for the second response, in the second poll |Response3Poll2% = The % received for the third response, in the second poll |Response4Poll2% = The % received for the fourth response, in the second poll }}

An example filled in:

{{Poll |Title=Scott Brown vs. Elizabeth Warren |Poll1=[http://www.uml.edu/docs/UML%20MA%20RV%20Dec%202011%20FINALTopline%281%29_tcm18-39517.pdf UMass/Boston Herald] |Poll2=[http://www1.wne.edu/assets/112/Polling_-_Mass_Senate_%28Oct_2011%29_TABLES.pdf Western NE College] |Date1=(December 1-6, 2011) |Date2=(October 17-23, 2011) |Response1=Scott Brown |Response2=Elizabeth Warren |Response3=Neither |Response4=Don't know |Numberpolled1=505 |Numberpolled2=475 |Margin of error1 = 5.3 |Margin of error2 = 4.5 |Response1Poll1% = 42 |Response2Poll1% = 49 |Response3Poll1% = 3 |Response4Poll1% = 6 |Response1Poll2% = 47 |Response2Poll2% = 42 |Response3Poll2% = 1 |Response4Poll2% = 10 }}

### Maximum of 15 polls and 10 responses

{{Poll |Title= |Poll1= |Poll2= |Poll3= |Poll4= |Poll5= |Poll6= |Poll7= |Poll8= |Poll9= |Poll10= |Date1= |Date2= |Date3= |Date4= |Date5= |Date6= |Date7= |Date8= |Date9= |Date10= |Response1= |Response2= |Response3= |Response4= |Response5= |Response6= |Response7= |Response8= |Response9= |Response10= |Numberpolled1= |Numberpolled2= |Margin of error1 = |Margin of error2 = |Response1Poll1% = |Response2Poll1% = |Response3Poll1% = |Response4Poll1% = |Response5Poll1% = |Response6Poll1% = |Response7Poll1% = |Response8Poll1% = |Response9Poll1% = |Response10Poll1% = |Response1Poll2% = |Response2Poll2% = |Response3Poll2% = |Response4Poll2% = |Response5Poll2% = |Response6Poll2% = |Response7Poll2% = |Response8Poll2% = |Response9Poll2% = |Response10Poll2% = |Response1Poll3% = |Response2Poll3% = |Response3Poll3% = |Response4Poll3% = |Response5Poll3% = |Response6Poll3% = |Response7Poll3% = |Response8Poll3% = |Response9Poll3% = |Response10Poll3% = |Response1Poll4% = |Response2Poll4% = |Response3Poll4% = |Response4Poll4% = |Response5Poll4% = |Response6Poll4% = |Response7Poll4% = |Response8Poll4% = |Response9Poll4% = |Response10Poll4% = |Response1Poll5% = |Response2Poll5% = |Response3Poll5% = |Response4Poll5% = |Response5Poll5% = |Response6Poll5% = |Response7Poll5% = |Response8Poll5% = |Response9Poll5% = |Response10Poll5% = |Response1Poll6% = |Response2Poll6% = |Response3Poll6% = |Response4Poll6% = |Response5Poll6% = |Response6Poll6% = |Response7Poll6% = |Response8Poll6% = |Response9Poll6% = |Response10Poll6% = |Response1Poll7% = |Response2Poll7% = |Response3Poll7% = |Response4Poll7% = |Response5Poll7% = |Response6Poll7% = |Response7Poll7% = |Response8Poll7% = |Response9Poll7% = |Response10Poll7% = |Response1Poll8% = |Response2Poll8% = |Response3Poll8% = |Response4Poll8% = |Response5Poll8% = |Response6Poll8% = |Response7Poll8% = |Response8Poll8% = |Response9Poll8% = |Response10Poll8% = |Response1Poll9% = |Response2Poll9% = |Response3Poll9% = |Response4Poll9% = |Response5Poll9% = |Response6Poll9% = |Response7Poll9% = |Response8Poll9% = |Response9Poll9% = |Response10Poll9% = |Response1Poll10% = |Response2Poll10% = |Response3Poll10% = |Response4Poll10% = |Response5Poll10% = |Response6Poll10% = |Response7Poll10% = |Response8Poll10% = |Response9Poll10% = |Response10Poll10% = }} |