Template:NAXPoll: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 128: | Line 128: | ||
|pct5=5.3 | |pct5=5.3 | ||
}}</pre> | }}</pre> | ||
== Live example == | |||
This is a live rendering test. The values below are demonstration data only and do not represent a real poll. | |||
{{NAXPoll | |||
|polltype=National Party Voting Intention | |||
|date=V.{{AN|1759}} | |||
|previous=IV.{{AN|1759}} | |||
|pollster=NBC Polling Desk | |||
|fieldwork=III–V.{{AN|1759}} | |||
|sample=2,000 registered voters | |||
|method=Online panel | |||
|electorate=Registered New Alexandrian voters | |||
|margin=2.4 | |||
|source=Demonstration data only; not a real poll | |||
|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 | |||
|party5=Independents and other candidates | |||
|pct5=6.4 | |||
|notes=Party 4 is intentionally omitted to test conditional rows. | |||
}} | |||
== Parameters == | == Parameters == | ||
Latest revision as of 22:23, 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
}}
Live example
This is a live rendering test. The values below are demonstration data only and do not represent a real poll.
National Party Voting Intention
| Party | Percentage in poll | Visual | Change (pp) |
|---|---|---|---|
| Federal Humanist Party (FHP) |
33.1% | ▲ +3.8 pp | |
| Federal Consensus Party of Nouvelle Alexandrie (FCP) |
32.5% | ▼ −1.2 pp | |
| Democratic Socialist Party of Nouvelle Alexandrie (DSP) |
28.0% | ||
| Independents and other candidates | 6.4% | — |
| Poll details | |
|---|---|
| Pollster | NBC Polling Desk |
| Fieldwork | III–V.1759 AN |
| Sample size | 2,000 registered voters |
| Method | Online panel |
| Source | Demonstration data only; not a real poll |
Note: Party 4 is intentionally omitted to test conditional rows.
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. |