Template:NAXPoll: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
====={{#if:{{{polltype|}}}|{{{polltype}}}|National Party Voting Intention}}===== | ===== {{#if:{{{polltype|}}}|{{{polltype}}}|National Party Voting Intention}} ===== | ||
<table class="wikitable sortable" style="width:100%; max-width:760px; margin:0.5em 0; text-align:left;"> | |||
<caption style="background:#eaecf0; border:1px solid #a2a9b1; padding:0.5em;"> | |||
[[File:Logo-NBCPollingReport.png|70px|alt=NBC Polling Report|link=]]<br> | |||
<strong>{{#if:{{{polltype|}}}|{{{polltype}}}|National Party Voting Intention}}</strong> | |||
{{#if:{{{date|}}}{{{month|}}}{{{year|}}}|<br><small>Fielded: {{#if:{{{date|}}}|{{{date}}}|{{#if:{{{month|}}}|{{{month}}}.|}}{{#if:{{{year|}}}|{{AN|{{{year}}}}}|}}}}</small>|}} | |||
<br><small>{{#if:{{{electorate|}}}|{{{electorate}}}|registered New Alexandrian voters}} · Margin of error: {{#if:{{{margin|}}}|±{{{margin}}}%|not reported}}</small> | |||
{{#if:{{{ | {{#if:{{{previous|}}}{{{prevmonth|}}}{{{prevyear|}}}|<br><small>Change compared with {{#if:{{{previous|}}}|{{{previous}}}|{{#if:{{{prevmonth|}}}|{{{prevmonth}}}.|}}{{#if:{{{prevyear|}}}|{{AN|{{{prevyear}}}}}|}}}}</small>|}} | ||
</caption> | |||
<tr> | |||
| {{ | <th scope="col" style="text-align:left;">{{{item_label|Party}}}</th> | ||
<th scope="col" style="text-align:right;">{{{value_label|Percentage in poll}}}</th> | |||
<th scope="col" style="width:30%;">Visual</th> | |||
<th scope="col" style="text-align:right;">Change{{#if:{{{previous|}}}{{{prevmonth|}}}{{{prevyear|}}}|<br><small>(pp)</small>|}}</th> | |||
| {{ | </tr> | ||
{{#if:{{{party1|}}}|<tr> | |||
<th scope="row" style="text-align:left;">{{#if:{{{party1link|}}}|[[{{{party1link}}}|{{{party1}}}]]|[[{{{party1}}}]]}}{{#if:{{{abbr1|}}}|<br><small>({{{abbr1}}})</small>|}}</th> | |||
{{#if:{{{ | <td data-sort-value="{{{pct1|}}}" style="text-align:right;">{{#if:{{{pct1|}}}|{{{pct1}}}%|—}}</td> | ||
<td>{{#if:{{{pct1|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct1}}}%;"></div></div>|—}}</td> | |||
| {{ | <td style="text-align:right;">{{#if:{{{change1|}}}|{{#switch:{{lc:{{{dir1|}}}}}|increase={{increase}} +{{{change1}}} pp|decrease={{decrease}} −{{{change1}}} pp|steady={{steady}} {{{change1}}} pp|#default={{{change1}}} pp}}|—}}</td> | ||
</tr>}} | |||
| | {{#if:{{{party2|}}}|<tr> | ||
{{ | <th scope="row" style="text-align:left;">{{#if:{{{party2link|}}}|[[{{{party2link}}}|{{{party2}}}]]|[[{{{party2}}}]]}}{{#if:{{{abbr2|}}}|<br><small>({{{abbr2}}})</small>|}}</th> | ||
<td data-sort-value="{{{pct2|}}}" style="text-align:right;">{{#if:{{{pct2|}}}|{{{pct2}}}%|—}}</td> | |||
<td>{{#if:{{{pct2|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct2}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change2|}}}|{{#switch:{{lc:{{{dir2|}}}}}|increase={{increase}} +{{{change2}}} pp|decrease={{decrease}} −{{{change2}}} pp|steady={{steady}} {{{change2}}} pp|#default={{{change2}}} pp}}|—}}</td> | |||
</tr>}} | |||
{{ | {{#if:{{{party3|}}}|<tr> | ||
<th scope="row" style="text-align:left;">{{#if:{{{party3link|}}}|[[{{{party3link}}}|{{{party3}}}]]|[[{{{party3}}}]]}}{{#if:{{{abbr3|}}}|<br><small>({{{abbr3}}})</small>|}}</th> | |||
| {{ | <td data-sort-value="{{{pct3|}}}" style="text-align:right;">{{#if:{{{pct3|}}}|{{{pct3}}}%|—}}</td> | ||
<td>{{#if:{{{pct3|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct3}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change3|}}}|{{#switch:{{lc:{{{dir3|}}}}}|increase={{increase}} +{{{change3}}} pp|decrease={{decrease}} −{{{change3}}} pp|steady={{steady}} {{{change3}}} pp|#default={{{change3}}} pp}}|—}}</td> | |||
{{#if:{{{ | </tr>}} | ||
{{#if:{{{party4|}}}|<tr> | |||
| {{ | <th scope="row" style="text-align:left;">{{#if:{{{party4link|}}}|[[{{{party4link}}}|{{{party4}}}]]|[[{{{party4}}}]]}}{{#if:{{{abbr4|}}}|<br><small>({{{abbr4}}})</small>|}}</th> | ||
<td data-sort-value="{{{pct4|}}}" style="text-align:right;">{{#if:{{{pct4|}}}|{{{pct4}}}%|—}}</td> | |||
| | <td>{{#if:{{{pct4|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct4}}}%;"></div></div>|—}}</td> | ||
{{ | <td style="text-align:right;">{{#if:{{{change4|}}}|{{#switch:{{lc:{{{dir4|}}}}}|increase={{increase}} +{{{change4}}} pp|decrease={{decrease}} −{{{change4}}} pp|steady={{steady}} {{{change4}}} pp|#default={{{change4}}} pp}}|—}}</td> | ||
</tr>}} | |||
{{#if:{{{party5|}}}|<tr> | |||
<th scope="row" style="text-align:left;">{{#if:{{{party5link|}}}|[[{{{party5link}}}|{{{party5}}}]]|[[{{{party5}}}]]}}{{#if:{{{abbr5|}}}|<br><small>({{{abbr5}}})</small>|}}</th> | |||
<td data-sort-value="{{{pct5|}}}" style="text-align:right;">{{#if:{{{pct5|}}}|{{{pct5}}}%|—}}</td> | |||
{{ | <td>{{#if:{{{pct5|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct5}}}%;"></div></div>|—}}</td> | ||
<td style="text-align:right;">{{#if:{{{change5|}}}|{{#switch:{{lc:{{{dir5|}}}}}|increase={{increase}} +{{{change5}}} pp|decrease={{decrease}} −{{{change5}}} pp|steady={{steady}} {{{change5}}} pp|#default={{{change5}}} pp}}|—}}</td> | |||
| {{ | </tr>}} | ||
{{#if:{{{party6|}}}|<tr> | |||
<th scope="row" style="text-align:left;">{{#if:{{{party6link|}}}|[[{{{party6link}}}|{{{party6}}}]]|[[{{{party6}}}]]}}{{#if:{{{abbr6|}}}|<br><small>({{{abbr6}}})</small>|}}</th> | |||
{{#if:{{{ | <td data-sort-value="{{{pct6|}}}" style="text-align:right;">{{#if:{{{pct6|}}}|{{{pct6}}}%|—}}</td> | ||
<td>{{#if:{{{pct6|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct6}}}%;"></div></div>|—}}</td> | |||
| {{ | <td style="text-align:right;">{{#if:{{{change6|}}}|{{#switch:{{lc:{{{dir6|}}}}}|increase={{increase}} +{{{change6}}} pp|decrease={{decrease}} −{{{change6}}} pp|steady={{steady}} {{{change6}}} pp|#default={{{change6}}} pp}}|—}}</td> | ||
</tr>}} | |||
| | {{#if:{{{party7|}}}|<tr> | ||
{{ | <th scope="row" style="text-align:left;">{{#if:{{{party7link|}}}|[[{{{party7link}}}|{{{party7}}}]]|[[{{{party7}}}]]}}{{#if:{{{abbr7|}}}|<br><small>({{{abbr7}}})</small>|}}</th> | ||
<td data-sort-value="{{{pct7|}}}" style="text-align:right;">{{#if:{{{pct7|}}}|{{{pct7}}}%|—}}</td> | |||
<td>{{#if:{{{pct7|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct7}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change7|}}}|{{#switch:{{lc:{{{dir7|}}}}}|increase={{increase}} +{{{change7}}} pp|decrease={{decrease}} −{{{change7}}} pp|steady={{steady}} {{{change7}}} pp|#default={{{change7}}} pp}}|—}}</td> | |||
</tr>}} | |||
|} | {{#if:{{{party8|}}}|<tr> | ||
<th scope="row" style="text-align:left;">{{#if:{{{party8link|}}}|[[{{{party8link}}}|{{{party8}}}]]|[[{{{party8}}}]]}}{{#if:{{{abbr8|}}}|<br><small>({{{abbr8}}})</small>|}}</th> | |||
<td data-sort-value="{{{pct8|}}}" style="text-align:right;">{{#if:{{{pct8|}}}|{{{pct8}}}%|—}}</td> | |||
<td>{{#if:{{{pct8|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct8}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change8|}}}|{{#switch:{{lc:{{{dir8|}}}}}|increase={{increase}} +{{{change8}}} pp|decrease={{decrease}} −{{{change8}}} pp|steady={{steady}} {{{change8}}} pp|#default={{{change8}}} pp}}|—}}</td> | |||
</tr>}} | |||
{{#if:{{{party9|}}}|<tr> | |||
<th scope="row" style="text-align:left;">{{#if:{{{party9link|}}}|[[{{{party9link}}}|{{{party9}}}]]|[[{{{party9}}}]]}}{{#if:{{{abbr9|}}}|<br><small>({{{abbr9}}})</small>|}}</th> | |||
<td data-sort-value="{{{pct9|}}}" style="text-align:right;">{{#if:{{{pct9|}}}|{{{pct9}}}%|—}}</td> | |||
<td>{{#if:{{{pct9|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct9}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change9|}}}|{{#switch:{{lc:{{{dir9|}}}}}|increase={{increase}} +{{{change9}}} pp|decrease={{decrease}} −{{{change9}}} pp|steady={{steady}} {{{change9}}} pp|#default={{{change9}}} pp}}|—}}</td> | |||
</tr>}} | |||
{{#if:{{{party10|}}}|<tr> | |||
<th scope="row" style="text-align:left;">{{#if:{{{party10link|}}}|[[{{{party10link}}}|{{{party10}}}]]|[[{{{party10}}}]]}}{{#if:{{{abbr10|}}}|<br><small>({{{abbr10}}})</small>|}}</th> | |||
<td data-sort-value="{{{pct10|}}}" style="text-align:right;">{{#if:{{{pct10|}}}|{{{pct10}}}%|—}}</td> | |||
<td>{{#if:{{{pct10|}}}|<div style="background:#eaecf0; border:1px solid #c8ccd1; height:0.9em; width:100%;"><div style="background:#36c; height:0.9em; width:{{{pct10}}}%;"></div></div>|—}}</td> | |||
<td style="text-align:right;">{{#if:{{{change10|}}}|{{#switch:{{lc:{{{dir10|}}}}}|increase={{increase}} +{{{change10}}} pp|decrease={{decrease}} −{{{change10}}} pp|steady={{steady}} {{{change10}}} pp|#default={{{change10}}} pp}}|—}}</td> | |||
</tr>}} | |||
</table> | |||
{{#if:{{{pollster|}}}{{{polling_org|}}}{{{fieldwork|}}}{{{sample|}}}{{{sample_size|}}}{{{method|}}}{{{question|}}}{{{source|}}}| | |||
<table class="wikitable" style="width:100%; max-width:760px; margin:0.5em 0;"> | |||
<tr><th colspan="2" style="background:#eaecf0; text-align:left;">Poll details</th></tr> | |||
{{#if:{{{pollster|}}}{{{polling_org|}}}|<tr><th scope="row" style="width:25%;">Pollster</th><td>{{#if:{{{pollster|}}}|{{{pollster}}}|{{{polling_org|}}}}}</td></tr>}} | |||
{{#if:{{{fieldwork|}}}|<tr><th scope="row">Fieldwork</th><td>{{{fieldwork}}}</td></tr>}} | |||
{{#if:{{{sample|}}}{{{sample_size|}}}|<tr><th scope="row">Sample size</th><td>{{#if:{{{sample|}}}|{{{sample}}}|{{{sample_size|}}}}}</td></tr>}} | |||
{{#if:{{{method|}}}|<tr><th scope="row">Method</th><td>{{{method}}}</td></tr>}} | |||
{{#if:{{{question|}}}|<tr><th scope="row">Question</th><td>{{{question}}}</td></tr>}} | |||
{{#if:{{{source|}}}|<tr><th scope="row">Source</th><td>{{{source}}}</td></tr>}} | |||
</table> | |||
}} | |||
{{#if:{{{notes|}}}|<div style="max-width:760px; margin:0.5em 0;"><small>'''Note:''' {{{notes}}}</small></div>|}} | |||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
{{Documentation | {{Documentation | ||
|content = This template creates standardized polling | |content = This template creates a standardized NBC News polling table for Nouvelle Alexandrie. It keeps empty party rows out of the rendered table and uses an em dash for data that was not reported. | ||
== Usage == | == Usage == | ||
{{NAXPoll | <pre>{{NAXPoll | ||
|polltype=National Party Voting Intention | |polltype=National Party Voting Intention | ||
| | |date=V.{{AN|1759}} | ||
| | |previous=IV.{{AN|1759}} | ||
| | |pollster=Institute of Public Opinion | ||
| | |fieldwork=III–V.{{AN|1759}} | ||
|sample=2,000 registered voters | |||
|method=Online panel | |||
|electorate=Registered New Alexandrian voters | |||
|margin=2.4 | |margin=2.4 | ||
|source=Pollster release | |||
|party1=Federal Humanist Party | |party1=Federal Humanist Party | ||
|abbr1=FHP | |abbr1=FHP | ||
| Line 79: | Line 113: | ||
|abbr2=FCP | |abbr2=FCP | ||
|pct2=32.5 | |pct2=32.5 | ||
|change2= | |change2=1.2 | ||
|dir2= | |dir2=decrease | ||
|party3= | |party3=Democratic Socialist Party of Nouvelle Alexandrie | ||
|abbr3= | |abbr3=DSP | ||
|pct3= | |pct3=28.0 | ||
|change3= | |change3=0.0 | ||
|dir3= | |dir3=steady | ||
|party4=Liberty and Prosperity Alliance | |party4=Liberty and Prosperity Alliance | ||
|abbr4=LPA | |abbr4=LPA | ||
| Line 91: | Line 125: | ||
|change4=0.8 | |change4=0.8 | ||
|dir4=decrease | |dir4=decrease | ||
|party5=Independents | |party5=Independents and other candidates | ||
|pct5= | |pct5=5.3 | ||
}}</pre> | |||
}} | |||
== Parameters == | == Parameters == | ||
* polltype - | * <code>polltype</code> - Poll type or question heading. Defaults to "National Party Voting Intention". | ||
* month - | * <code>date</code> - Poll date. Alternatively use <code>month</code> and <code>year</code>; <code>year</code> is passed through [[Template:AN]]. | ||
* | * <code>previous</code> - Previous poll date. Alternatively use <code>prevmonth</code> and <code>prevyear</code>. | ||
* | * <code>pollster</code> - Polling organization. <code>polling_org</code> is accepted as a legacy alias. | ||
* | * <code>fieldwork</code> - Fieldwork period, if different from the displayed poll date. | ||
* margin - Margin of error | * <code>sample</code> - Sample size and, if useful, the surveyed population. <code>sample_size</code> is accepted as an alias. | ||
* party1...party10 - | * <code>method</code> - Method such as online panel, telephone, or mixed mode. | ||
* abbr1...abbr10 - | * <code>electorate</code> - Survey population. Defaults to registered New Alexandrian voters. | ||
* pct1...pct10 - Percentage value | * <code>margin</code> - Margin of error as a number without the percent sign. If omitted, the template says "not reported". | ||
* change1...change10 - Change | * <code>source</code> - Source link or citation. | ||
* dir1...dir10 - | * <code>question</code> - Full question wording, when the poll is not a simple voting-intention poll. | ||
* <code>notes</code> - Optional short methodological or reporting note. | |||
* <code>item_label</code> - First-column label. Defaults to "Party". | |||
* <code>value_label</code> - Percentage-column label. Defaults to "Percentage in poll". | |||
* <code>party1</code> ... <code>party10</code> - Party, candidate, leader, or other poll item. A row appears only when this is filled. | |||
* <code>party1link</code> ... <code>party10link</code> - Optional article title when the item label does not match its page title. | |||
* <code>abbr1</code> ... <code>abbr10</code> - Optional abbreviation. | |||
* <code>pct1</code> ... <code>pct10</code> - Percentage as a number without the percent sign. A missing value displays as an em dash. | |||
* <code>change1</code> ... <code>change10</code> - Change in percentage points as an unsigned number. A missing value displays as an em dash. | |||
* <code>dir1</code> ... <code>dir10</code> - <code>increase</code>, <code>decrease</code>, or <code>steady</code>. The direction controls the arrow and sign. | |||
== Notes == | |||
* Do not enter a percent sign in <code>pct1</code> or <code>change1</code>; the template supplies the unit. | |||
* Bars use the same 0–100% scale as the poll values and are supplementary to the numeric column. | |||
* All poll-item rows are conditional. Empty slots do not create blank rows. | |||
* The template uses article links for poll items, not category links. | |||
}} | }} | ||
[[Category:Nouvelle Alexandrie templates]] | [[Category:Nouvelle Alexandrie templates]] | ||
[[Category:NBC Newsfeed]] | [[Category:NBC Newsfeed]] | ||
</noinclude> | </noinclude> | ||
Revision as of 22:16, 12 September 2026
This template creates a standardized NBC News polling table for Nouvelle Alexandrie. It keeps empty party rows out of the rendered table and uses an em dash for data that was not reported.
Usage
{{NAXPoll
|polltype=National Party Voting Intention
|date=V.{{AN|1759}}
|previous=IV.{{AN|1759}}
|pollster=Institute of Public Opinion
|fieldwork=III–V.{{AN|1759}}
|sample=2,000 registered voters
|method=Online panel
|electorate=Registered New Alexandrian voters
|margin=2.4
|source=Pollster release
|party1=Federal Humanist Party
|abbr1=FHP
|pct1=33.1
|change1=3.8
|dir1=increase
|party2=Federal Consensus Party of Nouvelle Alexandrie
|abbr2=FCP
|pct2=32.5
|change2=1.2
|dir2=decrease
|party3=Democratic Socialist Party of Nouvelle Alexandrie
|abbr3=DSP
|pct3=28.0
|change3=0.0
|dir3=steady
|party4=Liberty and Prosperity Alliance
|abbr4=LPA
|pct4=1.1
|change4=0.8
|dir4=decrease
|party5=Independents and other candidates
|pct5=5.3
}}
Parameters
polltype- Poll type or question heading. Defaults to "National Party Voting Intention".date- Poll date. Alternatively usemonthandyear;yearis passed through Template:AN.previous- Previous poll date. Alternatively useprevmonthandprevyear.pollster- Polling organization.polling_orgis accepted as a legacy alias.fieldwork- Fieldwork period, if different from the displayed poll date.sample- Sample size and, if useful, the surveyed population.sample_sizeis accepted as an alias.method- Method such as online panel, telephone, or mixed mode.electorate- Survey population. Defaults to registered New Alexandrian voters.margin- Margin of error as a number without the percent sign. If omitted, the template says "not reported".source- Source link or citation.question- Full question wording, when the poll is not a simple voting-intention poll.notes- Optional short methodological or reporting note.item_label- First-column label. Defaults to "Party".value_label- Percentage-column label. Defaults to "Percentage in poll".party1...party10- Party, candidate, leader, or other poll item. A row appears only when this is filled.party1link...party10link- Optional article title when the item label does not match its page title.abbr1...abbr10- Optional abbreviation.pct1...pct10- Percentage as a number without the percent sign. A missing value displays as an em dash.change1...change10- Change in percentage points as an unsigned number. A missing value displays as an em dash.dir1...dir10-increase,decrease, orsteady. The direction controls the arrow and sign.
Notes
- Do not enter a percent sign in
pct1orchange1; the template supplies the unit. - Bars use the same 0–100% scale as the poll values and are supplementary to the numeric column.
- All poll-item rows are conditional. Empty slots do not create blank rows.
- The template uses article links for poll items, not category links.
| Editors can experiment in this template's sandbox (create) and testcases (create) pages. Subpages of this template. |