1,892 bytes added
, 05:02, 16 July 2021
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Accepts raw status strings from the article '''[[National Popular Vote Interstate Compact]]''' and returns processed status information for use in that article.
The parameter "section" takes the name of a labelled section of the article, either "passed" or "pending", containing a string of state equivalents (identified by [[List of U.S. state abbreviations#Postal codes|US postal abbreviation]], with any non-letter separator) to use as inputs to the specified function.
==Functions==
"'''States'''" returns the number of states (excluding [[Washington, DC|DC]]) listed in the input string. An unnamed argument with value "spell" will cause the number to be spelled out per [[MOS:NUMERAL]].
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|states|section=''section''}}</code>
"'''EVs'''" returns the total number of electoral votes controlled by jurisdictions listed in the input string.
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|EVs|section=''section''}}</code>
"'''Overlays'''" returns overlay maps indicating the compact has a status of "passed" (green) or "pending" (yellow), in the jurisdictions listed in the input string. This function takes an additional "size" argument to ensure that the overlay images align with the base map.
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|overlays|section=''section''|size=''size''}}</code>
"'''Signatories'''" returns a bulleted list of the jurisdictions where the compact has passed into law, with their flags. The "passed" section is used automatically.
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|signatories}}</code>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:NPVIC templates]]
}}</includeonly>