Difference between revisions of "Template:NASAT results by state by year"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) m |
Kevin Wang (talk | contribs) |
||
Line 1: | Line 1: | ||
− | {{#vardefine:max|0}}{{#loop:i|1| | + | <!-- |
+ | clear variables | ||
+ | -->{{#loop:k|1|55|{{#vardefine:p{{#var:k}}|}}}}<!-- | ||
+ | set up variables | ||
+ | -->{{#if:{{#var:uses}}|{{#vardefine:uses|{{#expr:{{#var:uses}}+1}}}}|{{#vardefine:uses|1}}}}<!-- | ||
+ | loop through the list of states + DC and | ||
+ | -->{{#vardefine:max|0}}{{#loop:i{{#var:uses}}|1|55|{{#vardefine:x|{{All states and DC|{{#expr:{{#var:i{{#var:uses}}}}-1}}}}}}{{#if:{{{ {{#var:x}}| }}}|{{#vardefine:max|{{#expr:{{#var:max}}+1}}}}<!-- | ||
+ | -->{{#if:{{#var:p{{{ {{#var:x}} }}}}}|{{#vardefine:p{{{ {{#var:x}} }}}|{{#var:p{{{ {{#var:x}} }}}}},{{#var:x}}}}|{{#vardefine:p{{{ {{#var:x}} }}}|{{#var:x}}}}}}<!-- | ||
+ | -->}}}}<includeonly> | ||
{| class="wikitable" | {| class="wikitable" | ||
! Place | ! Place | ||
Line 8: | Line 16: | ||
{{#ifexpr:{{#var:j}}<=3 | {{#ifexpr:{{#var:j}}<=3 | ||
|{{Placement row|place={{#var:j}}|{{#var:j}}|{{#var:p{{#var:j}}}}}} | |{{Placement row|place={{#var:j}}|{{#var:j}}|{{#var:p{{#var:j}}}}}} | ||
− | |{{!}} {{#var:j}} <nowiki> | + | |{{!}}{{#if:{{#explode:{{#var:p{{#var:j}}}}|,|1}} |
+ | |{{#vardefine:l|0}}{{#while: | ||
+ | |{{#explode:{{#var:p{{#var:j}}}}|,|{{#var:l}}}} | ||
+ | |{{#vardefine:l|{{#expr:{{#var:l}}+1}}}} | ||
+ | }}<!-- | ||
+ | --> ! rowspan={{#var:l}} {{!}} {{#var:j}}<nowiki> | ||
+ | </nowiki> | ||
+ | {{!}} {{#explode:{{#var:p{{#var:j}}}}|,|0}} | ||
+ | {{#loop:m|1|{{#expr:{{#var:l}}-1}}|{{!-}} | ||
+ | {{!}} {{#explode:{{#var:p{{#var:j}}}}|,|{{#var:m}}}} | ||
+ | {{!-}}}} | ||
+ | |{{#var:j}} <nowiki> | ||
</nowiki> | </nowiki> | ||
{{!}} {{#var:p{{#var:j}}}} | {{!}} {{#var:p{{#var:j}}}} | ||
+ | }} | ||
{{!-}} | {{!-}} | ||
}}}}}} | }}}}}} | ||
|}</includeonly><noinclude> | |}</includeonly><noinclude> | ||
+ | This template only considers states + DC. | ||
+ | |||
{| class="wikitable" | {| class="wikitable" | ||
! Input | ! Input | ||
Line 47: | Line 69: | ||
|North Carolina=5 | |North Carolina=5 | ||
|Pennsylvania=6 | |Pennsylvania=6 | ||
+ | }} | ||
+ | |- | ||
+ | |<pre> | ||
+ | {{NASAT results by state by year | ||
+ | |Alabama=12 | ||
+ | |California=2 | ||
+ | |Delaware=6 | ||
+ | |Georgia=4 | ||
+ | |Illinois=1 | ||
+ | |Kentucky=9 | ||
+ | |Maryland=6 | ||
+ | |Missouri=9 | ||
+ | |New York=6 | ||
+ | |Ohio=3 | ||
+ | |Oklahoma=12 | ||
+ | |Pennsylvania=5 | ||
+ | }} | ||
+ | </pre> | ||
+ | |{{NASAT results by state by year | ||
+ | |Alabama=12 | ||
+ | |California=2 | ||
+ | |Delaware=6 | ||
+ | |Georgia=4 | ||
+ | |Illinois=1 | ||
+ | |Kentucky=9 | ||
+ | |Maryland=6 | ||
+ | |Missouri=9 | ||
+ | |New York=6 | ||
+ | |Ohio=3 | ||
+ | |Oklahoma=12 | ||
+ | |Pennsylvania=5 | ||
}} | }} | ||
|} | |} |
Revision as of 09:23, 20 June 2022
This template only considers states + DC.
Input | Output | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{NASAT results by state by year |California=9 |Connecticut=10 |Illinois=2 |Iowa=21 |Kentucky=15 |Maryland=4 |Michigan=7 |Minnesota=13 |Missouri=3 |New Jersey=1 |North Carolina=5 |Pennsylvania=6 }} |
| ||||||||||||||||||||||
{{NASAT results by state by year |Alabama=12 |California=2 |Delaware=6 |Georgia=4 |Illinois=1 |Kentucky=9 |Maryland=6 |Missouri=9 |New York=6 |Ohio=3 |Oklahoma=12 |Pennsylvania=5 }} |
|
Full state template:
{{NASAT results by state by year |Alabama= |Alaska= |Arizona= |Arkansas= |California= |Colorado= |Connecticut= |Delaware= |District of Columbia= |Florida= |Georgia= |Hawaii= |Idaho= |Illinois= |Indiana= |Iowa= |Kansas= |Kentucky= |Louisiana= |Maine= |Maryland= |Massachusetts= |Michigan= |Minnesota= |Mississippi= |Missouri= |Montana= |Nebraska= |Nevada= |New Hampshire= |New Jersey= |New Mexico= |New York= |North Carolina= |North Dakota= |Ohio= |Oklahoma= |Oregon= |Pennsylvania= |Rhode Island= |South Carolina= |South Dakota= |Tennessee= |Texas= |Utah= |Vermont= |Virginia= |Washington= |West Virginia= |Wisconsin= |Wyoming= }}
Only states that have attended template:
{{NASAT results by state by year |Alabama= |Arizona= |California= |Connecticut= |Delaware= |District of Columbia= |Florida= |Georgia= |Illinois= |Indiana= |Iowa= |Kentucky= |Maryland= |Massachusetts= |Michigan= |Minnesota= |Missouri= |Nevada= |New Hampshire= |New Jersey= |New York= |North Carolina= |Ohio= |Oklahoma= |Pennsylvania= |South Carolina= |Tennessee= |Texas= |Vermont= |Virginia= }}