Difference between revisions of "Template:CongPoll"

From Ballotpedia
Jump to: navigation, search
Line 1: Line 1:
<table border="1" style="text-align:center" cellpadding="3" cellspacing="0" width={{#if:{{{Response4|}}}|"1000px"|"700px"}} {{#ifeq:{{{Collapse|}}} | Yes | class="collapsible collapsed"|class="collapsible"}}>
+
<table border="1" style="text-align:center" cellpadding="3" cellspacing="0" {{#ifeq:{{{Collapse|}}} | Yes | class="collapsible collapsed"|class="collapsible"}}>
 
<tr>
 
<tr>
 
<th style="color:white;background-color:#666666;" colspan="15">'''{{{Title}}}'''</th>
 
<th style="color:white;background-color:#666666;" colspan="15">'''{{{Title}}}'''</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td width="300px" style="background-color:#e5e4e2">'''Poll'''</td>
+
<td style="background-color:#e5e4e2">'''Poll'''</td>
<td width="100px" style="background-color:#e5e4e2">'''{{{Response1}}}'''</td>
+
<td style="background-color:#e5e4e2">'''{{{Response1}}}'''</td>
<td width="100px" style="background-color:#e5e4e2">'''{{{Response2}}}'''</td><!--
+
<td style="background-color:#e5e4e2">'''{{{Response2}}}'''</td><!--
-->{{#if: {{{Response3|}}}|<td width="100px" style="background-color:#e5e4e2">'''{{{Response3}}}'''</td>|}}<!--
+
-->{{#if: {{{Response3|}}}|<td style="background-color:#e5e4e2">'''{{{Response3}}}'''</td>|}}<!--
-->{{#if: {{{Response4|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response4}}}'''</td>|}}<!--
+
-->{{#if: {{{Response4|}}}|<td style="background-color:#e5e4e2;">'''{{{Response4}}}'''</td>|}}<!--
-->{{#if: {{{Response5|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response5}}}'''</td>|}}<!--
+
-->{{#if: {{{Response5|}}}|<td style="background-color:#e5e4e2;">'''{{{Response5}}}'''</td>|}}<!--
-->{{#if: {{{Response6|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response6}}}'''</td>|}}<!--
+
-->{{#if: {{{Response6|}}}|<td style="background-color:#e5e4e2;">'''{{{Response6}}}'''</td>|}}<!--
-->{{#if: {{{Response7|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response7}}}'''</td>|}}<!--
+
-->{{#if: {{{Response7|}}}|<td style="background-color:#e5e4e2;">'''{{{Response7}}}'''</td>|}}<!--
-->{{#if: {{{Response8|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response8}}}'''</td>|}}<!--
+
-->{{#if: {{{Response8|}}}|<td style="background-color:#e5e4e2;">'''{{{Response8}}}'''</td>|}}<!--
-->{{#if: {{{Response9|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response9}}}'''</td>|}}<!--
+
-->{{#if: {{{Response9|}}}|<td style="background-color:#e5e4e2;">'''{{{Response9}}}'''</td>|}}<!--
-->{{#if: {{{Response10|}}}|<td width="100px" style="background-color:#e5e4e2;">'''{{{Response10}}}'''</td>|}}<!--
+
-->{{#if: {{{Response10|}}}|<td style="background-color:#e5e4e2;">'''{{{Response10}}}'''</td>|}}<!--
-->{{#if: {{{Margin of error1|}}}|<td width="100px" style="background-color:#e5e4e2">'''Margin of Error'''</td>|}}<!--
+
-->{{#if: {{{Margin of error1|}}}|<td style="background-color:#e5e4e2">'''Margin of Error'''</td>|}}<!--
-->{{#if: {{{Numberpolled1|}}}|<td width="100px" style="background-color:#e5e4e2">'''Sample Size'''</td>|}}
+
-->{{#if: {{{Numberpolled1|}}}|<td style="background-color:#e5e4e2">'''Sample Size'''</td>|}}
 
</tr><!--
 
</tr><!--
  

Revision as of 14:50, 4 August 2014

{{{Title}}}
Poll {{{Response1}}} {{{Response2}}}
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
[edit] Template-info.png Template documentation
This is a usage page for the {{CongPoll}}.

The Poll template is to be used for any polls related to the Congress project.

Much of the poll template is automated and can compute automatically. The template will automatically put the most recently added poll at the top of the template.

The template can handle:

  • 10 different possible responses to a poll
  • 15 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

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

Two polls


{{CongPoll
|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:


{{CongPoll
|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:


{{CongPoll
|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


{{CongPoll
|Title=
|Poll1=
|Poll2=
|Poll3=
|Poll4=
|Poll5=
|Poll6=
|Poll7=
|Poll8=
|Poll9=
|Poll10=
|Poll11=
|Poll12=
|Poll13=
|Poll14=
|Poll15=
|Date1=
|Date2=
|Date3=
|Date4=
|Date5=
|Date6=
|Date7=
|Date8=
|Date9=
|Date10=
|Date11=
|Date12=
|Date13=
|Date14=
|Date15=
|Response1=
|Response2=
|Response3=
|Response4=
|Response5=
|Response6=
|Response7=
|Response8=
|Response9=
|Response10=
|Numberpolled1=
|Numberpolled2=
|Numberpolled3=
|Numberpolled4=
|Numberpolled5=
|Numberpolled6=
|Numberpolled7=
|Numberpolled8=
|Numberpolled9=
|Numberpolled10=
|Numberpolled11=
|Numberpolled12=
|Numberpolled13=
|Numberpolled14=
|Numberpolled15=
|Margin of error1= 
|Margin of error2= 
|Margin of error3= 
|Margin of error4= 
|Margin of error5= 
|Margin of error6= 
|Margin of error7= 
|Margin of error8= 
|Margin of error9= 
|Margin of error10= 
|Margin of error11= 
|Margin of error12= 
|Margin of error13= 
|Margin of error14= 
|Margin of error15= 
|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% = 
|Response1Poll11% = 
|Response2Poll11% = 
|Response3Poll11% = 
|Response4Poll11% = 
|Response5Poll11% = 
|Response6Poll11% = 
|Response7Poll11% = 
|Response8Poll11% = 
|Response9Poll11% = 
|Response10Poll11% = 
|Response1Poll12% = 
|Response2Poll12% = 
|Response3Poll12% = 
|Response4Poll12% = 
|Response5Poll12% = 
|Response6Poll12% = 
|Response7Poll12% = 
|Response8Poll12% = 
|Response9Poll12% = 
|Response10Poll12% = 
|Response1Poll13% = 
|Response2Poll13% = 
|Response3Poll13% = 
|Response4Poll13% = 
|Response5Poll13% = 
|Response6Poll13% = 
|Response7Poll13% = 
|Response8Poll13% = 
|Response9Poll13% = 
|Response10Poll13% = 
|Response1Poll14% = 
|Response2Poll14% = 
|Response3Poll14% = 
|Response4Poll14% = 
|Response5Poll14% = 
|Response6Poll14% = 
|Response7Poll14% = 
|Response8Poll14% = 
|Response9Poll14% = 
|Response10Poll14% = 
|Response1Poll15% = 
|Response2Poll15% = 
|Response3Poll15% = 
|Response4Poll15% = 
|Response5Poll15% = 
|Response6Poll15% = 
|Response7Poll15% = 
|Response8Poll15% = 
|Response9Poll15% = 
|Response10Poll15% = 
}}