Jump to content

Module:NPVIC status/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Swpb (talk | contribs) at 14:46, 7 January 2019 (Functions). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 US postal abbreviation, with any non-letter separator) to use as inputs to the specified function.

Functions

"States" returns the number of states (excluding DC) listed in the input string. An unnamed argument with value "spell" will cause the number to be spelled out per MOS:NUMERAL.

{{#invoke:NPVIC status|states|section=section}}

"EVs" returns the total number of electoral votes controlled by jurisdictions listed in the input string.

{{#invoke:NPVIC status|EVs|section=section}}

"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.

{{#invoke:NPVIC status|overlays|section=section|size=size}}

"Signatories" returns a bulleted list of the jurisdictions where the compact has passed into law, with their flags. The "section" parameter can be dropped; the section "passed" is used automatically.

{{#invoke:NPVIC status|signatories}}